[MediaWiki-commits] [Gerrit] mediawiki...ImportArticles[master]: v 1.4 - Remove deprecated PHP entry point and deprecated PHP...

2017-01-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334470 )

Change subject: v 1.4 - Remove deprecated PHP entry point and deprecated 
PHP-based i18n
..


v 1.4 - Remove deprecated PHP entry point and deprecated PHP-based i18n

Change-Id: Ia7a56bbbaa370c8a5dd2637d3faf5881f37b3263
---
D ImportArticles.i18n.php
D ImportArticles.php
M extension.json
3 files changed, 1 insertion(+), 79 deletions(-)

Approvals:
  Umherirrender: Looks good to me, but someone else must approve
  Cblair91: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ImportArticles.i18n.php b/ImportArticles.i18n.php
deleted file mode 100644
index 844fe79..000
--- a/ImportArticles.i18n.php
+++ /dev/null
@@ -1,33 +0,0 @@
-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( 'wfJsonI18nShimefa4e861731a8843' ) ) {
-   function wfJsonI18nShimefa4e861731a8843( $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'][] = 
'wfJsonI18nShimefa4e861731a8843';
-}
\ No newline at end of file
diff --git a/ImportArticles.php b/ImportArticles.php
deleted file mode 100644
index be98a5f..000
--- a/ImportArticles.php
+++ /dev/null
@@ -1,42 +0,0 @@
-http://www.gnu.org/licenses/gpl.html
- * @package: ImportArticles
- * @link: https://mediawiki.org/wiki/Extension:ImportArticles
- */
-
-# Only run if included by MediaWiki
-if ( !defined( 'MEDIAWIKI' ) ) die( 'Invalid entry point.' );
-
-$wgExtensionCredits['other'][] = array(
-   'path'  => __FILE__,
-'name' => 'ImportArticles',
-   'descriptionmsg'=> 'importarticles-desc',
-'author'   => 'Kris Blair (Cblair91)', 
-   'url'   => 
'https://mediawiki.org/wiki/Extension:ImportArticles',
-'description'  => 'Allow the usage of ImportArticles 
JavaScript to import multiple pages at once',
-'version'  => '1.3',
-   'licence-name'  => 'GPL-3.0'
-);
-
-$dir = dirname( __FILE__ ) . '/';
-
-# Register hooks
-$wgAutoloadClasses['ImportArticles']   = $dir . 
'ImportArticles.hooks.php';
-$wgHooks['BeforePageDisplay'][]= 
'ImportArticles::onBeforePageDisplay';
-
-# Register messages
-$wgMessagesDir['ImportArticles']   = $dir . 'i18n';
-$wgExtensionMessagesFiles['ImportArticles']= $dir . 
'ImportArticles.i18n.php';
-
-# Register modules
-$wgResourceModules['ext.importarticles'] = array(
-   'scripts'   => array( 'resources/importarticles.js' ),
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'ImportArticles',
-   'dependencies'  => array()
-);
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 7d6263b..93a24cf 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "ImportArticles",
-   "version": "1.3",
+   "version": "1.4",
"author": "Kris Blair (Cblair91)",
"descriptionmsg": "importarticles-desc",
"license-name": "GPL-3.0",
@@ -9,9 +9,6 @@
"ImportArticles": [
"i18n"
]
-   },
-   "ExtensionMessagesFiles": {
-   "ImportArticles": "ImportArticles.i18n.php"
},
"AutoloadClasses": {
"ImportArticles": "ImportArticles.hooks.php"

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

[MediaWiki-commits] [Gerrit] mediawiki...ImportArticles[master]: v 1.4 - Remove deprecated PHP entry point and deprecated PHP...

2017-01-26 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334470 )

Change subject: v 1.4 - Remove deprecated PHP entry point and deprecated 
PHP-based i18n
..

v 1.4 - Remove deprecated PHP entry point and deprecated PHP-based i18n

Change-Id: Ia7a56bbbaa370c8a5dd2637d3faf5881f37b3263
---
D ImportArticles.i18n.php
D ImportArticles.php
M extension.json
3 files changed, 1 insertion(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ImportArticles 
refs/changes/70/334470/1

diff --git a/ImportArticles.i18n.php b/ImportArticles.i18n.php
deleted file mode 100644
index 844fe79..000
--- a/ImportArticles.i18n.php
+++ /dev/null
@@ -1,33 +0,0 @@
-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( 'wfJsonI18nShimefa4e861731a8843' ) ) {
-   function wfJsonI18nShimefa4e861731a8843( $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'][] = 
'wfJsonI18nShimefa4e861731a8843';
-}
\ No newline at end of file
diff --git a/ImportArticles.php b/ImportArticles.php
deleted file mode 100644
index be98a5f..000
--- a/ImportArticles.php
+++ /dev/null
@@ -1,42 +0,0 @@
-http://www.gnu.org/licenses/gpl.html
- * @package: ImportArticles
- * @link: https://mediawiki.org/wiki/Extension:ImportArticles
- */
-
-# Only run if included by MediaWiki
-if ( !defined( 'MEDIAWIKI' ) ) die( 'Invalid entry point.' );
-
-$wgExtensionCredits['other'][] = array(
-   'path'  => __FILE__,
-'name' => 'ImportArticles',
-   'descriptionmsg'=> 'importarticles-desc',
-'author'   => 'Kris Blair (Cblair91)', 
-   'url'   => 
'https://mediawiki.org/wiki/Extension:ImportArticles',
-'description'  => 'Allow the usage of ImportArticles 
JavaScript to import multiple pages at once',
-'version'  => '1.3',
-   'licence-name'  => 'GPL-3.0'
-);
-
-$dir = dirname( __FILE__ ) . '/';
-
-# Register hooks
-$wgAutoloadClasses['ImportArticles']   = $dir . 
'ImportArticles.hooks.php';
-$wgHooks['BeforePageDisplay'][]= 
'ImportArticles::onBeforePageDisplay';
-
-# Register messages
-$wgMessagesDir['ImportArticles']   = $dir . 'i18n';
-$wgExtensionMessagesFiles['ImportArticles']= $dir . 
'ImportArticles.i18n.php';
-
-# Register modules
-$wgResourceModules['ext.importarticles'] = array(
-   'scripts'   => array( 'resources/importarticles.js' ),
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'ImportArticles',
-   'dependencies'  => array()
-);
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 7d6263b..d75d887 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "ImportArticles",
-   "version": "1.3",
+   "version": "1.4",
"author": "Kris Blair (Cblair91)",
"descriptionmsg": "importarticles-desc",
"license-name": "GPL-3.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7a56bbbaa370c8a5dd2637d3faf5881f37b3263
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ImportArticles
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

___