aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-19 17:43:04 +0000
committermistic100 <mistic@piwigo.org>2013-10-19 17:43:04 +0000
commitae707279a1945e383c312cd648d288606a79e341 (patch)
tree917bdc6e0609ed0eefed5f3693de3a017685acc4 /upgrade.php
parent35ff1b7c1f933799397a0ce0a6723cf82f416ff3 (diff)
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
Diffstat (limited to 'upgrade.php')
-rw-r--r--upgrade.php23
1 files changed, 9 insertions, 14 deletions
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 <i>%s</i>, before <b>?></b>, insert:'),
- PWG_LOCAL_DIR.'config/database.inc.php'
- )
- .'<p><textarea rows="4" cols="40">'
- .implode("\r\n" , $mysql_changes).'</textarea></p>'
- );
+ $page['infos'][] = l10n(
+ 'In <i>%s</i>, before <b>?></b>, insert:',
+ PWG_LOCAL_DIR.'config/database.inc.php'
+ )
+ .'<p><textarea rows="4" cols="40">'
+ .implode("\r\n" , $mysql_changes).'</textarea></p>';
}
}
@@ -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'];