summaryrefslogtreecommitdiff
path: root/extensions/LocalisationUpdate/LocalisationUpdate.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/LocalisationUpdate/LocalisationUpdate.php')
-rw-r--r--extensions/LocalisationUpdate/LocalisationUpdate.php53
1 files changed, 32 insertions, 21 deletions
diff --git a/extensions/LocalisationUpdate/LocalisationUpdate.php b/extensions/LocalisationUpdate/LocalisationUpdate.php
index abec5406..53aa5adc 100644
--- a/extensions/LocalisationUpdate/LocalisationUpdate.php
+++ b/extensions/LocalisationUpdate/LocalisationUpdate.php
@@ -1,6 +1,5 @@
<?php
-
/**
* Directory to store serialized cache files in. Defaults to $wgCacheDirectory.
* It's OK to share this directory among wikis as long as the wiki you run
@@ -11,34 +10,46 @@
*/
$wgLocalisationUpdateDirectory = false;
-
/**
- * These should point to either an HTTP-accessible file or local file system.
- * $1 is the name of the repo (for extensions) and $2 is the name of file in the repo.
- * $3 and $4 are the same, respectively, but urlencoded for e.g. gitblit.
+ * Default repository source to use.
+ * @since 2014-03
*/
+$wgLocalisationUpdateRepository = 'github';
-$wgLocalisationUpdateCoreURL = "https://git.wikimedia.org/raw/mediawiki%2Fcore.git/HEAD/$4";
-$wgLocalisationUpdateExtensionURL = "https://git.wikimedia.org/raw/mediawiki%2Fextensions%2F$3.git/HEAD/$4";
-
-/// Deprecated
-$wgLocalisationUpdateSVNURL = false;
+/**
+ * Available repository sources.
+ * @since 2014-03
+ */
+$wgLocalisationUpdateRepositories = array();
+$wgLocalisationUpdateRepositories['github'] = array(
+ 'mediawiki' =>
+ 'https://raw.github.com/wikimedia/mediawiki-core/master/%PATH%',
+ 'extension' =>
+ 'https://raw.github.com/wikimedia/mediawiki-extensions-%NAME%/master/%PATH%',
+);
-$wgLocalisationUpdateRetryAttempts = 5;
+// Example for local filesystem configuration
+#$wgLocalisationUpdateRepositories['local'] = array(
+# 'mediawiki' =>
+# 'file:///resources/projects/mediawiki/master/%PATH%',
+# 'extension' =>
+# 'file:///resources/projects/mediawiki-extensions/extensions/%NAME%/%PATH%',
+#);
-// Info about me!
$wgExtensionCredits['other'][] = array(
- 'path' => __FILE__,
- 'name' => 'LocalisationUpdate',
- 'author' => array( 'Tom Maaswinkel', 'Niklas Laxström', 'Roan Kattouw' ),
- 'version' => '1.0',
- 'url' => 'https://www.mediawiki.org/wiki/Extension:LocalisationUpdate',
+ 'path' => __FILE__,
+ 'name' => 'LocalisationUpdate',
+ 'author' => array( 'Tom Maaswinkel', 'Niklas Laxström', 'Roan Kattouw' ),
+ 'version' => '1.3.0',
+ 'url' => 'https://www.mediawiki.org/wiki/Extension:LocalisationUpdate',
'descriptionmsg' => 'localisationupdate-desc',
);
$wgHooks['LocalisationCacheRecache'][] = 'LocalisationUpdate::onRecache';
+$wgHooks['LocalisationCacheRecacheFallback'][] = 'LocalisationUpdate::onRecacheFallback';
+
+$dir = __DIR__;
+$wgMessagesDirs['LocalisationUpdate'] = __DIR__ . '/i18n';
+$wgExtensionMessagesFiles['LocalisationUpdate'] = "$dir/LocalisationUpdate.i18n.php";
-$dir = __DIR__ . '/';
-$wgExtensionMessagesFiles['LocalisationUpdate'] = $dir . 'LocalisationUpdate.i18n.php';
-$wgAutoloadClasses['LocalisationUpdate'] = $dir . 'LocalisationUpdate.class.php';
-$wgAutoloadClasses['QuickArrayReader'] = $dir . 'QuickArrayReader.php';
+require "$dir/Autoload.php";