r52051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52050‎ | r52051 | r52052 >
Date:15:22, 17 June 2009
Author:werdna
Status:deferred
Tags:
Comment:
Don't set newtalk for edits to user talk page headers. It's not a 'new message' anymore, it's just like editing their userpage.
Modified paths:
  • /trunk/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/LqtFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LqtFunctions.php
@@ -114,3 +114,14 @@
115115
116116 return true;
117117 }
 118+
 119+function lqtUpdateNewtalkOnEdit( $article ) {
 120+ $title = $article->getTitle();
 121+
 122+ if ( LqtDispatch::isLqtPage( $title ) ) {
 123+ // They're only editing the header, don't update newtalk.
 124+ return false;
 125+ }
 126+
 127+ return true;
 128+}
Index: trunk/extensions/LiquidThreads/LiquidThreads.php
@@ -50,6 +50,7 @@
5151 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'LqtDispatch::setNewtalkHTML';
5252 $wgHooks['TitleGetRestrictions'][] = 'Thread::getRestrictionsForTitle';
5353 $wgHooks['GetPreferences'][] = 'lqtGetPreferences';
 54+$wgHooks['ArticleEditUpdateNewTalk'][] = 'lqtUpdateNewtalkOnEdit';
5455
5556 // Special pages
5657 $wgSpecialPages['DeleteThread'] = 'SpecialDeleteThread';

Status & tagging log