From 705c7d395186312dda98f36c68198f51817d66ed Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 21 Dec 2011 18:46:39 +0000 Subject: [PATCH] Use LinkCache::singleton()->clear() instead of using a local variable so that I can see what LinkCache::singleton() will be used for directly in grep --- maintenance/cleanupTitles.php | 3 +-- tests/phpunit/includes/search/SearchEngineTest.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index f03b79576b..4fc6415e51 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -145,8 +145,7 @@ class TitleCleanup extends TableCleanup { ), array( 'page_id' => $row->page_id ), __METHOD__ ); - $linkCache = LinkCache::singleton(); - $linkCache->clear(); + LinkCache::singleton()->clear(); } } } diff --git a/tests/phpunit/includes/search/SearchEngineTest.php b/tests/phpunit/includes/search/SearchEngineTest.php index 4cb68d5083..c1bf1343b3 100644 --- a/tests/phpunit/includes/search/SearchEngineTest.php +++ b/tests/phpunit/includes/search/SearchEngineTest.php @@ -91,8 +91,7 @@ class SearchEngineTest extends MediaWikiTestCase { $comment = 'Search Test'; // avoid memory leak...? - $linkCache = LinkCache::singleton(); - $linkCache->clear(); + LinkCache::singleton()->clear(); $article = new Article( $title ); $article->doEdit( $text, $comment, 0, false, $user ); -- 2.20.1