From: Gabriel Wicke Date: Thu, 15 Apr 2004 11:22:36 +0000 (+0000) Subject: link to non-existant talk page is edit link now X-Git-Tag: 1.3.0beta1~434 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=72aa82ff94bdc63b68c9ac7507933bb6f9b51e66;p=lhc%2Fweb%2Fwiklou.git link to non-existant talk page is edit link now --- diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index ad1981e7bb..d6b18c88a0 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -223,15 +223,24 @@ $talk_class = (Namespace::isTalk( $wgTitle->getNamespace()) ? 'selected' : ''); $talktitle = Title::newFromText( $this->titletxt ); $talktitle = $talktitle->getTalkPage(); - $this->checkTitle(&$title, &$name); - $talk_class .= ($talktitle->getArticleId() != 0 ? '':' new'); - $content_actions['talk'] = array( - 'class' => $talk_class, - 'text' => wfMsg('talk'), - 'href' => $this->makeTalkUrl($this->titletxt), - 'ttip' => wfMsg('tooltip-talk'), - 'akey' => wfMsg('accesskey-talk') - ); + $this->checkTitle(&$talktitle, &$this->titletxt); + if($talktitle->getArticleId() != 0) { + $content_actions['talk'] = array( + 'class' => $talk_class, + 'text' => wfMsg('talk'), + 'href' => $this->makeTalkUrl($this->titletxt), + 'ttip' => wfMsg('tooltip-talk'), + 'akey' => wfMsg('accesskey-talk') + ); + } else { + $content_actions['talk'] = array( + 'class' => $talk_class.' new', + 'text' => wfMsg('talk'), + 'href' => $this->makeTalkUrl($this->titletxt,'action=edit'), + 'ttip' => wfMsg('tooltip-talk'), + 'akey' => wfMsg('accesskey-talk') + ); + } if ( $wgTitle->userCanEdit() ) { $oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';