* (bug 829) Fix URL-escaping on block success
[lhc/web/wiklou.git] / includes / SkinTemplate.php
index c3ac8de..3289c5f 100644 (file)
@@ -485,9 +485,16 @@ class SkinTemplate extends Skin {
                        $nskey = $this->getNameSpaceKey();
                        $is_active = !Namespace::isTalk( $wgTitle->getNamespace()) ;
                        if ( $action == 'validate' ) $is_active = false ; # Show article tab deselected when validating
-                       $content_actions[$nskey] = array('class' => ($is_active) ? 'selected' : false,
-                       'text' => wfMsg($nskey),
-                       'href' => $this->makeArticleUrl($this->thispage));
+
+                       $subjectTitle = $wgTitle->getSubjectPage();
+                       if( $subjectTitle->getArticleId() != 0 ) {
+                               $class = ($is_active) ? 'selected' : false;
+                       } else {
+                               $class = ($is_active) ? 'selected new' : 'new';
+                       }
+                       $content_actions[$nskey] = array('class' => $class,
+                                                        'text' => wfMsg($nskey),
+                                                        'href' => $this->makeArticleUrl($this->thispage));
 
                        /* set up the classes for the talk link */
                        wfProfileIn( "$fname-talk" );
@@ -916,6 +923,8 @@ class SkinTemplate extends Skin {
 /**
  * Generic wrapper for template functions, with interface
  * compatible with what we use of PHPTAL 0.7.
+ * @package MediaWiki
+ * @subpackage Skins
  */
 class QuickTemplate {
        /**
@@ -1013,4 +1022,4 @@ class QuickTemplate {
 }
 
 } // end of if( defined( 'MEDIAWIKI' ) ) 
-?>
+?>
\ No newline at end of file