r76378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76377‎ | r76378 | r76379 >
Date:05:15, 9 November 2010
Author:werdna
Status:deferred
Tags:
Comment:
Fix for bug 22652: Remove almost all of the navigation tabs when a "no such thread" error page appears
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -54,7 +54,16 @@
5555 }
5656
5757 static function customizeThreadNavigation( $skin, &$links, $view ) {
 58+ $tempTitle = Title::makeTitle( NS_LQT_THREAD, 'A' );
 59+ $talkKey = $tempTitle->getNamespaceKey( '' ) . '_talk';
 60+
5861 if ( !$view->thread ) {
 62+ unset( $links['views']['edit'] );
 63+ unset( $links['views']['history'] );
 64+
 65+ $links['actions'] = array();
 66+
 67+ unset( $links['namespaces'][$talkKey] );
5968 return true;
6069 }
6170
@@ -63,7 +72,6 @@
6473
6574 $nstabs =& $links['namespaces'];
6675
67 - $talkKey = $view->thread->title()->getNamespaceKey( '' ) . '_talk';
6876 unset( $nstabs[$talkKey] );
6977 $nstabs = $new_nstabs + $nstabs;
7078

Status & tagging log