includes/paths.php
changeset 793 c0724bf6039b
parent 771 5e85d7db8ee5
child 801 eb8b23f11744
equal deleted inserted replaced
792:b55b87e5fafd 793:c0724bf6039b
   377       }
   377       }
   378     }
   378     }
   379     // This is used in the admin panel to keep track of form submission targets
   379     // This is used in the admin panel to keep track of form submission targets
   380     $this->cpage['module'] = $this->cpage['urlname'];
   380     $this->cpage['module'] = $this->cpage['urlname'];
   381     
   381     
       
   382     $this->cpage['require_admin'] = ( $this->cpage['namespace'] === 'Admin' );
       
   383     
   382     // Page is set up, call any hooks
   384     // Page is set up, call any hooks
   383     $code = $plugins->setHook('page_set');
   385     $code = $plugins->setHook('page_set');
   384     foreach ( $code as $cmd )
   386     foreach ( $code as $cmd )
   385     {
   387     {
   386       eval($cmd);
   388       eval($cmd);
   399     if ( is_object($lang) )
   401     if ( is_object($lang) )
   400     {
   402     {
   401       if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $flags['name']) )
   403       if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $flags['name']) )
   402         $flags['name'] = $lang->get($flags['name']);
   404         $flags['name'] = $lang->get($flags['name']);
   403     }
   405     }
       
   406     
       
   407     $flags['require_admin'] = ( $flags['namespace'] === 'Admin' );
   404     
   408     
   405     $pages_len = sizeof($this->pages) / 2;
   409     $pages_len = sizeof($this->pages) / 2;
   406     $this->pages[$pages_len] = $flags;
   410     $this->pages[$pages_len] = $flags;
   407     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   411     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   408   }
   412   }