includes/paths.php
changeset 334 c72b545f1304
parent 326 ab66d6d1f1f4
child 343 eefe9ab7fe7c
equal deleted inserted replaced
333:32429702305e 334:c72b545f1304
   416     $session->init_permissions();
   416     $session->init_permissions();
   417   }
   417   }
   418   
   418   
   419   function add_page($flags)
   419   function add_page($flags)
   420   {
   420   {
       
   421     global $lang;
   421     $flags['urlname_nons'] = $flags['urlname'];
   422     $flags['urlname_nons'] = $flags['urlname'];
   422     $flags['urlname'] = $this->nslist[$flags['namespace']] . $flags['urlname']; // Applies the User:/File:/etc prefixes to the URL names
   423     $flags['urlname'] = $this->nslist[$flags['namespace']] . $flags['urlname']; // Applies the User:/File:/etc prefixes to the URL names
       
   424     
       
   425     if ( is_object($lang) )
       
   426     {
       
   427       if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $flags['name']) )
       
   428         $flags['name'] = $lang->get($flags['name']);
       
   429     }
       
   430     
   423     $pages_len = sizeof($this->pages)/2;
   431     $pages_len = sizeof($this->pages)/2;
   424     $this->pages[$pages_len] = $flags;
   432     $this->pages[$pages_len] = $flags;
   425     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   433     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   426   }
   434   }
   427   
   435