Separating Admin and View code into two modules for improving performance

Comments

sinasalek’s picture

Or at least including admin code only when in in administration

sinasalek’s picture

Separating it as two module is not necessary since it's only few lines of code , but putting it into a different file is easy there is a attribute for this purpose "file" :

<?php
  $menu['module_name'] = array(
    'title' => t(''),
    'description' => '',
    'page callback' => '_module_name_admin',
    'file' => 'module_name.admin.inc',
    'access callback' => 'user_access',
    'access arguments' => array('view module_name'),
  );
?>
sinasalek’s picture

Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.