Use $wgExtensionDirectory instead of hardcoding $IP/extensions

Change-Id: Icf28a218d18df2ba90726f8b5a86621043138e48
This commit is contained in:
Kunal Mehta 2016-04-12 09:13:05 -07:00
parent e00909b3c3
commit 5a5844b840

View file

@ -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[''] ) ) {