Index: trunk/extensions/LiquidThreads/LqtFunctions.php |
— | — | @@ -114,3 +114,14 @@ |
115 | 115 | |
116 | 116 | return true; |
117 | 117 | } |
| 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 @@ |
51 | 51 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'LqtDispatch::setNewtalkHTML'; |
52 | 52 | $wgHooks['TitleGetRestrictions'][] = 'Thread::getRestrictionsForTitle'; |
53 | 53 | $wgHooks['GetPreferences'][] = 'lqtGetPreferences'; |
| 54 | +$wgHooks['ArticleEditUpdateNewTalk'][] = 'lqtUpdateNewtalkOnEdit'; |
54 | 55 | |
55 | 56 | // Special pages |
56 | 57 | $wgSpecialPages['DeleteThread'] = 'SpecialDeleteThread'; |