Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php |
— | — | @@ -12,6 +12,8 @@ |
13 | 13 | * -d <delay> Wait for this many milliseconds after processing an article, useful for limiting server load. |
14 | 14 | * -s <startid> Start refreshing at given article ID, useful for partial refreshing |
15 | 15 | * -e <endid> Stop refreshing at given article ID, useful for partial refreshing |
| 16 | + * -b <backend> Execute the operation for the storage backend of the given name |
| 17 | + * (default is to use the current backend) |
16 | 18 | * -v Be verbose about the progress. |
17 | 19 | * -c Will refresh only category pages (and other explicitly named namespaces) |
18 | 20 | * -p Will refresh only property pages (and other explicitly named namespaces) |
— | — | @@ -23,7 +25,7 @@ |
24 | 26 | * @author Markus Krötzsch |
25 | 27 | */ |
26 | 28 | |
27 | | -$optionsWithArgs = array( 'd', 's', 'e' ); // -d <delay>, -s <startid> |
| 29 | +$optionsWithArgs = array( 'd', 's', 'e', 'b' ); // -d <delay>, -s <startid>, -e <endid>, -b <backend> |
28 | 30 | |
29 | 31 | $mwPath = getenv('MW_INSTALL_PATH') !== false ? getenv('MW_INSTALL_PATH').'/maintenance/' : ''; |
30 | 32 | require_once("{$mwPath}counter.php"); |
— | — | @@ -50,6 +52,12 @@ |
51 | 53 | $end = min(intval($options['e']), $end); |
52 | 54 | } |
53 | 55 | |
| 56 | +if ( array_key_exists( 'b', $options ) ) { |
| 57 | + global $smwgDefaultStore; |
| 58 | + $smwgDefaultStore = $options['b']; |
| 59 | + print "\nSelected storage $smwgDefaultStore for update!\n\n"; |
| 60 | +} |
| 61 | + |
54 | 62 | if ( array_key_exists( 'v', $options ) ) { |
55 | 63 | $verbose = true; |
56 | 64 | } else { |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_setup.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | * so allow override |
28 | 28 | */ |
29 | 29 | |
30 | | -$optionsWithArgs = array('user', 'password'); |
| 30 | +$optionsWithArgs = array('user', 'password','b'); |
31 | 31 | require_once ( getenv('MW_INSTALL_PATH') !== false |
32 | 32 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
33 | 33 | : 'commandLine.inc' ); |
— | — | @@ -40,11 +40,17 @@ |
41 | 41 | $wgDBpassword = $options['password']; |
42 | 42 | } |
43 | 43 | |
| 44 | +if ( array_key_exists( 'b', $options ) ) { |
| 45 | + global $smwgDefaultStore; |
| 46 | + $smwgDefaultStore = $options['b']; |
| 47 | + print "\nSelected storage $smwgDefaultStore for update!\n\n"; |
| 48 | +} |
44 | 49 | |
| 50 | + |
45 | 51 | global $smwgIP; |
46 | 52 | if (! isset($smwgIP)) |
47 | 53 | $smwgIP = dirname(__FILE__) . '/..'; |
48 | | - |
| 54 | + |
49 | 55 | require_once($smwgIP . '/includes/SMW_GlobalFunctions.php'); |
50 | 56 | |
51 | 57 | smwfGetStore()->setup(); |