From: Ricordisamoa Date: Wed, 10 Feb 2016 23:29:22 +0000 (+0100) Subject: Stop doing $that = $this in includes/specialpage X-Git-Tag: 1.31.0-rc.0~8004^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=0455368c0c80db2e48daa62e857e3e7c2d6e9d4d;p=lhc%2Fweb%2Fwiklou.git Stop doing $that = $this in includes/specialpage Closures support $this as of PHP 5.4 Change-Id: Ib586150a50751873e9c3d12239f6ff8adedf70af --- diff --git a/includes/specialpage/QueryPage.php b/includes/specialpage/QueryPage.php index 27e645afcb..bb26cf34f2 100644 --- a/includes/specialpage/QueryPage.php +++ b/includes/specialpage/QueryPage.php @@ -336,13 +336,12 @@ abstract class QueryPage extends SpecialPage { ); } - $that = $this; $dbw->doAtomicSection( __METHOD__, - function ( IDatabase $dbw, $fname ) use ( $that, $vals ) { + function ( IDatabase $dbw, $fname ) use ( $vals ) { # Clear out any old cached data $dbw->delete( 'querycache', - array( 'qc_type' => $that->getName() ), + array( 'qc_type' => $this->getName() ), $fname ); # Save results into the querycache table on the master @@ -351,11 +350,11 @@ abstract class QueryPage extends SpecialPage { } # Update the querycache_info record for the page $dbw->delete( 'querycache_info', - array( 'qci_type' => $that->getName() ), + array( 'qci_type' => $this->getName() ), $fname ); $dbw->insert( 'querycache_info', - array( 'qci_type' => $that->getName(), + array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ), $fname );