includes/paths.php
changeset 832 7152ca0a0ce9
parent 801 eb8b23f11744
child 843 4415e50e4e84
equal deleted inserted replaced
831:45e887f23282 832:7152ca0a0ce9
   171       $this->pages = array_merge($this->pages, $page_cache);
   171       $this->pages = array_merge($this->pages, $page_cache);
   172     }
   172     }
   173     else
   173     else
   174     {
   174     {
   175       $e = $db->sql_query('SELECT name,urlname,namespace,special,visible,comments_on,protected,delvotes,' . "\n"
   175       $e = $db->sql_query('SELECT name,urlname,namespace,special,visible,comments_on,protected,delvotes,' . "\n"
   176                           . '  delvote_ips,wiki_mode,password FROM '.table_prefix.'pages ORDER BY name;');
   176                           . '  delvote_ips,wiki_mode,password,page_format FROM '.table_prefix.'pages ORDER BY name;');
   177       
   177       
   178       if( !$e )
   178       if( !$e )
   179       {
   179       {
   180         $db->_die('The error seems to have occured while selecting the page information. File: includes/paths.php; line: '.__LINE__);
   180         $db->_die('The error seems to have occured while selecting the page information. File: includes/paths.php; line: '.__LINE__);
   181       }
   181       }
   248           'special' => 1,
   248           'special' => 1,
   249           'visible' => 1,
   249           'visible' => 1,
   250           'comments_on' => 1,
   250           'comments_on' => 1,
   251           'protected' => 1,
   251           'protected' => 1,
   252           'delvotes' => 0,
   252           'delvotes' => 0,
   253           'delvote_ips' => ''
   253           'delvote_ips' => '',
       
   254           'page_format' => getConfig('default_page_format', 'wikitext')
   254         );
   255         );
   255       $this->external_api_page = true;
   256       $this->external_api_page = true;
   256       $code = $plugins->setHook('paths_external_api_page');
   257       $code = $plugins->setHook('paths_external_api_page');
   257       foreach ( $code as $cmd )
   258       foreach ( $code as $cmd )
   258       {
   259       {
   320       }
   321       }
   321       
   322       
   322       if ( !is_array($this->cpage) )
   323       if ( !is_array($this->cpage) )
   323       {
   324       {
   324         $this->cpage = Array(
   325         $this->cpage = Array(
   325           'name'=>$page_name,
   326           'name' => $page_name,
   326           'urlname'=>$this->page,
   327           'urlname' => $this->page,
   327           'namespace'=>'Article',
   328           'namespace' => 'Article',
   328           'special'=>0,
   329           'special' => 0,
   329           'visible'=>0,
   330           'visible' => 0,
   330           'comments_on'=>1,
   331           'comments_on' => 1,
   331           'protected'=>0,
   332           'protected' => 0,
   332           'delvotes'=>0,
   333           'delvotes' => 0,
   333           'delvote_ips'=>'',
   334           'delvote_ips' => '',
   334           'wiki_mode'=>2,
   335           'wiki_mode' => 2,
       
   336           'page_format' => getConfig('default_page_format', 'wikitext')
   335           );
   337           );
   336       }
   338       }
   337       // Look for a namespace prefix in the urlname, and assign a different namespace, if necessary
   339       // Look for a namespace prefix in the urlname, and assign a different namespace, if necessary
   338       $k = array_keys($this->nslist);
   340       $k = array_keys($this->nslist);
   339       for($i=0;$i<sizeof($this->nslist);$i++)
   341       for($i=0;$i<sizeof($this->nslist);$i++)
   606     
   608     
   607     if ( getConfig('cache_thumbs') != '1' )
   609     if ( getConfig('cache_thumbs') != '1' )
   608       return false;
   610       return false;
   609     
   611     
   610     $e = $db->sql_unbuffered_query('SELECT name,urlname,namespace,special,visible,comments_on,protected,delvotes,' . "\n"
   612     $e = $db->sql_unbuffered_query('SELECT name,urlname,namespace,special,visible,comments_on,protected,delvotes,' . "\n"
   611                           . '  delvote_ips,wiki_mode,password FROM '.table_prefix.'pages ORDER BY name;');
   613                           . '  delvote_ips,wiki_mode,password,page_format FROM '.table_prefix.'pages ORDER BY name;');
   612     if ( !$e )
   614     if ( !$e )
   613       $db->_die();
   615       $db->_die();
   614     
   616     
   615     $md_array = array();
   617     $md_array = array();
   616     
   618