ApiBase::getModuleSourceInfo(): Use $wgExtensionDirectory
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 13 Dec 2015 03:45:43 +0000 (19:45 -0800)
committerTim Starling <tstarling@wikimedia.org>
Wed, 17 Aug 2016 04:02:42 +0000 (04:02 +0000)
commit9f84ca772dd1a40c15f86553c270cb94133493a7
tree00702f66228cb0e13e574ab3028a101d9dbedcb5
parentb8a41ea451aa22a5d34e882349992bddfc69f8ba
ApiBase::getModuleSourceInfo(): Use $wgExtensionDirectory

This function takes the class file path, and iterates up through its
parent directories until it hits either a registered extension, or $IP
(for core) or $IP/extensions (for an unknown extension). This change
adds $wgExtensionDirectory as another iteration stopper, so that
unregistered extensions in $wgExtensionDirectory will not cause
iteration back up to the filesystem root, or to $IP if
$wgExtensionDirectory is a child of $IP other than $IP/extensions.

Change-Id: I06553591b0b6156e945aad5176479eb71517e77d
includes/api/ApiBase.php