Jayprakash12345 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/405749 )
Change subject: Convert DeviceMapLogCapture to use Extenstion Reg
......................................................................
Convert DeviceMapLogCapture to use Extenstion Reg
Bug: T185518
Change-Id: I1082dea899bec8e0432b8ca4b4faeb63f4a16e87
---
M DeviceMapLogCapture.php
A extension.json
2 files changed, 35 insertions(+), 20 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DeviceMapLogCapture
refs/changes/49/405749/1
diff --git a/DeviceMapLogCapture.php b/DeviceMapLogCapture.php
index 9d4ba82..380117d 100644
--- a/DeviceMapLogCapture.php
+++ b/DeviceMapLogCapture.php
@@ -19,24 +19,16 @@
under the License.
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 'This is not a valid entry point to MediaWiki.' );
+if ( function_exists( 'wfLoadExtension' ) ) {
+ wfLoadExtension( 'DeviceMapLogCapture' );
+ // Keep i18n globals so mergeMessageFileList.php doesn't break
+ $wgMessagesDirs['DeviceMapLogCapture'] = __DIR__ . '/i18n';
+ wfWarn(
+ 'Deprecated PHP entry point used for the DeviceMapLogCapture
extension. ' .
+ 'Please use wfLoadExtension instead, ' .
+ 'see https://www.mediawiki.org/wiki/Extension_registration for
more details.'
+ );
+ return;
+} else {
+ die( 'This version of the DeviceMapLogCapture extension requires
MediaWiki 1.29+' );
}
-
-$wgExtensionCredits['other'][] = array(
- 'path' => __FILE__,
- 'name' => 'Device Map Log Capture',
- 'author' => 'Patrick Reilly',
- 'version' => '0.0.1',
- 'url' => 'https://www.mediawiki.org/wiki/Extension:DeviceMapLogCapture'
-);
-
-$dir = dirname( __FILE__ ) . '/';
-$wgAutoloadClasses['DeviceMapLogCaptureHooks'] = $dir .
'DeviceMapLogCapture.hooks.php';
-$wgAutoloadClasses['ApiDeviceMapLogCapture'] = $dir .
'ApiDeviceMapLogCapture.php';
-
-
-$wgHooks['LoadExtensionSchemaUpdates'][] =
'DeviceMapLogCaptureHooks::loadExtensionSchemaUpdates';
-$wgAPIModules['devicemaplogcapture'] = 'ApiDeviceMapLogCapture';
-
-$wgMessagesDirs['DeviceMapLogCapture'] = __DIR__ . '/i18n';
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..9c83434
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,23 @@
+{
+ "name": "Device Map Log Capture",
+ "version": "0.0.1",
+ "author": "Patrick Reilly",
+ "url": "https://www.mediawiki.org/wiki/Extension:DeviceMapLogCapture",
+ "type": "other",
+ "APIModules": {
+ "devicemaplogcapture": "ApiDeviceMapLogCapture"
+ },
+ "MessagesDirs": {
+ "DeviceMapLogCapture": [
+ "i18n"
+ ]
+ },
+ "AutoloadClasses": {
+ "DeviceMapLogCaptureHooks": "DeviceMapLogCapture.hooks.php",
+ "ApiDeviceMapLogCapture": "ApiDeviceMapLogCapture.php"
+ },
+ "Hooks": {
+ "LoadExtensionSchemaUpdates":
"DeviceMapLogCaptureHooks::loadExtensionSchemaUpdates"
+ },
+ "manifest_version": 2
+}
--
To view, visit https://gerrit.wikimedia.org/r/405749
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1082dea899bec8e0432b8ca4b4faeb63f4a16e87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DeviceMapLogCapture
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits