Fix script for bug 20757.
[lhc/web/wiklou.git] / maintenance / upgrade1_5.php
index dd4acaa..4834a4a 100644 (file)
 
 $options = array( 'step', 'noimages' );
 
-require_once( 'commandLine.inc' );
+require_once( dirname(__FILE__) . '/commandLine.inc' );
 require_once( 'FiveUpgrade.inc' );
 
+echo "ATTENTION: This script is for upgrades from 1.4 to 1.5 (NOT 1.15) in very special cases.\n";
+echo "Use update.php for usual updates.\n";
+
+// Seems to confuse some people
+if ( !array_search( '--upgrade', $_SERVER['argv'] ) ) {
+       echo "Please run this script with --upgrade key to actually run the updater.\n";
+       die;
+}
+
 $upgrade = new FiveUpgrade();
 $step = isset( $options['step'] ) ? $options['step'] : null;
 $upgrade->upgrade( $step );