From ae707279a1945e383c312cd648d288606a79e341 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 19 Oct 2013 17:43:04 +0000 Subject: remove all array_push (50% slower than []) + some changes missing for feature:2978 git-svn-id: http://piwigo.org/svn/trunk@25018 68402e56-0260-453c-a942-63ccdbb3a9ee --- upgrade.php | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'upgrade.php') diff --git a/upgrade.php b/upgrade.php index 446f1ee17..06014b3fc 100644 --- a/upgrade.php +++ b/upgrade.php @@ -73,7 +73,7 @@ SHOW TABLES { if (preg_match('/^'.PREFIX_TABLE.'/', $row[0])) { - array_push($tables, $row[0]); + $tables[] = $row[0]; } } @@ -100,7 +100,7 @@ DESC '.$table.' while ($row = pwg_db_fetch_row($result)) { - array_push($columns_of[$table], $row[0]); + $columns_of[$table][] = $row[0]; } } @@ -389,15 +389,12 @@ if ((isset($_POST['submit']) or isset($_GET['now'])) if (!@file_put_contents($config_file, $config_file_contents)) { - array_push( - $page['infos'], - sprintf( - l10n('In %s, before ?>, insert:'), - PWG_LOCAL_DIR.'config/database.inc.php' - ) - .'

' - ); + $page['infos'][] = l10n( + 'In %s, before ?>, insert:', + PWG_LOCAL_DIR.'config/database.inc.php' + ) + .'

'; } } @@ -430,9 +427,7 @@ if ((isset($_POST['submit']) or isset($_GET['now'])) ) ); - array_push($page['infos'], - l10n('Perform a maintenance check in [Administration>Tools>Maintenance] if you encounter any problem.') - ); + $page['infos'][] = l10n('Perform a maintenance check in [Administration>Tools>Maintenance] if you encounter any problem.'); // Save $page['infos'] in order to restore after maintenance actions $page['infos_sav'] = $page['infos']; -- cgit v1.2.3