includes/pageprocess.php
changeset 304 e2cb5f1432c8
parent 229 97ae8e9d5e29
parent 286 b2f985e4cef3
child 313 854eecfada20
equal deleted inserted replaced
280:dc08c70ca550 304:e2cb5f1432c8
   164       if ( $paths->pages[$pathskey]['special'] == 1 )
   164       if ( $paths->pages[$pathskey]['special'] == 1 )
   165       {
   165       {
   166         $this->send_headers = false;
   166         $this->send_headers = false;
   167         $strict_no_headers = true;
   167         $strict_no_headers = true;
   168       }
   168       }
   169       if ( $paths->pages[$pathskey]['password'] != '' && $paths->pages[$pathskey]['password'] != sha1('') )
   169       if ( isset($paths->pages[$pathskey]['password']) )
   170       {
   170       {
   171         $password =& $paths->pages[$pathskey]['password'];
   171         if ( $paths->pages[$pathskey]['password'] != '' && $paths->pages[$pathskey]['password'] != sha1('') )
   172         if ( $this->password != $password )
   172         {
   173         {
   173           $password =& $paths->pages[$pathskey]['password'];
   174           $this->err_wrong_password();
   174           if ( $this->password != $password )
   175           return false;
   175           {
       
   176             $this->err_wrong_password();
       
   177             return false;
       
   178           }
   176         }
   179         }
   177       }
   180       }
   178     }
   181     }
   179     if ( $this->page_exists && $this->namespace != 'Special' && $this->namespace != 'Admin' && $do_stats )
   182     if ( $this->page_exists && $this->namespace != 'Special' && $this->namespace != 'Admin' && $do_stats )
   180     {
   183     {
   615   function _handle_userpage()
   618   function _handle_userpage()
   616   {
   619   {
   617     global $db, $session, $paths, $template, $plugins; // Common objects
   620     global $db, $session, $paths, $template, $plugins; // Common objects
   618     global $email;
   621     global $email;
   619     
   622     
       
   623     $page_urlname = dirtify_page_id($this->page_id);
   620     if ( $this->page_id == $paths->cpage['urlname_nons'] && $this->namespace == $paths->namespace )
   624     if ( $this->page_id == $paths->cpage['urlname_nons'] && $this->namespace == $paths->namespace )
   621     {
   625     {
   622       $page_name = ( isset($paths->cpage['name']) ) ? $paths->cpage['name'] : $this->page_id;
   626       $page_name = ( isset($paths->cpage['name']) ) ? $paths->cpage['name'] : $this->page_id;
   623     }
   627     }
   624     else
   628     else
   625     {
   629     {
   626       $page_name = ( isset($paths->pages[$this->page_id]) ) ? $paths->pages[$this->page_id]['name'] : $this->page_id;
   630       $page_name = ( isset($paths->pages[$this->page_id]) ) ? $paths->pages[$this->page_id]['name'] : $this->page_id;
   627     }
   631     }
   628     
   632     
   629     $target_username = strtr($page_name, 
   633     $target_username = strtr($page_urlname, 
   630       Array(
   634       Array(
   631         '_' => ' ',
   635         '_' => ' ',
   632         '<' => '&lt;',
   636         '<' => '&lt;',
   633         '>' => '&gt;'
   637         '>' => '&gt;'
   634         ));
   638         ));