diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php
index 904144cad66..05defaed9eb 100644
--- a/htdocs/install/upgrade.php
+++ b/htdocs/install/upgrade.php
@@ -15,6 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
+ *
+ * Upgrade scripts can be ran from command line with syntax:
+ *
+ * cd htdocs/install
+ * php upgrade.php 3.4.0 3.5.0
+ * php upgrade2.php 3.4.0 3.5.0
+ *
+ * Return code is 0 if OK, >0 if error
*/
/**
@@ -260,6 +268,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
}
}
+
/*
* Remove deprecated indexes and constraints for Mysql
*/
@@ -343,12 +352,12 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
{
while (($file = readdir($handle))!==false)
{
- if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file;
+ if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file;
}
sort($filesindir);
}
else
- {
+ {
print '
'.$langs->trans("ErrorCanNotReadDir",$dir).'
';
}
@@ -413,7 +422,6 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
if ($db->connected) $db->close();
}
-
if (empty($actiondone))
{
print ''.$langs->trans("ErrorWrongParameters").'
';
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 78c223a9807..593ae33ebcc 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -16,6 +16,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
+ *
+ * Upgrade scripts can be ran from command line with syntax:
+ *
+ * cd htdocs/install
+ * php upgrade.php 3.4.0 3.5.0
+ * php upgrade2.php 3.4.0 3.5.0
+ *
+ * Return code is 0 if OK, >0 if error
*/
/**