jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/360320 )
Change subject: Add extension.json + bump version number, remove old PHP entry
point
......................................................................
Add extension.json + bump version number, remove old PHP entry point
Change-Id: Ie68cd53cab64c11734be4316cd7378379dc923de
---
D OOJsUIAjaxLogin.php
A extension.json
D resources/Resources.php
3 files changed, 58 insertions(+), 97 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/OOJsUIAjaxLogin.php b/OOJsUIAjaxLogin.php
deleted file mode 100644
index 2f61512..0000000
--- a/OOJsUIAjaxLogin.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
-The MIT License (MIT)
-
-Copyright (c) 2015 Florian Schmidt
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 'This is an extension for Mediawiki and can not run standalone.' );
-}
-
-$wgExtensionCredits['other'][] = [
- 'path' => __FILE__,
- 'name' => 'OOJsUIAjaxLogin',
- 'author' => 'Florian Schmidt',
- 'url' => 'https://www.mediawiki.org/wiki/Extension:OOJsUIAjaxLogin',
- 'descriptionmsg' => 'oojsuiajaxlogin-desc',
- 'version' => '0.0.1',
- 'license-name' => "MIT",
-];
-
-// Autoload Classes
-$wgAutoloadClasses['OOJsUIAjaxLoginHooks'] = __DIR__ .
'/includes/OOJsUIAjaxLogin.hooks.php';
-
-// message dir
-$wgMessagesDirs['OOJsUIAjaxLogin'] = __DIR__ . '/i18n';
-
-// Hooks
-$wgHooks['BeforePageDisplay'][] = 'OOJsUIAjaxLoginHooks::onBeforePageDisplay';
-
-require __DIR__ . '/resources/Resources.php';
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..14cce5f
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,58 @@
+{
+ "name": "OOJsUIAjaxLogin",
+ "version": "0.0.2",
+ "author": [
+ "Florian Schmidt"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Extension:OOJsUIAjaxLogin",
+ "descriptionmsg": "oojsuiajaxlogin-desc",
+ "license-name": "MIT",
+ "type": "other",
+ "MessagesDirs": {
+ "OOJsUIAjaxLogin": [
+ "i18n"
+ ]
+ },
+ "AutoloadClasses": {
+ "OOJsUIAjaxLoginHooks": "includes/OOJsUIAjaxLogin.hooks.php"
+ },
+ "Hooks": {
+ "BeforePageDisplay": "OOJsUIAjaxLoginHooks::onBeforePageDisplay"
+ },
+ "ResourceFileModulePaths": {
+ "localBasePath": "resources",
+ "remoteExtPath": "OOJsUIAjaxLogin/resources"
+ },
+ "ResourceModules": {
+ "ext.OOJsUIAjaxLogin.init": {
+ "scripts": "ext.OOJsUIAjaxLogin.init/init.js",
+ "messages": [ "oojsuiajaxlogin-loading" ],
+ "templates": {
+ "loginLink.mustache":
"ext.OOJsUIAjaxLogin.init/loginLink.mustache"
+ }
+ },
+ "ext.OOJsUIAjaxLogin.overlay": {
+ "dependencies": [
+ "oojs-ui",
+ "mediawiki.api",
+ "mediawiki.jqueryMsg"
+ ],
+ "scripts":
"ext.OOJsUIAjaxLogin.overlay/LoginOverlay.js",
+ "styles":
"ext.OOJsUIAjaxLogin.overlay/LoginOverlay.less",
+ "messages": [
+ "login",
+ "wrongpassword",
+ "userlogin-yourname",
+ "userlogin-yourname-ph",
+ "userlogin-yourpassword",
+ "userlogin-yourpassword-ph",
+ "pt-login-button",
+ "userlogin-joinproject",
+ "cancel",
+ "welcomeuser",
+ "unknown-error"
+ ]
+ }
+ },
+ "manifest_version": 1
+}
\ No newline at end of file
diff --git a/resources/Resources.php b/resources/Resources.php
deleted file mode 100644
index 004a003..0000000
--- a/resources/Resources.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// Resource template
-$wgResourceTemplate = [
- 'localBasePath' => __DIR__,
- 'remoteExtPath' => 'OOJsUIAjaxLogin/resources',
-];
-// Resource modules
-$wgResourceModules += [
- 'ext.OOJsUIAjaxLogin.init' => $wgResourceTemplate + [
- 'scripts' => [
- 'ext.OOJsUIAjaxLogin.init/init.js',
- ],
- 'messages' => [
- 'oojsuiajaxlogin-loading',
- ],
- 'templates' => [
- 'loginLink.mustache' =>
'ext.OOJsUIAjaxLogin.init/loginLink.mustache',
- ],
- ],
- 'ext.OOJsUIAjaxLogin.overlay' => $wgResourceTemplate + [
- 'dependencies' => [
- 'oojs-ui',
- 'mediawiki.api',
- 'mediawiki.jqueryMsg',
- ],
- 'scripts' => [
- 'ext.OOJsUIAjaxLogin.overlay/LoginOverlay.js',
- ],
- 'styles' => [
- 'ext.OOJsUIAjaxLogin.overlay/LoginOverlay.less',
- ],
- 'messages' => [
- 'login',
- 'wrongpassword',
- 'userlogin-yourname',
- 'userlogin-yourname-ph',
- 'userlogin-yourpassword',
- 'userlogin-yourpassword-ph',
- 'pt-login-button',
- 'userlogin-joinproject',
- 'cancel',
- 'welcomeuser',
- 'unknown-error',
- ],
- ],
-];
-
-unset( $wgResourceTemplate );
--
To view, visit https://gerrit.wikimedia.org/r/360320
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie68cd53cab64c11734be4316cd7378379dc923de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OOJsUIAjaxLogin
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits