Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275529

Change subject: Various updates
......................................................................

Various updates

- Remove i18n file.
- Initialize variable $query.
- Declare visibility of functions.

Change-Id: I886895d3c3cea2ad6a4ce722e770f0f1fea1a59c
---
D WebChat.i18n.php
M WebChat.php
M WebChat_body.php
3 files changed, 5 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WebChat 
refs/changes/29/275529/1

diff --git a/WebChat.i18n.php b/WebChat.i18n.php
deleted file mode 100644
index c7c104d..0000000
--- a/WebChat.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = [];
-if ( !function_exists( 'wfJsonI18nShim44cde5dade4df928' ) ) {
-       function wfJsonI18nShim44cde5dade4df928( $cache, $code, &$cachedData ) {
-               $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
-               foreach ( $codeSequence as $csCode ) {
-                       $fileName = __DIR__ . "/i18n/$csCode.json";
-                       if ( is_readable( $fileName ) ) {
-                               $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-                               foreach ( array_keys( $data ) as $key ) {
-                                       if ( $key === '' || $key[0] === '@' ) {
-                                               unset( $data[$key] );
-                                       }
-                               }
-                               $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-                       }
-
-                       $cachedData['deps'][] = new FileDependency( $fileName );
-               }
-               return true;
-       }
-
-       $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim44cde5dade4df928';
-}
diff --git a/WebChat.php b/WebChat.php
index 7c5c512..7cd823e 100644
--- a/WebChat.php
+++ b/WebChat.php
@@ -26,7 +26,7 @@
        'descriptionmsg' => 'webchat-desc',
        'author'         => [ 'Robert Leverington', 'Marco 27' ],
        'url'            => 'https://www.mediawiki.org/wiki/Extension:WebChat',
-       'version'        => '1.2.0',
+       'version'        => '1.3.0',
 ];
 
 $dir = __DIR__ . '/';
@@ -37,7 +37,6 @@
 
 // Extension messages.
 $wgMessagesDirs['WebChat'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['WebChat'] =  $dir . 'WebChat.i18n.php';
 $wgExtensionMessagesFiles['WebChatAlias'] =  $dir . 'WebChat.alias.php';
 
 // Default configuration.
diff --git a/WebChat_body.php b/WebChat_body.php
index f8f3ee6..231b847 100644
--- a/WebChat_body.php
+++ b/WebChat_body.php
@@ -4,11 +4,11 @@
  */
 
 class WebChat extends SpecialPage {
-       function __construct() {
+       public function __construct() {
                parent::__construct( 'WebChat', 'webchat' );
        }
 
-       function execute( $par ) {
+       public function execute( $par ) {
                global $wgWebChatServer, $wgWebChatChannel, $wgWebChatClient, 
$wgWebChatClients;
 
                $this->setHeaders();
@@ -18,6 +18,8 @@
                        throw new MwException( 'Unknown web chat client 
specified.' );
                }
 
+               $query = [];
+
                foreach ( $wgWebChatClients[$wgWebChatClient]['parameters'] as 
$parameter => $value ) {
                        switch ( $value ) {
                                case '$$$nick$$$':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I886895d3c3cea2ad6a4ce722e770f0f1fea1a59c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WebChat
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

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

Reply via email to