includes/paths.php
changeset 15 ad5986a53197
parent 11 ccad6026a168
child 16 64e0d3d4cf14
equal deleted inserted replaced
14:ce6053bb48d8 15:ad5986a53197
   244       {
   244       {
   245         $this->main_page();
   245         $this->main_page();
   246       }
   246       }
   247     }
   247     }
   248     
   248     
       
   249     $this->page = sanitize_page_id($this->page);
       
   250     $this->fullpage = sanitize_page_id($this->fullpage);
       
   251     
   249     dc_here('paths: setting $paths->cpage');
   252     dc_here('paths: setting $paths->cpage');
   250     
   253     
   251     if(isset($this->pages[$this->page]))
   254     if(isset($this->pages[$this->page]))
   252     {
   255     {
   253       dc_here('paths: page existence verified, our page ID is: '.$this->page);
   256       dc_here('paths: page existence verified, our page ID is: '.$this->page);
   294     }
   297     }
   295     else
   298     else
   296     {
   299     {
   297       dc_here('paths: page doesn\'t exist, creating new page in memory<br />our page ID is: '.$this->page);
   300       dc_here('paths: page doesn\'t exist, creating new page in memory<br />our page ID is: '.$this->page);
   298       $this->page_exists = false;
   301       $this->page_exists = false;
       
   302       $page_name = dirtify_page_id($this->page);
       
   303       $page_name = str_replace('_', ' ', $page_name);
       
   304       
       
   305       $pid_cleaned = sanitize_page_id($this->page);
       
   306       if ( $pid_cleaned != $this->page )
       
   307       {
       
   308         redirect($pid_cleaned, 'Sanitizer message', 'page id sanitized', 0);
       
   309       }
       
   310       
   299       $this->cpage = Array(
   311       $this->cpage = Array(
   300         'name'=>str_replace('_', ' ', $this->page),
   312         'name'=>$page_name,
   301         'urlname'=>$this->page,
   313         'urlname'=>$this->page,
   302         'namespace'=>'Article',
   314         'namespace'=>'Article',
   303         'special'=>0,
   315         'special'=>0,
   304         'visible'=>0,
   316         'visible'=>0,
   305         'comments_on'=>1,
   317         'comments_on'=>1,