Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_unifyProperties.php |
— | — | @@ -19,7 +19,9 @@ |
20 | 20 | * @author Denny Vrandecic |
21 | 21 | */ |
22 | 22 | |
23 | | -require_once( 'commandLine.inc' ); |
| 23 | +require_once ( getenv('MW_INSTALL_PATH') !== false |
| 24 | + ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
| 25 | + : 'commandLine.inc' ); |
24 | 26 | |
25 | 27 | global $smwgIP; |
26 | 28 | global $wgParser; |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php |
— | — | @@ -25,8 +25,9 @@ |
26 | 26 | |
27 | 27 | $optionsWithArgs = array( 'd', 's', 'e' ); // -d <delay>, -s <startid> |
28 | 28 | |
29 | | -require_once('counter.php'); |
30 | | -require_once('commandLine.inc'); |
| 29 | +$mwPath = getenv('MW_INSTALL_PATH') !== false ? getenv('MW_INSTALL_PATH').'/' : ''; |
| 30 | +require_once("{$mwPath}counter.php"); |
| 31 | +require_once("{$mwPath}commandLine.inc"); |
31 | 32 | |
32 | 33 | global $smwgIP; |
33 | 34 | require_once($smwgIP . '/includes/SMW_Factbox.php'); |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_pingSemWeb.php |
— | — | @@ -26,7 +26,9 @@ |
27 | 27 | |
28 | 28 | $optionsWithArgs = array( 'd', 's', 'e', 'h', 't' ); // -d <delay>, -s <startid>, -e <endid> |
29 | 29 | |
30 | | -require_once( 'commandLine.inc' ); |
| 30 | +require_once ( getenv('MW_INSTALL_PATH') !== false |
| 31 | + ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
| 32 | + : 'commandLine.inc' ); |
31 | 33 | |
32 | 34 | global $smwgIP, $wgServer; |
33 | 35 | include_once($smwgIP . '/includes/SMW_Infolink.php'); |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_setup.php |
— | — | @@ -7,6 +7,7 @@ |
8 | 8 | * migrating a lot of existing data. |
9 | 9 | * |
10 | 10 | * Note: this file must be placed in MediaWiki's "maintenance" directory! |
| 11 | + * or the MW_INSTALL_PATH environment variable must be set. |
11 | 12 | * |
12 | 13 | * Usage: |
13 | 14 | * php SMW_refreshData.php [options...] |
— | — | @@ -26,7 +27,9 @@ |
27 | 28 | */ |
28 | 29 | |
29 | 30 | $optionsWithArgs = array('user', 'password'); |
30 | | -require_once( 'commandLine.inc' ); |
| 31 | +require_once ( getenv('MW_INSTALL_PATH') !== false |
| 32 | + ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
| 33 | + : 'commandLine.inc' ); |
31 | 34 | |
32 | 35 | if( isset( $options['user'] ) ) { |
33 | 36 | global $wgDBuser; |
Index: trunk/extensions/SemanticMediaWiki/maintenance/README |
— | — | @@ -1,9 +1,14 @@ |
2 | 2 | == Semantic MediaWiki maintenance scripts == |
3 | 3 | |
4 | | -Maintenance scripts must be placed within the "./maintenance" directory |
5 | | -of your MediaWiki installation. In most cases, it is best to do this via |
6 | | -a symbolic link, e.g. |
| 4 | +To run maintenance scripts it is recomended to set the environment |
| 5 | +variable MW_INSTALL_PATH to the root of your MediaWiki install. |
| 6 | +Then you may run them from their location here, or in the maintenance |
| 7 | +directory. |
7 | 8 | |
| 9 | +Otherwise maintenance scripts must be placed within the "./maintenance" |
| 10 | +directory of your MediaWiki installation. In most cases, it is best to do |
| 11 | +this via a symbolic link, e.g. |
| 12 | + |
8 | 13 | % ln -s ./myMediaWiki/extensions/SemanticMediaWiki/maintenance/SMW_dumpRDF.php ./myMediaWiki/maintenance/SMW_dumpRDF.php |
9 | 14 | |
10 | 15 | Scripts can be run with a command line PHP call if your MediaWiki is |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_dumpRDF.php |
— | — | @@ -22,8 +22,11 @@ |
23 | 23 | |
24 | 24 | $optionsWithArgs = array( 'o', 'd', 'e' ); |
25 | 25 | |
26 | | -require_once( 'commandLine.inc' ); |
27 | | -require_once( "$IP/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php"); |
| 26 | +require_once ( getenv('MW_INSTALL_PATH') !== false |
| 27 | + ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
| 28 | + : 'commandLine.inc' ); |
| 29 | +global $smwgIP; |
| 30 | +require_once( "$smwgIP/specials/Export/SMW_SpecialOWLExport.php"); |
28 | 31 | |
29 | 32 | if ( !empty( $options['o'] ) ) { |
30 | 33 | $outfile = $options['o']; |
Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES |
— | — | @@ -7,6 +7,7 @@ |
8 | 8 | * Bugfix for Special:SearchByProperty (form-based serach failed) |
9 | 9 | * Minor bugfixes for RSS generation |
10 | 10 | * Bugfix for Special_Ask in MediaWiki 1.11 with template formatting |
| 11 | +* Maintenance scripts now accept the MW_INSTALL_PATH environment variable |
11 | 12 | |
12 | 13 | == Semantic MediaWiki 1.1 == |
13 | 14 | |