From: Jens Frank Date: Thu, 27 Jan 2005 21:48:11 +0000 (+0000) Subject: BUG#1402 Make link color of tab subject page link on talk page indicate whether artic... X-Git-Tag: 1.5.0alpha1~837 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=deba2f9f59119959025f7aead39c03951be08648;p=lhc%2Fweb%2Fwiklou.git BUG#1402 Make link color of tab subject page link on talk page indicate whether article exists --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index c54f7f1baf..3289c5f352 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -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" );