diff options
Diffstat (limited to 'plugins/LocalFilesEditor/admin.php')
-rw-r--r-- | plugins/LocalFilesEditor/admin.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php index 35b9a72a4..f9f297bd5 100644 --- a/plugins/LocalFilesEditor/admin.php +++ b/plugins/LocalFilesEditor/admin.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -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'], sprintf(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'); } } } @@ -149,4 +148,4 @@ $template->assign(array( $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); -?>
\ No newline at end of file +?> |