includes/paths.php
changeset 590 03a60844c7c5
parent 571 66e14e61613e
child 592 27377179fe58
equal deleted inserted replaced
589:88d4ed0a2898 590:03a60844c7c5
   396     $code = $plugins->setHook('page_set');
   396     $code = $plugins->setHook('page_set');
   397     foreach ( $code as $cmd )
   397     foreach ( $code as $cmd )
   398     {
   398     {
   399       eval($cmd);
   399       eval($cmd);
   400     }
   400     }
   401     
   401    
       
   402     profiler_log('Paths and CMS core initted');
   402     $session->init_permissions();
   403     $session->init_permissions();
   403     profiler_log('Paths and CMS core initted');
   404     profiler_log('Default ACL set retrieved');
   404   }
   405   }
   405   
   406   
   406   function add_page($flags)
   407   function add_page($flags)
   407   {
   408   {
   408     global $lang;
   409     global $lang;
   413     {
   414     {
   414       if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $flags['name']) )
   415       if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $flags['name']) )
   415         $flags['name'] = $lang->get($flags['name']);
   416         $flags['name'] = $lang->get($flags['name']);
   416     }
   417     }
   417     
   418     
   418     $pages_len = sizeof($this->pages)/2;
   419     $pages_len = sizeof($this->pages) / 2;
   419     $this->pages[$pages_len] = $flags;
   420     $this->pages[$pages_len] = $flags;
   420     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   421     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   421   }
   422   }
   422   
   423   
   423   function main_page()
   424   function main_page()