api4 - Fix computation of core path
authorTim Otten <totten@civicrm.org>
Sun, 15 Sep 2019 18:12:52 +0000 (14:12 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 17 Sep 2019 03:11:24 +0000 (23:11 -0400)
commit235e322db6bee7e3fc145322d73aa43b3c94e5c7
tree2024aecc3b8d6612a2ef1148ed62c198bf87c002
parenta2fa26fe0bf44599e9aefd0c6c8d02c720e2b14b
api4 - Fix computation of core path

The `$locations` array mostly contains the paths of *extension PHP files*,
and the subsequent code filters with`dirname()` to strip them out.

Before: The path `/var/www/sites/all/modules/civicrm` was digested to
        `/var/www/sites/all/modules/Civi/Api4/Subscribers`.

After:  The path `/var/www/sites/all/modules/civicrm/Civi.php` is digested
        `/var/www/sites/all/modules/civicrm/Civi/Api4/Subscribers`.
CRM/Api4/Services.php