jenkins-bot has submitted this change and it was merged.
Change subject: Add extension.json, empty PHP entry point
......................................................................
Add extension.json, empty PHP entry point
Bug: T87914
Change-Id: Icfa224569327f0ad6ae952ff91d1d084aaba240d
---
M FeaturedFeeds.php
A extension.json
2 files changed, 62 insertions(+), 50 deletions(-)
Approvals:
Paladox: Looks good to me, but someone else must approve
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/FeaturedFeeds.php b/FeaturedFeeds.php
index ef20850..185006d 100644
--- a/FeaturedFeeds.php
+++ b/FeaturedFeeds.php
@@ -1,52 +1,14 @@
<?php
-/*
- * Featured Feed extension by Max Semenik.
- * License: WTFPL 2.0
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 'Not a valid entry point' );
+if ( function_exists( 'wfLoadExtension' ) ) {
+ wfLoadExtension( 'FeaturedFeeds' );
+ // Keep i18n globals so mergeMessageFileList.php doesn't break
+ $wgMessagesDirs['FeaturedFeeds'] = __DIR__ . '/i18n';
+ $wgExtensionMessagesFiles['FeaturedFeedsAliases'] = __DIR__ .
'/FeaturedFeeds.alias.php';
+ /* wfWarn(
+ 'Deprecated PHP entry point used for FeaturedFeeds extension.
Please use wfLoadExtension instead, ' .
+ 'see https://www.mediawiki.org/wiki/Extension_registration for
more details.'
+ ); */
+ return;
+} else {
+ die( 'This version of the FeaturedFeeds extension requires MediaWiki
1.25+' );
}
-
-$wgExtensionCredits['other'][] = array(
- 'path' => __FILE__,
- 'name' => 'FeaturedFeeds',
- 'author' => array( 'Max Semenik' ),
- 'url' => 'https://www.mediawiki.org/wiki/Extension:FeaturedFeeds',
- 'descriptionmsg' => 'ffeed-desc',
-);
-
-$wgAutoloadClasses['ApiFeaturedFeeds'] = __DIR__ . '/ApiFeaturedFeeds.php';
-$wgAutoloadClasses['FeaturedFeeds'] = __DIR__ . '/FeaturedFeeds.body.php';
-$wgAutoloadClasses['FeaturedFeedChannel'] = __DIR__ .
'/FeaturedFeeds.body.php';
-$wgAutoloadClasses['FeaturedFeedItem'] = __DIR__ . '/FeaturedFeeds.body.php';
-$wgAutoloadClasses['SpecialFeedItem'] = __DIR__ . '/SpecialFeedItem.php';
-
-$wgMessagesDirs['FeaturedFeeds'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['FeaturedFeeds'] = __DIR__ .
'/FeaturedFeeds.i18n.php';
-$wgExtensionMessagesFiles['FeaturedFeedsAliases'] = __DIR__ .
'/FeaturedFeeds.alias.php';
-
-$wgSpecialPages['FeedItem'] = 'SpecialFeedItem';
-
-$wgAPIModules['featuredfeed'] = 'ApiFeaturedFeeds';
-
-$wgHooks['ArticleSaveComplete'][] = 'FeaturedFeeds::articleSaveComplete';
-$wgHooks['BeforePageDisplay'][] = 'FeaturedFeeds::beforePageDisplay';
-$wgHooks['SkinTemplateOutputPageBeforeExec'][] =
'FeaturedFeeds::skinTemplateOutputPageBeforeExec';
-
-/**
- * Configuration settings
- */
-
-$wgFeaturedFeedsDefaults = array(
- 'limit' => 10,
- 'frequency' => 'daily',
- 'inUserLanguage' => false,
-);
-
-$wgFeaturedFeeds = array();
-
-/**
- * Whether links to feeds should appear in sidebar
- */
-$wgDisplayFeedsInSidebar = true;
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..e824fa2
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,50 @@
+{
+ "name": "FeaturedFeeds",
+ "author": [
+ "Max Semenik"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Extension:FeaturedFeeds",
+ "descriptionmsg": "ffeed-desc",
+ "type": "other",
+ "ExtensionMessagesFiles": {
+ "FeaturedFeedsAliases": "FeaturedFeeds.alias.php"
+ },
+ "APIModules": {
+ "featuredfeed": "ApiFeaturedFeeds"
+ },
+ "Hooks": {
+ "ArticleSaveComplete": [
+ "FeaturedFeeds::articleSaveComplete"
+ ],
+ "BeforePageDisplay": [
+ "FeaturedFeeds::beforePageDisplay"
+ ],
+ "SkinTemplateOutputPageBeforeExec": [
+ "FeaturedFeeds::skinTemplateOutputPageBeforeExec"
+ ]
+ },
+ "MessagesDirs": {
+ "FeaturedFeeds": [
+ "i18n"
+ ]
+ },
+ "config": {
+ "DisplayFeedsInSidebar": true,
+ "FeaturedFeedsDefaults": {
+ "limit": 10,
+ "frequency": "daily",
+ "inUserLanguage": false
+ },
+ "FeaturedFeeds": {}
+ },
+ "SpecialPages": {
+ "FeedItem": "SpecialFeedItem"
+ },
+ "AutoloadClasses": {
+ "ApiFeaturedFeeds": "ApiFeaturedFeeds.php",
+ "FeaturedFeeds": "FeaturedFeeds.body.php",
+ "FeaturedFeedChannel": "FeaturedFeeds.body.php",
+ "FeaturedFeedItem": "FeaturedFeeds.body.php",
+ "SpecialFeedItem": "SpecialFeedItem.php"
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/194285
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icfa224569327f0ad6ae952ff91d1d084aaba240d
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/FeaturedFeeds
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits