includes/common.php
changeset 1109 c424a15a1656
parent 1099 73abd46f5148
child 1186 774ae986fded
equal deleted inserted replaced
1108:c1be67a50d81 1109:c424a15a1656
   387     die('SECURITY: spoofed IP address: ' . htmlspecialchars($_SERVER['REMOTE_ADDR']));
   387     die('SECURITY: spoofed IP address: ' . htmlspecialchars($_SERVER['REMOTE_ADDR']));
   388   }
   388   }
   389   
   389   
   390   // For special and administration pages, sometimes there is a "preloader" function that must be run
   390   // For special and administration pages, sometimes there is a "preloader" function that must be run
   391   // before the session manager and/or path manager get the init signal. Call it here.
   391   // before the session manager and/or path manager get the init signal. Call it here.
   392   $title = get_title(true);
   392   $urlname = get_title(true);
   393   list($page_id, $namespace) = RenderMan::strToPageID($title);
   393   list($page_id, $namespace) = RenderMan::strToPageID($urlname);
   394   list($page_id_top) = explode('/', $page_id);
   394   list($page_id_top) = explode('/', $page_id);
   395   $fname = "page_{$namespace}_{$page_id_top}_preloader";
   395   $fname = "page_{$namespace}_{$page_id_top}_preloader";
   396   if( ( $namespace == 'Admin' || $namespace == 'Special' ) && function_exists($fname))
   396   if( ( $namespace == 'Admin' || $namespace == 'Special' ) && function_exists($fname))
   397   {
   397   {
   398     call_user_func($fname);
   398     call_user_func($fname);
   424     eval($cmd);
   424     eval($cmd);
   425   }
   425   }
   426   
   426   
   427   profiler_log('Ran session_started hook');
   427   profiler_log('Ran session_started hook');
   428   
   428   
   429   $paths->init($title);
   429   $paths->init($urlname);
   430   
   430   
   431   // setup output format
   431   // setup output format
   432   if ( defined('ENANO_OUTPUT_FORMAT') )
   432   if ( defined('ENANO_OUTPUT_FORMAT') )
   433     $class = 'Output_' . ENANO_OUTPUT_FORMAT;
   433     $class = 'Output_' . ENANO_OUTPUT_FORMAT;
   434   else
   434   else