Last modified: 2014-03-10 23:21:57 UTC
+++ This bug was initially created as a clone of Bug #62486 +++ The Compatibility ( http://www.mediawiki.org/wiki/Compatibility ) page states that MediaWiki 1.19.x branch is compatible with PHP 5.2.3+ The core extensions ConfirmEdit, Gadgets and Renameuser use the __DIR__ magic constant that is available in PHP 5.3.0+ only. Had to use the following command as a temporary fix: find . -type f -exec sed -i 's/__DIR__/dirname(__FILE__)/g' {} \;
Are you sure you are using the REL1_19 branch? https://github.com/wikimedia/mediawiki-extensions-Gadgets/tree/REL1_19 reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/Gadgets$ git checkout 9fa08638e6b6c2f790b41e19356daee3a67b8d0b Note: checking out '9fa08638e6b6c2f790b41e19356daee3a67b8d0b'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 9fa0863... Use https for the description page URL reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/Gadgets$ grep __DIR__ * reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/Gadgets$
I went to https://www.mediawiki.org/wiki/Download and downloaded the 1.19.12 tarball: $:andre\> pwd /home/andre/mediawiki-1.19.12/extensions/Gadgets $:andre\> grep __DIR__ * GadgetHooks.php: $testDir = __DIR__ . '/tests/'; grep: tests: Is a directory
Sigh. So this is a bug in the tarball but not in the code repository of the extension... Workaround is to manually get the extension code from Git, I guess. Closing as INVALID here for the code repository; tracking the problem with the tarballs in bug 62101. Maxim: Thanks for catching this. :-/