Code comments

This commit is contained in:
Laurent Destailleur 2014-01-15 19:12:55 +01:00
parent 6a95f73036
commit d72167d543
2 changed files with 19 additions and 3 deletions

View File

@ -15,6 +15,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 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 * 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) while (($file = readdir($handle))!==false)
{ {
if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file; if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file;
} }
sort($filesindir); sort($filesindir);
} }
else else
{ {
print '<div class="error">'.$langs->trans("ErrorCanNotReadDir",$dir).'</div>'; print '<div class="error">'.$langs->trans("ErrorCanNotReadDir",$dir).'</div>';
} }
@ -413,7 +422,6 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
if ($db->connected) $db->close(); if ($db->connected) $db->close();
} }
if (empty($actiondone)) if (empty($actiondone))
{ {
print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>'; print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';

View File

@ -16,6 +16,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 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
*/ */
/** /**