includes/pageprocess.php
changeset 377 bb3e6c3bd4f4
parent 372 5bd429428101
child 387 92664d2efab8
equal deleted inserted replaced
376:66732bd4532c 377:bb3e6c3bd4f4
   903         '_' => ' ',
   903         '_' => ' ',
   904         '<' => '&lt;',
   904         '<' => '&lt;',
   905         '>' => '&gt;'
   905         '>' => '&gt;'
   906         ));
   906         ));
   907     
   907     
   908     $target_username = preg_replace('/^' . preg_quote($paths->nslist['User']) . '/', '', $target_username);
   908     $target_username = preg_replace('/^' . str_replace('/', '\\/', preg_quote($paths->nslist['User'])) . '/', '', $target_username);
   909     $target_username = explode('/', $target_username);
   909     list($target_username) = explode('/', $target_username);
   910     $target_username = $target_username[0];
       
   911     
   910     
   912     if ( ( $page_name == str_replace('_', ' ', $this->page_id) || $page_name == $paths->nslist['User'] . str_replace('_', ' ', $this->page_id) ) || !$this->page_exists )
   911     if ( ( $page_name == str_replace('_', ' ', $this->page_id) || $page_name == $paths->nslist['User'] . str_replace('_', ' ', $this->page_id) ) || !$this->page_exists )
   913     {
   912     {
   914       $page_name = "$target_username's user page";
   913       $page_name = $lang->get('userpage_page_title', array('username' => htmlspecialchars($target_username)));
   915     }
   914     }
   916     else
   915     else
   917     {
   916     {
   918       // User has a custom title for their userpage
   917       // User has a custom title for their userpage
   919       $page_name = $paths->pages[ $paths->nslist[$this->namespace] . $this->page_id ]['name'];
   918       $page_name = $paths->pages[ $paths->nslist[$this->namespace] . $this->page_id ]['name'];