r106184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106183‎ | r106184 | r106185 >
Date:12:55, 14 December 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Add --svnurl to LocalisationUpdate/update.php to make the path to the SVN checkout overridable from the command line
Modified paths:
  • /trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php (modified) (history)
  • /trunk/extensions/LocalisationUpdate/update.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LocalisationUpdate/update.php
@@ -4,6 +4,7 @@
55 ? getenv( 'MW_INSTALL_PATH' )
66 : realpath( dirname( __FILE__ ) . "/../../" );
77
 8+// TODO: migrate to maintenance class
89 require_once( "$IP/maintenance/commandLine.inc" );
910
1011 if( isset( $options['help'] ) ) {
@@ -17,6 +18,7 @@
1819 print " --skip-extensions Don't fetch any extension files\n";
1920 print " --all Fetch all present extensions, not just those enabled\n";
2021 print " --outdir=<dir> Override output directory for serialized update files\n";
 22+ print " --svnurl=<url> URL to SVN repository, or path to local SVN checkout. Default: $wgLocalisationUpdateSVNURL\n";
2123 print "\n";
2224 exit( 0 );
2325 }
Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
@@ -52,7 +52,7 @@
5353 * @return true
5454 */
5555 public static function updateMessages( array $options ) {
56 - global $wgLocalisationUpdateDirectory;
 56+ global $wgLocalisationUpdateDirectory, $wgLocalisationUpdateSVNURL;
5757
5858 $verbose = !isset( $options['quiet'] );
5959 $all = isset( $options['all'] );
@@ -62,6 +62,11 @@
6363 if( isset( $options['outdir'] ) ) {
6464 $wgLocalisationUpdateDirectory = $options['outdir'];
6565 }
 66+
 67+ if ( isset( $options['svnurl['] ) ) {
 68+ // FIXME: Ewwwww. Refactor so this can be done properly
 69+ $wgLocalisationUpdateSVNURL = $options['svnurl'];
 70+ }
6671
6772 $result = 0;
6873

Follow-up revisions

RevisionCommit summaryAuthorDate
r106192Fix typo in r106184catrope13:50, 14 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   15:08, 14 December 2011

Wow I'm blind.

Status & tagging log