SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/334481 )
Change subject: v 3.1 - Remove deprecated PHP entry point and deprecated PHP-based i18n ...................................................................... v 3.1 - Remove deprecated PHP entry point and deprecated PHP-based i18n Change-Id: I3dc942e39bd1794a26831d9003f6f0cbf80683b1 --- D MultiUpload.i18n.php D MultiUpload.php M extension.json 3 files changed, 1 insertion(+), 201 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiUpload refs/changes/81/334481/1 diff --git a/MultiUpload.i18n.php b/MultiUpload.i18n.php deleted file mode 100644 index d252b1c..0000000 --- a/MultiUpload.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 = array(); -if ( !function_exists( 'wfJsonI18nShim97d1b12e3cd5e296' ) ) { - function wfJsonI18nShim97d1b12e3cd5e296( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/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'][] = 'wfJsonI18nShim97d1b12e3cd5e296'; -} diff --git a/MultiUpload.php b/MultiUpload.php deleted file mode 100644 index 11560d2..0000000 --- a/MultiUpload.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php -/** - * MultiUpload extension for MediaWiki 1.19 and later - * - * @file - * @ingroup Extensions - * @author Travis Derouin - * @author Lee Worden <worden....@gmail.com> - * @version 3.0 - * @date 19 August 2014 - * @copyright Copyright © Lee Worden <worden....@gmail.com> - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - * - * 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., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * http://www.gnu.org/copyleft/gpl.html - */ - -/** - * Protect against register_globals vulnerabilities. - * This line must be present before any global variable is referenced. - */ -if ( !defined( 'MEDIAWIKI' ) ) { - echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); - die( -1 ); -} - -# ===== Extension credits that will show up on Special:Version ===== -$wgExtensionCredits['specialpage'][] = array( - 'name' => 'MultiUpload', - 'version' => '3.0', - 'author' => array( 'Travis Derouin', 'Lee Worden' ), - 'url' => 'https://www.mediawiki.org/wiki/Extension:MultiUpload', - 'descriptionmsg' => 'multiupload-desc', -); - -# ===== Configuration variables ===== - -# start with 1 file selector shown -$wgMultiUploadInitialNumberOfImportRows = 1; - -# Can't have a huge number of files to upload on the single form - -# for instance, because of PHP restrictions on number -# and length of POST values -# $wgMultiUploadMaxImportFilesPerPage = 20; - -# where we unpack .tar and .zip files -$wgMultiUploadTempDir = '/tmp'; - -# ===== Register the special page ===== -$wgSpecialPages['MultiUpload'] = 'SpecialMultiUpload'; -$wgAutoloadClasses['SpecialMultiUpload'] = __DIR__ . '/SpecialMultiUpload.php'; -$wgAutoloadClasses['MultiUploadForm'] = __DIR__ . '/SpecialMultiUpload.php'; -$wgAutoloadClasses['FauxWebRequestUpload'] = __DIR__ . '/SpecialMultiUpload.php'; -$wgAutoloadClasses['DerivativeRequestWithFiles'] = __DIR__ . '/SpecialMultiUpload.php'; -$wgAutoloadClasses['UploadRow'] = __DIR__ . '/SpecialMultiUpload.php'; -$wgAutoloadClasses['UploadFormRow'] = __DIR__ . '/SpecialMultiUpload.php'; - -# ===== ResourceLoader ===== -$resourceModuleTemplate = array( - 'localBasePath' => __DIR__ . '/resources', -); - -$wgResourceModules['special.upload.patched'] = $resourceModuleTemplate + array( - 'scripts' => array( - 'mediawiki.special.upload.js.patched', - 'upload.js.patched', - ), - 'styles' => array( - 'ext.multiupload.mw1.19.compatibility.css', # actually useful in 1.23 as well - ), - 'messages' => array( - 'widthheight', - 'size-bytes', - 'size-kilobytes', - 'size-megabytes', - 'size-gigabytes', - 'largefileserver', - ), - 'dependencies' => array( - 'mediawiki.libs.jpegmeta', - 'mediawiki.api', - 'mediawiki.Title', - 'mediawiki.legacy.wikibits', - 'mediawiki.util', - 'jquery.spinner', - ), -); - -// slightly different patched code for older versions of MW -if ( version_compare( $wgVersion, '1.22', '<' ) ) { - $wgResourceModules['special.upload.patched']['scripts'] = array( - 'mediawiki.special.upload.js.patched.1.21.3', - 'upload.js.patched.1.21.3', - ); -} - -$wgResourceModules['ext.multiupload.top'] = $resourceModuleTemplate + array( - 'scripts' => array( 'ext.multiupload.top.js' ), - 'styles' => array( 'ext.multiupload.top.css' ), - 'position' => 'top', -); - -$wgResourceModules['ext.multiupload.unpack'] = $resourceModuleTemplate + array( - 'scripts' => array( - 'ext.multiupload.unpack.js', - 'mw.FormDataTransport.js', - ), - 'dependencies' => array( - 'mediawiki.api', - 'ext.multiupload.top', - ), - 'messages' => array( - 'multiupload-upload-package-error', - 'multiupload-unpack-error', - 'multiupload-http-error', - 'multiupload-file-unpacked-from', - ), -); - -$wgResourceModules['ext.multiupload.shared'] = $resourceModuleTemplate + array( - 'scripts' => array( - 'ext.multiupload.shared.js', - ), - 'styles' => array( - 'ext.multiupload.shared.css', - ), - 'dependencies' => array( - 'ext.multiupload.top', - 'special.upload.patched', - ), - 'messages' => array( - 'multiupload-row', # note: this message has to be named just so - it overlaps with id names in the DOM, created by HTMLForm - 'multiupload-unpack-button', - ), -); - -$wgResourceModules['ext.multiupload'] = $resourceModuleTemplate + array( - 'scripts' => array( 'ext.multiupload.js' ), - 'dependencies' => array( - 'ext.multiupload.shared', - ), -); - -# api.php actions -$wgAPIModules['multiupload-unpack'] = 'MultiUploadApiUnpack'; -$wgAutoloadClasses['MultiUploadApiUnpack'] = __DIR__ . '/MultiUploadApi.php'; - -# (potentially) multilingual messages -$wgExtensionMessagesFiles['MultiUpload'] = __DIR__ . '/MultiUpload.i18n.php'; -$wgMessagesDirs['MultiUpload'] = __DIR__ . '/i18n'; - -# special page aliases -$wgExtensionMessagesFiles['MultiUploadAlias'] = __DIR__ . '/MultiUpload.alias.php'; \ No newline at end of file diff --git a/extension.json b/extension.json index f2cc82d..a5fcdd4 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "MultiUpload", - "version": "3.0", + "version": "3.1", "author": [ "Travis Derouin", "Lee Worden" -- To view, visit https://gerrit.wikimedia.org/r/334481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3dc942e39bd1794a26831d9003f6f0cbf80683b1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultiUpload Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits