From 0455368c0c80db2e48daa62e857e3e7c2d6e9d4d Mon Sep 17 00:00:00 2001 From: Ricordisamoa Date: Thu, 11 Feb 2016 00:29:22 +0100 Subject: [PATCH] Stop doing $that = $this in includes/specialpage Closures support $this as of PHP 5.4 Change-Id: Ib586150a50751873e9c3d12239f6ff8adedf70af --- includes/specialpage/QueryPage.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 ); -- 2.20.1