includes/common.php
changeset 334 c72b545f1304
parent 331 03850e101d7f
child 335 67bd3121a12e
equal deleted inserted replaced
333:32429702305e 334:c72b545f1304
   118 require_once(ENANO_ROOT.'/includes/js-compressor.php');
   118 require_once(ENANO_ROOT.'/includes/js-compressor.php');
   119 require_once(ENANO_ROOT.'/includes/rijndael.php');
   119 require_once(ENANO_ROOT.'/includes/rijndael.php');
   120 require_once(ENANO_ROOT.'/includes/email.php');
   120 require_once(ENANO_ROOT.'/includes/email.php');
   121 require_once(ENANO_ROOT.'/includes/search.php');
   121 require_once(ENANO_ROOT.'/includes/search.php');
   122 require_once(ENANO_ROOT.'/includes/json.php');
   122 require_once(ENANO_ROOT.'/includes/json.php');
       
   123 require_once(ENANO_ROOT.'/includes/json2.php');
   123 require_once(ENANO_ROOT.'/includes/wikiengine/Tables.php');
   124 require_once(ENANO_ROOT.'/includes/wikiengine/Tables.php');
   124 require_once(ENANO_ROOT.'/includes/pageprocess.php');
   125 require_once(ENANO_ROOT.'/includes/pageprocess.php');
   125 require_once(ENANO_ROOT.'/includes/tagcloud.php');
   126 require_once(ENANO_ROOT.'/includes/tagcloud.php');
   126 
   127 
   127 strip_magic_quotes_gpc();
   128 strip_magic_quotes_gpc();
   346     die('SECURITY: spoofed IP address');
   347     die('SECURITY: spoofed IP address');
   347   }
   348   }
   348 
   349 
   349   // All checks passed! Start the main components up.  
   350   // All checks passed! Start the main components up.  
   350   $session->start();
   351   $session->start();
       
   352   
       
   353   // This is where plugins will want to add pages from 1.1.x on out. You can still add pages at base_classes_initted but the titles won't be localized.
       
   354   $code = $plugins->setHook('session_started');
       
   355   foreach ( $code as $cmd )
       
   356   {
       
   357     eval($cmd);
       
   358   }
       
   359   
   351   $paths->init();
   360   $paths->init();
   352   
   361   
   353   // We're ready for whatever life throws us now.
   362   // We're ready for whatever life throws us now.
   354   define('ENANO_MAINSTREAM', '');
   363   define('ENANO_MAINSTREAM', '');
   355   
   364   
   383   }
   392   }
   384   
   393   
   385   // A better name for this hook would be common_post. At this point
   394   // A better name for this hook would be common_post. At this point
   386   // all of Enano is fully initialized and running and you're ready
   395   // all of Enano is fully initialized and running and you're ready
   387   // to do whatever you want.
   396   // to do whatever you want.
   388   $code = $plugins->setHook('session_started');
   397   $code = $plugins->setHook('common_post');
   389   foreach ( $code as $cmd )
   398   foreach ( $code as $cmd )
   390   {
   399   {
   391     eval($cmd);
   400     eval($cmd);
   392   }
   401   }
   393   
   402