jenkins-bot has submitted this change and it was merged.

Change subject: Version 3.2.1: add extension.json file for MW 1.25+, kill some 
inline styles
......................................................................


Version 3.2.1: add extension.json file for MW 1.25+, kill some inline styles

Bug: T87148
Change-Id: If93247f781d8a4ac252cf0d453821106d705262b
---
M ApiUserStatus.php
M SpecialFanUpdates.php
M SpecialUserStatus.php
M UserStatus.css
M UserStatus.php
M UserStatusHooks.php
A extension.json
7 files changed, 82 insertions(+), 20 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApiUserStatus.php b/ApiUserStatus.php
index 7a830d3..4313570 100644
--- a/ApiUserStatus.php
+++ b/ApiUserStatus.php
@@ -152,9 +152,9 @@
                $update = $update[0];
 
                return SportsTeams::getLogo( $update['sport_id'], 
$update['team_id'], 's' ) .
-               "<img src=\"{$wgExtensionAssetsPath}/UserStatus/quoteIcon.png\" 
border=\"0\" style=\"margin-left:5px;\" alt=\"\" />
+               "<img src=\"{$wgExtensionAssetsPath}/UserStatus/quoteIcon.png\" 
style=\"margin-left:5px;\" alt=\"\" />
                {$update['text']}
-               <img 
src=\"{$wgExtensionAssetsPath}/UserStatus/endQuoteIcon.png\" border=\"0\" 
alt=\"\" />
+               <img 
src=\"{$wgExtensionAssetsPath}/UserStatus/endQuoteIcon.png\" alt=\"\" />
                <span class=\"user-status-date\">" .
                        wfMessage( 'userstatus-ago', UserStatus::getTimeAgo( 
$update['timestamp'] ) )->text() .
                '</span>';
diff --git a/SpecialFanUpdates.php b/SpecialFanUpdates.php
index a1f19cf..5ca1158 100644
--- a/SpecialFanUpdates.php
+++ b/SpecialFanUpdates.php
@@ -96,7 +96,7 @@
 
                if ( $total ) {
                        $output .= '<div class="user-page-message-top">
-                       <span class="user-page-message-count" style="font-size: 
11px; color: #666666;">' .
+                       <span class="user-page-message-count">' .
                                $this->msg( 'userstatus-showing-thoughts', 
$start, $end, $total )->parse() .
                        '</span>
                </div>';
diff --git a/SpecialUserStatus.php b/SpecialUserStatus.php
index 0ecdaf4..507d686 100644
--- a/SpecialUserStatus.php
+++ b/SpecialUserStatus.php
@@ -95,7 +95,7 @@
 
                if ( $total ) {
                        $output .= '<div class="user-page-message-top">
-                               <span class="user-page-message-count" 
style="font-size: 11px; color: #666666;">' .
+                               <span class="user-page-message-count">' .
                                        $this->msg( 
'userstatus-showing-thoughts', $start, $end, $total )->parse() .
                                '</span>
                        </div>';
diff --git a/UserStatus.css b/UserStatus.css
index 90211be..6a9f77a 100644
--- a/UserStatus.css
+++ b/UserStatus.css
@@ -52,4 +52,9 @@
 
 .user-status-vote {
        margin: 0px 0px 0px 5px;
+}
+
+.user-page-message-count {
+       color: #666666;
+       font-size: 11px;
 }
\ No newline at end of file
diff --git a/UserStatus.php b/UserStatus.php
index 5eeb4c1..11c2582 100644
--- a/UserStatus.php
+++ b/UserStatus.php
@@ -5,7 +5,6 @@
  *
  * @file
  * @ingroup Extensions
- * @date 10 September 2014
  * @author Aaron Wright <[email protected]>
  * @author David Pean <[email protected]>
  * @author Jack Phoenix <[email protected]>
@@ -13,19 +12,11 @@
  * @link https://www.mediawiki.org/wiki/Extension:UserStatus Documentation
  */
 
-/**
- * Protect against register_globals vulnerabilities.
- * This line must be present before any global variable is referenced.
- */
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 'This is not a valid entry point to MediaWiki.' );
-}
-
 // Extension credits that will show up on Special:Version
 $wgExtensionCredits['other'][] = array(
        'path' => __FILE__,
        'name' => 'UserStatus',
-       'version' => '3.2',
+       'version' => '3.2.1',
        'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
        'description' => 'Social status updates on user profiles and on network 
pages',
        'url' => 'https://www.mediawiki.org/wiki/Extension:UserStatus'
diff --git a/UserStatusHooks.php b/UserStatusHooks.php
index 9e73527..294a4d3 100644
--- a/UserStatusHooks.php
+++ b/UserStatusHooks.php
@@ -7,11 +7,10 @@
         * Creates UserStatus' new database tables when the user runs
         * /maintenance/update.php, the MediaWiki core updater script.
         *
-        * @param $updater DatabaseUpdater
-        * @return Boolean
+        * @param DatabaseUpdater $updater
+        * @return bool
         */
        public static function onLoadExtensionSchemaUpdates( $updater ) {
-               $dir = dirname( __FILE__ );
                $dbExt = '';
 
                /*
@@ -36,8 +35,8 @@
                        }
                }
 
-               $updater->addExtensionUpdate( array( 'addTable', 'user_status', 
"$dir/user_status$dbExt.sql", true ) );
-               $updater->addExtensionUpdate( array( 'addTable', 
'user_status_vote', "$dir/user_status$dbExt.sql", true ) );
+               $updater->addExtensionUpdate( array( 'addTable', 'user_status', 
__DIR__ . "/user_status$dbExt.sql", true ) );
+               $updater->addExtensionUpdate( array( 'addTable', 
'user_status_vote', __DIR__ . "/user_status$dbExt.sql", true ) );
 
                return true;
        }
@@ -45,7 +44,7 @@
        /**
         * For integration with the Renameuser extension.
         *
-        * @param $renameUserSQL RenameuserSQL
+        * @param RenameuserSQL $renameUserSQL
         * @return bool
         */
        public static function onRenameUserSQL( $renameUserSQL ) {
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..2dceef5
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,67 @@
+{
+       "name": "UserStatus",
+       "version": "3.2.1",
+       "author": [
+               "Aaron Wright",
+               "David Pean",
+               "Jack Phoenix"
+       ],
+       "license-name": "GPL-2.0+",
+       "url": "https://www.mediawiki.org/wiki/Extension:UserStatus";,
+       "description": "Social status updates on user profiles and on network 
pages",
+       "type": "other",
+       "SpecialPages": {
+               "FanUpdates": "ViewFanUpdates",
+               "UserStatus": "ViewUserStatus",
+               "ViewThought": "ViewThought"
+       },
+       "MessagesDirs": {
+               "UserStatus": [
+                       "i18n"
+               ]
+       },
+       "AutoloadClasses": {
+               "ApiUserStatus": "ApiUserStatus.php",
+               "UserStatus": "UserStatusClass.php",
+               "UserStatusHooks": "UserStatusHooks.php",
+               "ViewFanUpdates": "SpecialFanUpdates.php",
+               "ViewUserStatus": "SpecialUserStatus.php",
+               "ViewThought": "SpecialViewThought.php"
+       },
+       "Hooks": {
+               "LoadExtensionSchemaUpdates": [
+                       "UserStatusHooks::onLoadExtensionSchemaUpdates"
+               ],
+               "RenameUserSQL": [
+                       "UserStatusHooks::onRenameUserSQL"
+               ]
+       },
+       "ResourceFileModulePaths": {
+               "localBasePath": "",
+               "remoteExtPath": "UserStatus"
+       },
+       "ResourceModules": {
+               "ext.userStatus": {
+                       "styles": "UserStatus.css",
+                       "scripts": "UserStatus.js",
+                       "messages": [ "userstatus-confirm-delete" ],
+                       "position": "top"
+               },
+               "ext.userStatus.viewThought": {
+                       "styles": "ViewThought.css",
+                       "position": "top"
+               }
+       },
+       "AvailableRights": [
+               "delete-status-updates"
+       ],
+       "GroupPermissions": {
+               "staff": {
+                       "delete-status-updates": true
+               },
+               "sysop": {
+                       "delete-status-updates": true
+               }
+       },
+       "manifest_version": 1
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/230817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If93247f781d8a4ac252cf0d453821106d705262b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserStatus
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to