includes/common.php
changeset 945 c19242d13a49
parent 901 99ea0b0ac4be
child 956 25b1bdce985b
equal deleted inserted replaced
944:073a42e4177f 945:c19242d13a49
   400   // For special and administration pages, sometimes there is a "preloader" function that must be run
   400   // For special and administration pages, sometimes there is a "preloader" function that must be run
   401   // before the session manager and/or path manager get the init signal. Call it here.  
   401   // before the session manager and/or path manager get the init signal. Call it here.  
   402   $p = RenderMan::strToPageId($paths->get_pageid_from_url());
   402   $p = RenderMan::strToPageId($paths->get_pageid_from_url());
   403   if( ( $p[1] == 'Admin' || $p[1] == 'Special' ) && function_exists('page_'.$p[1].'_'.$p[0].'_preloader'))
   403   if( ( $p[1] == 'Admin' || $p[1] == 'Special' ) && function_exists('page_'.$p[1].'_'.$p[0].'_preloader'))
   404   {
   404   {
   405     @call_user_func('page_'.$p[1].'_'.$p[0].'_preloader');
   405     call_user_func('page_'.$p[1].'_'.$p[0].'_preloader');
   406   }
   406   }
   407   
   407   
   408   profiler_log('Checked for preloader');
   408   profiler_log('Checked for preloader');
   409   
   409   
   410   // One quick security check...
   410   // One quick security check...
   413     die('SECURITY: spoofed IP address: ' . htmlspecialchars($_SERVER['REMOTE_ADDR']));
   413     die('SECURITY: spoofed IP address: ' . htmlspecialchars($_SERVER['REMOTE_ADDR']));
   414   }
   414   }
   415 
   415 
   416   // All checks passed! Start the main components up.  
   416   // All checks passed! Start the main components up.  
   417   $session->start();
   417   $session->start();
   418   
       
   419   // Grab language strings from the database
       
   420   if ( is_object(@$lang) )
       
   421   {
       
   422     $lang->fetch();
       
   423     profiler_log('Fetched language strings');
       
   424   }
       
   425   
   418   
   426   // Add all of our built in special pages
   419   // Add all of our built in special pages
   427   foreach ( array('SpecialUserFuncs', 'SpecialPageFuncs', 'SpecialAdmin', 'SpecialCSS', 'SpecialUpDownload', 'SpecialSearch', 'PrivateMessages', 'SpecialGroups', 'SpecialLog') as $plugin )
   420   foreach ( array('SpecialUserFuncs', 'SpecialPageFuncs', 'SpecialAdmin', 'SpecialCSS', 'SpecialUpDownload', 'SpecialSearch', 'PrivateMessages', 'SpecialGroups', 'SpecialLog') as $plugin )
   428   {
   421   {
   429     $funcname = "{$plugin}_paths_init";
   422     $funcname = "{$plugin}_paths_init";