r56207 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56206‎ | r56207 | r56208 >
Date:21:01, 11 September 2009
Author:brion
Status:ok
Tags:
Comment:
Merge r53263 from wmf-deployment: Rearranging some paths so the output file goes into $IP/cache by default, rather than mixing in with the extensions checkout.
Modified paths:
  • /trunk/extensions/TrustedXFF (modified) (history)
  • /trunk/extensions/TrustedXFF/TrustedXFF.php (modified) (history)
  • /trunk/extensions/TrustedXFF/generate.php (modified) (history)
  • /trunk/extensions/TrustedXFF/trusted-hosts.txt (modified) (history)
  • /trunk/extensions/TrustedXFF/update (modified) (history)

Diff [purge]

Index: trunk/extensions/TrustedXFF/generate.php
@@ -12,7 +12,16 @@
1313 echo "Unable to open input file \"trusted-xff.txt\"\n";
1414 exit( 1 );
1515 }
16 -$outFile = dba_open( 'trusted-xff.cdb', 'n', 'cdb' );
 16+
 17+if( isset( $args[0] ) ) {
 18+ $target = realpath( $args[0] );
 19+} elseif( isset( $wgTrustedXffFile ) ) {
 20+ $target = $wgTrustedXffFile;
 21+} else {
 22+ echo "TrustedXffFile extension is not enabled. Specify target output file on command line!\n";
 23+ exit( 1 );
 24+}
 25+$outFile = dba_open( $target, 'n', 'cdb' );
1726 if ( !$outFile ) {
1827 echo "Unable open output file \"trusted-xff.cdb\"\n";
1928 exit( 1 );
Index: trunk/extensions/TrustedXFF/update
@@ -1,8 +1,8 @@
22 #!/bin/bash
33
44 cd `dirname $0`
5 -php generate.php
6 -bzip2 -kf trusted-xff.cdb
 5+php generate.php aawiki ../../cache/trusted-xff.cdb
 6+bzip2 -kf ../../cache/trusted-xff.cdb
77 if [ -x /home/wikipedia/bin/sync-common-file ]; then
8 - sync-common-file php-1.5/extensions/TrustedXFF/trusted-xff.cdb
 8+ sync-common-file wmf-deployment/cache/trusted-xff.cdb
99 fi
Index: trunk/extensions/TrustedXFF/TrustedXFF.php
@@ -1,5 +1,9 @@
22 <?php
33
 4+if (!defined('MEDIAWIKI')) {
 5+ die(1);
 6+}
 7+
48 /**
59 * Trusted hosts file in CDB format.
610 * The file can be generated using generate.php
@@ -10,7 +14,7 @@
1115 *
1216 * For details, see http://meta.wikimedia.org/wiki/XFF_project
1317 */
14 -$wgTrustedXffFile = dirname(__FILE__).'/trusted-xff.cdb';
 18+$wgTrustedXffFile = $IP . '/cache/trusted-xff.cdb';
1519
1620
1721 /** Registration */
Property changes on: trunk/extensions/TrustedXFF/trusted-hosts.txt
___________________________________________________________________
Modified: svn:mergeinfo
1822 Merged /branches/wmf-deployment/extensions/TrustedXFF/trusted-hosts.txt:r53263
Property changes on: trunk/extensions/TrustedXFF
___________________________________________________________________
Added: svn:mergeinfo
1923 Merged /branches/wmf-deployment/extensions/TrustedXFF:r53263

Follow-up revisions

RevisionCommit summaryAuthorDate
r56374Merge post-branch trunk updates replacing old live hacks:...brion17:25, 15 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53263Rearranging some paths so the output file goes into $IP/cache by default, rat...brion20:44, 14 July 2009

Status & tagging log