includes/common_cli.php
changeset 1099 73abd46f5148
parent 1081 745200a9cc2a
child 1143 e271ae801c62
equal deleted inserted replaced
1098:be6cfe79128c 1099:73abd46f5148
   178     eval($cmd);
   178     eval($cmd);
   179   }
   179   }
   180   
   180   
   181   profiler_log('Finished base_classes_initted hook');
   181   profiler_log('Finished base_classes_initted hook');
   182   
   182   
   183   // For special and administration pages, sometimes there is a "preloader" function that must be run
       
   184   // before the session manager and/or path manager get the init signal. Call it here.  
       
   185   $p = RenderMan::strToPageId($paths->get_pageid_from_url());
       
   186   if( ( $p[1] == 'Admin' || $p[1] == 'Special' ) && function_exists('page_'.$p[1].'_'.$p[0].'_preloader'))
       
   187   {
       
   188     call_user_func('page_'.$p[1].'_'.$p[0].'_preloader');
       
   189   }
       
   190   
       
   191   profiler_log('Checked for preloader');
       
   192   
       
   193   // One quick security check...
   183   // One quick security check...
   194   if ( isset($_SERVER['REMOTE_ADDR']) )
   184   if ( isset($_SERVER['REMOTE_ADDR']) )
   195   {
   185   {
   196     grinding_halt('REMOTE_ADDR detected', 'Detected a REMOTE_ADDR, this should not happen in CLI mode.');
   186     grinding_halt('REMOTE_ADDR detected', 'Detected a REMOTE_ADDR, this should not happen in CLI mode.');
   197   }
   187   }