r97895 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97894‎ | r97895 | r97896 >
Date:07:48, 23 September 2011
Author:ariel
Status:ok (Comments)
Tags:todo 
Comment:
add mwscript handling for call of fetchText.php maintenance script
Modified paths:
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -427,12 +427,23 @@
428428 function openSpawn() {
429429 global $IP;
430430
431 - $cmd = implode( " ",
432 - array_map( 'wfEscapeShellArg',
433 - array(
434 - $this->php,
435 - "$IP/maintenance/fetchText.php",
436 - '--wiki', wfWikiID() ) ) );
 431+ if ( file_exists( "$IP/../multiversion/MWScript.php" ) ) {
 432+ $cmd = implode( " ",
 433+ array_map( 'wfEscapeShellArg',
 434+ array(
 435+ $this->php,
 436+ "$IP/../multiversion/MWScript.php",
 437+ "fetchText.php",
 438+ '--wiki', wfWikiID() ) ) );
 439+ }
 440+ else {
 441+ $cmd = implode( " ",
 442+ array_map( 'wfEscapeShellArg',
 443+ array(
 444+ $this->php,
 445+ "$IP/maintenance/fetchText.php",
 446+ '--wiki', wfWikiID() ) ) );
 447+ }
437448 $spec = array(
438449 0 => array( "pipe", "r" ),
439450 1 => array( "pipe", "w" ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r97897mft r97895 (call MWScript for invocation of fetchText.php, if needed)ariel08:16, 23 September 2011
r97898mft r97895 (call MWScript for invocation of fetchText.php, if needed)ariel08:17, 23 September 2011
r98762REL1_18 MFT r97806, r97895, r98193, r98194, r98237, r98502, r98656, r98707, r...reedy13:56, 3 October 2011

Comments

#Comment by ArielGlenn (talk | contribs)   08:18, 23 September 2011

note that I already merged this into 1.17wmf1 and 1.18wmf1; it has to go out before the mwscript workaround is removed from CommonSettings.php tomorrow.

#Comment by Brion VIBBER (talk | contribs)   17:26, 23 September 2011

This feels like a nasty hack that might have to be repeated in other places -- the ability to shell-out to another CLI script should probably be encapsulated, and 'helper scripts' like MWScript.php should probably be controllable through a config setting, rather than poking outside of the installer root to look for hardcoded path names.

#Comment by ArielGlenn (talk | contribs)   17:54, 23 September 2011

It *is* a nasty hack. I don't want dumpTextPass or any other script to have to deal with multiversion, it should be a nice little function in doMaintenance or something. I'm just out of time and don't want the dumps to break from this stuff.

#Comment by Brion VIBBER (talk | contribs)   20:49, 23 September 2011
  • nod* I'll just mark it with a todo.

Status & tagging log