MarkAHershberger has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/367125 )
Change subject: Convert to extension registration
......................................................................
Convert to extension registration
Also add some files that will help me work on this.
Change-Id: Ife9a3f5ea77baee80d6fad5cef420432e45d3deb
---
A .dir-locals.el
M .gitignore
D UserGroups.php
A extension.json
4 files changed, 147 insertions(+), 66 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserGroups
refs/changes/25/367125/1
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..ac271a9
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,89 @@
+((nil . ((mode . flycheck)
+ (mode . company)
+ (mode . edep)
+ (mode . subword)
+ (tab-width . 4)
+ (c-basic-offset . 4)
+ (indent-tabs-mode . t)
+ (lice:default-license . "gpl-3.0")
+ (eval . (progn (when (fboundp 'delete-trailing-whitespace)
+ (delete-trailing-whitespace))
+ (tabify (point-min)
(point-max))))
+ (c-hanging-braces-alist
+ (defun-open after)
+ (block-open after)
+ (defun-close))
+ (c-offsets-alist . (
+ (access-label . -)
+ (annotation-top-cont .
0)
+ (annotation-var-cont .
+)
+ (arglist-close .
php-lineup-arglist-close)
+ (arglist-cont-nonempty
first
+
php-lineup-cascaded-calls
+
c-lineup-arglist)
+ (arglist-intro .
php-lineup-arglist-intro)
+ (block-close . 0)
+ (block-open . 0)
+ (brace-entry-open . 0)
+ (brace-list-close . 0)
+ (brace-list-entry . 0)
+ (brace-list-intro . +)
+ (brace-list-open . 0)
+ (c .
c-lineup-C-comments)
+ (case-label . 0)
+ (catch-clause . 0)
+ (class-close . 0)
+ (comment-intro . 0)
+ (composition-close . 0)
+ (composition-open . 0)
+ (cpp-define-intro
c-lineup-cpp-define +)
+ (cpp-macro . [0])
+ (cpp-macro-cont . +)
+ (defun-block-intro . +)
+ (defun-close . 0)
+ (defun-open . 0)
+ (do-while-closure . 0)
+ (else-clause . 0)
+ (extern-lang-close . 0)
+ (extern-lang-open . 0)
+ (friend . 0)
+ (func-decl-cont . +)
+ (inclass . +)
+ (incomposition . +)
+ (inexpr-class . +)
+ (inexpr-statement . +)
+ (inextern-lang . +)
+ (inher-cont .
c-lineup-multi-inher)
+ (inher-intro . +)
+ (inlambda . 0)
+ (inline-close . 0)
+ (inline-open . 0)
+ (inmodule . +)
+ (innamespace . +)
+ (knr-argdecl . 0)
+ (knr-argdecl-intro . +)
+ (label . +)
+ (lambda-intro-cont . +)
+ (member-init-cont .
c-lineup-multi-inher)
+ (member-init-intro . +)
+ (module-close . 0)
+ (module-open . 0)
+ (namespace-close . 0)
+ (namespace-open . 0)
+ (statement . 0)
+ (statement-block-intro
. +)
+ (statement-case-intro
. +)
+ (statement-case-open .
0)
+ (statement-cont first
+
php-lineup-cascaded-calls
+
php-lineup-string-cont +)
+ (stream-op .
c-lineup-streamop)
+ (string .
c-lineup-dont-change)
+ (substatement . +)
+ (substatement-label .
2)
+ (substatement-open . 0)
+ (template-args-cont
c-lineup-template-args +)
+ (topmost-intro . 0)
+ (topmost-intro-cont
first php-lineup-cascaded-calls +)
+ ))
+ )))
diff --git a/.gitignore b/.gitignore
index e339590..40ae361 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,8 @@
*~
*.kate-swp
.*.swp
+\#*#
+.#*
+.tramp_history
+
+PHPTAGS.sqlite
diff --git a/UserGroups.php b/UserGroups.php
deleted file mode 100644
index eba54a4..0000000
--- a/UserGroups.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * Extension to provide finer control over user groups and rights.
- *
- * Copyright © 2014 Withoutaname
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Extensions
- * @author Withoutaname
- * @link https://www.mediawiki.org/wiki/Extension:UserGroups Documentation
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
- */
-if ( !defined( 'MEDIAWIKI' ) ) {
- echo <<<EOT
-To use this extension, please include the following line in your
LocalSettings.php:
-require_once( "\$IP/extensions/UserGroups/UserGroups.php" );
-EOT;
- exit( 1 );
-}
-
-$wgExtensionCredits['other'][] = array(
- 'author' => 'Withoutaname',
- 'descriptionmsg' => 'usergroups-desc',
- 'name' => 'UserGroups',
- 'path' => __FILE__,
- 'url' => 'https://www.mediawiki.org/wiki/Extension:UserGroups',
- 'version' => '1.0.0',
- 'license-name' => 'GPL-2.0+',
-);
-
-// For internationalization
-$wgExtensionMessagesFiles['SpecialUserGroupsAliases'] = __DIR__ .
'/UserGroups.alias.php';
-$wgLogTypes[] = 'usergroups';
-$wgLogNames['usergroups'] = 'usergroups-log-name';
-$wgLogHeaders['usergroups'] = 'usergroups-log-header';
-$wgLogActionsHandlers['usergroups/*'] = 'LogFormatter';
-$wgMessagesDirs['UserGroups'] = __DIR__ . '/i18n';
-$wgSpecialPages['UserGroups'] = 'SpecialUserGroups';
-
-// For autoloading
-$wgAutoloadClasses['AddUserGroup'] = __DIR__ . '/addUserGroup.php';
-$wgAutoloadClasses['SpecialUserGroups'] = __DIR__ . '/SpecialUserGroups.php';
-$wgAutoloadClasses['UserGroup'] = __DIR__ . '/UserGroup.php';
-$wgAutoloadClasses['UserRight'] = __DIR__ . '/UserRights.php';
-
-// New permissions
-$wgAvailableRights[] = 'modifygroups';
-$wgGroupPermissions['bureaucrat']['modifygroups'] = true;
-
-// This section is used by the extension to modify user groups on your wiki.
-// Unless you know what you're doing, PLEASE DO NOT EDIT THIS SECTION DIRECTLY!
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..65f54ba
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,53 @@
+{
+ "name": "UserGroups",
+ "version": "1.0.1",
+ "requires": {
+ "MediaWiki": ">=1.26"
+ },
+ "author": [
+ "Withoutaname",
+ "[http://mwstake.org Mark A. Hershberger]"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Extension:UserGroups",
+ "descriptionmsg": "usergroups-desc",
+ "license-name": "GPL-3.0+",
+ "type": "other",
+ "AvailableRights": [
+ "modifygroups"
+ ],
+ "GroupPermissions": {
+ "bureaucrat": {
+ "modifygroups": true
+ }
+ },
+ "LogActionsHandlers": {
+ "usergroups/*": "LogFormatter"
+ },
+ "LogHeaders": {
+ "usergroups": "usergroups-log-header"
+ },
+ "LogNames": {
+ "usergroups": "usergroups-log-name"
+ },
+ "LogTypes": [
+ "usergroups"
+ ],
+ "SpecialPages": {
+ "UserGroups": "SpecialUserGroups"
+ },
+ "MessagesDirs": {
+ "UserGroups": [
+ "i18n"
+ ]
+ },
+ "ExtensionMessagesFiles": {
+ "SpecialUserGroupsAliases": "UserGroups.alias.php"
+ },
+ "AutoloadClasses": {
+ "AddUserGroup": "addUserGroup.php",
+ "SpecialUserGroups": "SpecialUserGroups.php",
+ "UserGroup": "UserGroup.php",
+ "UserRight": "UserRights.php"
+ },
+ "manifest_version": 2
+}
--
To view, visit https://gerrit.wikimedia.org/r/367125
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife9a3f5ea77baee80d6fad5cef420432e45d3deb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserGroups
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits