From 84d5cd33a27fbcac34c31a5bbc6f1d26b67cfef2 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 14 Oct 2013 21:39:35 +0200 Subject: [PATCH 1/2] Remove unused local variables Change-Id: If708a112ae6df070da19f52682f0e2b19fe67959 --- AbuseFilter.class.php | 2 +- AbuseFilter.hooks.php | 2 +- AbuseFilter.parser.php | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index aa53692f8..9fc566453 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -974,7 +974,7 @@ class AbuseFilter { $local_log_ids = array(); global $wgAbuseFilterNotifications, $wgAbuseFilterNotificationsPrivate; - foreach ( $log_rows as $index => $data ) { + foreach ( $log_rows as $data ) { $data['afl_var_dump'] = $var_dump; $data['afl_id'] = $dbw->nextSequenceValue( 'abuse_filter_log_afl_id_seq' ); $dbw->insert( 'abuse_filter_log', $data, __METHOD__ ); diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php index c0424528b..42c362d46 100644 --- a/AbuseFilter.hooks.php +++ b/AbuseFilter.hooks.php @@ -29,7 +29,7 @@ class AbuseFilterHooks { // poor man's PST, see bug 20310 $text = str_replace( "\r\n", "\n", $text ); - $continue = self::filterEdit( $context, null, $text, $status, $summary, $minoredit ); + self::filterEdit( $context, null, $text, $status, $summary, $minoredit ); if ( !$status->isOK() ) { $msg = $status->getErrorsArray(); diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php index 13c542836..5b77a98e3 100644 --- a/AbuseFilter.parser.php +++ b/AbuseFilter.parser.php @@ -707,8 +707,7 @@ class AbuseFilterParser { */ protected function move( ) { wfProfileIn( __METHOD__ ); - list( $val, $type, $code, $offset ) = - self::nextToken( $this->mCode, $this->mPos ); + list( $val, $type, , $offset ) = self::nextToken( $this->mCode, $this->mPos ); $token = new AFPToken( $type, $val, $this->mPos ); $this->mPos = $offset; From 153c2857582d1587dfaa663fb40dd274630abe4a Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 14 Oct 2013 21:45:02 +0200 Subject: [PATCH 2/2] Update comments and satisfy analyzer Change-Id: I7d8ddaa61ca8a521a98fc10237df27a11a5bbe85 --- AbuseFilter.parser.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php index 5b77a98e3..d36b63468 100644 --- a/AbuseFilter.parser.php +++ b/AbuseFilter.parser.php @@ -1930,6 +1930,9 @@ class AbuseFilterParser { if ( is_null( $replacementArray ) ) { global $IP; if ( is_readable( "$IP/extensions/AntiSpoof/equivset.php" ) ) { + // Satisfy analyzer. + $equivset = null; + // Contains a map of characters in $equivset. require "$IP/extensions/AntiSpoof/equivset.php"; $replacementArray = new ReplacementArray( $equivset ); } else {