From 5a5844b84099c56b7883280da73481e6322ef0d8 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 12 Apr 2016 09:13:05 -0700 Subject: [PATCH] Use $wgExtensionDirectory instead of hardcoding $IP/extensions Change-Id: Icf28a218d18df2ba90726f8b5a86621043138e48 --- AbuseFilter.parser.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php index 7fe947bc6..50dea873f 100644 --- a/AbuseFilter.parser.php +++ b/AbuseFilter.parser.php @@ -1679,15 +1679,13 @@ class AbuseFilterParser { static $replacementArray = null; if ( is_null( $replacementArray ) ) { - // @codingStandardsIgnoreStart Ignore global without wg prefix. - global $IP; - // @codingStandardsIgnoreEnd + global $wgExtensionDirectory; - if ( is_readable( "$IP/extensions/AntiSpoof/equivset.php" ) ) { + if ( is_readable( "$wgExtensionDirectory/AntiSpoof/equivset.php" ) ) { // Satisfy analyzer. $equivset = null; // Contains a map of characters in $equivset. - require "$IP/extensions/AntiSpoof/equivset.php"; + require "$wgExtensionDirectory/AntiSpoof/equivset.php"; // strtr in ReplacementArray->replace() doesn't like this. if ( isset( $equivset[''] ) ) {