includes/paths.php
changeset 741 a216e412c439
parent 696 bd5069e1f19a
child 748 e39454295bbb
equal deleted inserted replaced
740:098e744df928 741:a216e412c439
   190     }
   190     }
   191     $db->free_result();
   191     $db->free_result();
   192     if ( defined('ENANO_INTERFACE_INDEX') || defined('ENANO_INTERFACE_AJAX') || defined('IN_ENANO_UPGRADE') )
   192     if ( defined('ENANO_INTERFACE_INDEX') || defined('ENANO_INTERFACE_AJAX') || defined('IN_ENANO_UPGRADE') )
   193     {
   193     {
   194       $title = $this->parse_url(false);
   194       $title = $this->parse_url(false);
   195       if ( empty($title) && getConfig('main_page') != '' )
   195       if ( empty($title) && get_main_page() != '' )
   196       {
   196       {
   197         $this->main_page();
   197         $this->main_page();
   198       }
   198       }
   199       if ( strstr($title, ' ') || strstr($title, '+') || strstr($title, '%20') )
   199       if ( strstr($title, ' ') || strstr($title, '+') || strstr($title, '%20') )
   200       {
   200       {
   356         $this->cpage['protected'] = 1;
   356         $this->cpage['protected'] = 1;
   357       }
   357       }
   358       if($this->namespace == 'Special' && !$this->external_api_page)
   358       if($this->namespace == 'Special' && !$this->external_api_page)
   359       {
   359       {
   360         // Can't load nonexistent pages
   360         // Can't load nonexistent pages
   361         if( is_string(getConfig('main_page')) )
   361         if( is_string(get_main_page()) )
   362         {
   362         {
   363           $main_page = makeUrl(getConfig('main_page'));
   363           $main_page = makeUrl(get_main_page());
   364         }
   364         }
   365         else
   365         else
   366         {
   366         {
   367           $main_page = makeUrl($this->pages[0]['urlname']);
   367           $main_page = makeUrl($this->pages[0]['urlname']);
   368         }
   368         }
   406     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   406     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];
   407   }
   407   }
   408   
   408   
   409   function main_page()
   409   function main_page()
   410   {
   410   {
   411     if( is_string(getConfig('main_page')) )
   411     if( is_string(get_main_page()) )
   412     {
   412     {
   413       $main_page = makeUrl(getConfig('main_page'));
   413       $main_page = makeUrl(get_main_page());
   414     }
   414     }
   415     else
   415     else
   416     {
   416     {
   417       $main_page = makeUrl($this->pages[0]['urlname']);
   417       $main_page = makeUrl($this->pages[0]['urlname']);
   418     }
   418     }