r22483 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22482‎ | r22483 | r22484 >
Date:22:50, 27 May 2007
Author:david
Status:old
Tags:
Comment:
Hacked Title and SkinTemplate so that talk pages are always known links, and edit tabs are not shown. It'll do for now.
Modified paths:
  • /branches/liquidthreads/includes/SkinTemplate.php (modified) (history)
  • /branches/liquidthreads/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/includes/Title.php
@@ -2409,9 +2409,13 @@
24102410 * Currently, a self-link with a fragment and special pages are in
24112411 * this category. System messages that have defined default values are also
24122412 * always known.
 2413+ *
 2414+ * LQT HACK: Talk pages are also always known.
 2415+ * Should talk pages for non-existant articles be known?
 2416+ * Talk pages with no threads? With only archived threads?
24132417 */
24142418 public function isAlwaysKnown() {
2415 - return ( $this->isExternal() ||
 2419+ return ( $this->isExternal() || $this->mNamespace % 2 ||
24162420 ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) ||
24172421 ( NS_MEDIAWIKI == $this->mNamespace && wfMsgWeirdKey( $this->mDbkeyform ) ) );
24182422 }
Index: branches/liquidthreads/includes/SkinTemplate.php
@@ -668,7 +668,7 @@
669669 true);
670670
671671 wfProfileIn( "$fname-edit" );
672 - if ( $this->mTitle->quickUserCan( 'edit' ) && ( $this->mTitle->exists() || $this->mTitle->quickUserCan( 'create' ) ) ) {
 672+ if ( !$this->mTitle->isTalkPage() /*LQT HACK*/ && $this->mTitle->quickUserCan( 'edit' ) && ( $this->mTitle->exists() || $this->mTitle->quickUserCan( 'create' ) ) ) {
673673 $istalk = $this->mTitle->isTalkPage();
674674 $istalkclass = $istalk?' istalk':'';
675675 $content_actions['edit'] = array(
@@ -684,7 +684,7 @@
685685 'href' => $this->mTitle->getLocalUrl( 'action=edit&section=new' )
686686 );
687687 }
688 - } else {
 688+ } else if ( !$this->mTitle->isTalkPage() /*LQT HACK*/ ) {
689689 $content_actions['viewsource'] = array(
690690 'class' => ($action == 'edit') ? 'selected' : false,
691691 'text' => wfMsg('viewsource'),