includes/common.php
changeset 1112 679916c80599
parent 1109 c424a15a1656
child 1186 774ae986fded
equal deleted inserted replaced
1111:8fae8fb3cbb1 1112:679916c80599
   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