From: Alexandre Emsenhuber Date: Wed, 21 Dec 2011 18:46:39 +0000 (+0000) Subject: Use LinkCache::singleton()->clear() instead of using a local variable so that I can... X-Git-Tag: 1.31.0-rc.0~25830 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=705c7d395186312dda98f36c68198f51817d66ed;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 );