aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/admin.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 /plugins/LocalFilesEditor/admin.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 'plugins/LocalFilesEditor/admin.php')
-rw-r--r--plugins/LocalFilesEditor/admin.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php
index 71d0e220f..29a5b6324 100644
--- a/plugins/LocalFilesEditor/admin.php
+++ b/plugins/LocalFilesEditor/admin.php
@@ -56,9 +56,8 @@ include_once(LOCALEDIT_PATH.'include/'.$page['tab'].'.inc.php');
if (isset($_POST['restore']))
{
$content_file = file_get_contents(get_bak_file($edited_file));
- array_push($page['infos'],
- l10n('locfiledit_bak_loaded1'),
- l10n('locfiledit_bak_loaded2'));
+ $page['infos'][] = l10n('locfiledit_bak_loaded1'),
+ $page['infos'][] = l10n('locfiledit_bak_loaded2');
}
// +-----------------------------------------------------------------------+
@@ -70,7 +69,7 @@ if (isset($_POST['submit']))
if (!is_webmaster())
{
- array_push($page['errors'], l10n('locfiledit_webmaster_only'));
+ $page['errors'][] = l10n('locfiledit_webmaster_only');
}
else
{
@@ -81,7 +80,7 @@ if (isset($_POST['submit']))
}
if ($content_file === false)
{
- array_push($page['errors'], l10n('locfiledit_syntax_error'));
+ $page['errors'][] = l10n('locfiledit_syntax_error');
}
else
{
@@ -92,7 +91,7 @@ if (isset($_POST['submit']))
if (file_exists($edited_file))
{
@copy($edited_file, get_bak_file($edited_file));
- array_push($page['infos'], l10n('locfiledit_saved_bak', substr(get_bak_file($edited_file), 2)));
+ $page['infos'][] = l10n('locfiledit_saved_bak', substr(get_bak_file($edited_file), 2));
}
if ($file = @fopen($edited_file , "w"))
@@ -104,7 +103,7 @@ if (isset($_POST['submit']))
}
else
{
- array_push($page['errors'], l10n('locfiledit_cant_save'));
+ $page['errors'][] = l10n('locfiledit_cant_save');
}
}
}