Thiemo Mättig (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395723 )
Change subject: Point $wgExtensionCredits paths to files instead of directories ...................................................................... Point $wgExtensionCredits paths to files instead of directories This directly follows I2f258ac, which partly solved a problem, and partly made it worse. Most (but not all) code in core assumes the "path" points to a regular file, and strips the last part via dirname(). That's why __DIR__ appears work. dirname() strips "repo/", "client/", "lib/" and "view/", and what's left is the Wikibase root directory, where .git/ and CREDITS can be found. Unfortunately there is also code in core that checks the "path" with is_dir() first. https://www.mediawiki.org/wiki/Manual:$wgExtensionCredits suggests to point to the extension.json file in the root directory, but that doesn't exist here. Pointing to Wikibase.php instead would be possible, but this is a testing entry point. Please also review I9bb5970 which fixes the inconsistent behavior in core. Bug: T181977 Change-Id: I9f49574c2793d73f6a00f9f9888392ca2c30d5d3 --- M client/WikibaseClient.php M lib/WikibaseLib.php M repo/Wikibase.php M view/init.mw.php 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/23/395723/1 diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 0afc343..022eeba 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -98,7 +98,7 @@ $wgWBClientSettings; $wgExtensionCredits['wikibase'][] = array( - 'path' => __DIR__, + 'path' => __DIR__ . '/../README.md', 'name' => 'Wikibase Client', 'author' => array( 'The Wikidata team', diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php index bc811b6..05ebe0d 100644 --- a/lib/WikibaseLib.php +++ b/lib/WikibaseLib.php @@ -67,7 +67,7 @@ global $wgExtensionCredits, $wgHooks, $wgResourceModules, $wgMessagesDirs; $wgExtensionCredits['wikibase'][] = [ - 'path' => __DIR__, + 'path' => __DIR__ . '/../README.md', 'name' => 'WikibaseLib', 'author' => [ 'The Wikidata team', diff --git a/repo/Wikibase.php b/repo/Wikibase.php index d87bb096..de20d92 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -97,7 +97,7 @@ $wgWBRepoSettings; $wgExtensionCredits['wikibase'][] = [ - 'path' => __DIR__, + 'path' => __DIR__ . '/../README.md', 'name' => 'Wikibase Repository', 'author' => [ 'The Wikidata team', diff --git a/view/init.mw.php b/view/init.mw.php index 82f9459..c90f4bf 100644 --- a/view/init.mw.php +++ b/view/init.mw.php @@ -5,7 +5,7 @@ } $GLOBALS['wgExtensionCredits']['wikibase'][] = [ - 'path' => __DIR__, + 'path' => __DIR__ . '/../README.md', 'name' => 'Wikibase View', 'author' => [ 'The Wikidata team', -- To view, visit https://gerrit.wikimedia.org/r/395723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f49574c2793d73f6a00f9f9888392ca2c30d5d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.kr...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits