r64374 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64373‎ | r64374 | r64375 >
Date:01:20, 30 March 2010
Author:conrad
Status:ok
Tags:
Comment:
Fixes for PHP 5.3.2's reference-sensitivity
Modified paths:
  • /trunk/extensions/MetaKeywords/MetaKeywords.php (modified) (history)
  • /trunk/extensions/Transliterator/Transliterator.php (modified) (history)
  • /trunk/extensions/Transliterator/Transliterator_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetaKeywords/MetaKeywords.php
@@ -116,7 +116,7 @@
117117 }
118118
119119 //Updates the cache if [[MediaWiki:Metakeywords]] or [[MediaWiki:Metadescription]] has been edited
120 -function wfMetaKeywordClearCache( &$article, &$wgUser, &$text ) {
 120+function wfMetaKeywordClearCache( &$article, &$wgUser, $text ) {
121121 global $wgMemc;
122122 $title = $article->mTitle;
123123
Index: trunk/extensions/Transliterator/Transliterator_body.php
@@ -525,7 +525,7 @@
526526
527527 /**
528528 * Remove the article from the Transliterator caches.
529 - * (ArticlePurge, ArticleDeleteComplete, NewRevisionFromEditComplete hooks)
 529+ * (ArticlePurge, ArticleDeleteComplete)
530530 */
531531 static function purgeArticle( &$article ) {
532532 $title = $article->getTitle();
@@ -533,10 +533,19 @@
534534 }
535535
536536 /**
 537+ * Remove the article from the Transliterator caches.
 538+ * (NewRevisionFromEditComplete)
 539+ */
 540+ static function purgeArticleNewRevision( $article ) {
 541+ $title = $article->getTitle();
 542+ return self::purgeTitle( $title );
 543+ }
 544+
 545+ /**
537546 * Remove the title from the Transliterator caches.
538547 * (TitleMoveComplete hook)
539548 */
540 - static function purgeNewTitle ( &$title, &$newtitle ) {
 549+ static function purgeNewTitle( &$title, &$newtitle ) {
541550 return self::purgeTitle( $newtitle );
542551 }
543552
@@ -560,7 +569,7 @@
561570 *
562571 * (EditFilter hook)
563572 */
564 - static function validate( &$editPage, $text, $section, &$hookError ) {
 573+ static function validate( $editPage, $text, $section, &$hookError ) {
565574 // FIXME: Should not access private variables
566575 $title = $editPage->mTitle;
567576 if ( self::isMapPage( $title ) ) {
@@ -576,7 +585,7 @@
577586 * Prepend any error message caused by parsing the text for preview.
578587 * (EditPageGetPreviewText hook)
579588 */
580 - static function preview( &$editPage, $text ) {
 589+ static function preview( $editPage, &$text ) {
581590 self::validate( $editPage, $text, null, $hookError );
582591 if ( $hookError ) {
583592 $text = $hookError . "\n----\n" . $text;
Index: trunk/extensions/Transliterator/Transliterator.php
@@ -36,7 +36,7 @@
3737 $wgHooks['ParserFirstCallInit'][] = 'ExtTransliterator::setup';
3838 # Purge the cache for as many cases as I can find.
3939 $wgHooks['ArticleDeleteComplete'][] = 'ExtTransliterator::purgeArticle';
40 -$wgHooks['NewRevisionFromEditComplete'][] = 'ExtTransliterator::purgeArticle';
 40+$wgHooks['NewRevisionFromEditComplete'][] = 'ExtTransliterator::purgeArticleNewRevision';
4141 $wgHooks['ArticlePurge'][] = 'ExtTransliterator::purgeArticle';
4242 $wgHooks['ArticleUndelete'][] = 'ExtTransliterator::purgeTitle';
4343 $wgHooks['TitleMoveComplete'][] = 'ExtTransliterator::purgeNewtitle';

Status & tagging log