includes/namespaces/user.php
changeset 953 323c4cd1aa37
parent 896 ddecc53004ee
child 970 d894086f38cc
--- a/includes/namespaces/user.php	Mon May 04 23:07:00 2009 -0400
+++ b/includes/namespaces/user.php	Tue May 05 00:10:26 2009 -0400
@@ -58,13 +58,7 @@
     
     $page_urlname = dirtify_page_id($this->page_id);
     if ( $this->page_id == $paths->page_id && $this->namespace == $paths->namespace )
-    {
-      $page_name = ( isset($paths->cpage['name']) ) ? $paths->cpage['name'] : $this->page_id;
-    }
-    else
-    {
-      $page_name = ( isset($paths->pages[$this->page_id]) ) ? $paths->pages[$this->page_id]['name'] : $this->page_id;
-    }
+    $page_name = $this->cdata['name'];
     
     $target_username = strtr($page_urlname, 
       Array(
@@ -80,13 +74,8 @@
     {
       $page_name = $lang->get('userpage_page_title', array('username' => $target_username));
     }
-    else
-    {
-      // User has a custom title for their userpage
-      $page_name = $paths->pages[ $paths->nslist[$this->namespace] . $this->page_id ]['name'];
-    }
     
-    $template->tpl_strings['PAGE_NAME'] = htmlspecialchars($page_name);
+    $output->set_title($page_name);
     
     $q = $db->sql_query('SELECT u.username, u.user_id AS authoritative_uid, u.real_name, u.email, u.reg_time, u.user_has_avatar, u.avatar_type, x.*, COUNT(c.comment_id) AS n_comments
                            FROM '.table_prefix.'users u
@@ -275,7 +264,7 @@
             $parser->assign_bool(array(
               'page_exists' => true
               ));
-            $page_title = htmlspecialchars($paths->pages[ $c_page_id ]['name']);
+            $page_title = get_page_title($c_page_id);
           }
           else
           {