aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/languages.class.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 /admin/include/languages.class.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 'admin/include/languages.class.php')
-rw-r--r--admin/include/languages.class.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/admin/include/languages.class.php b/admin/include/languages.class.php
index c024d881b..450e39dad 100644
--- a/admin/include/languages.class.php
+++ b/admin/include/languages.class.php
@@ -57,7 +57,7 @@ class languages
case 'activate':
if (isset($crt_db_language))
{
- array_push($errors, 'CANNOT ACTIVATE - LANGUAGE IS ALREADY ACTIVATED');
+ $errors[] = 'CANNOT ACTIVATE - LANGUAGE IS ALREADY ACTIVATED';
break;
}
@@ -74,13 +74,13 @@ INSERT INTO '.LANGUAGES_TABLE.'
case 'deactivate':
if (!isset($crt_db_language))
{
- array_push($errors, 'CANNOT DEACTIVATE - LANGUAGE IS ALREADY DEACTIVATED');
+ $errors[] = 'CANNOT DEACTIVATE - LANGUAGE IS ALREADY DEACTIVATED';
break;
}
if ($language_id == get_default_language())
{
- array_push($errors, 'CANNOT DEACTIVATE - LANGUAGE IS DEFAULT LANGUAGE');
+ $errors[] = 'CANNOT DEACTIVATE - LANGUAGE IS DEFAULT LANGUAGE';
break;
}
@@ -95,12 +95,12 @@ DELETE
case 'delete':
if (!empty($crt_db_language))
{
- array_push($errors, 'CANNOT DELETE - LANGUAGE IS ACTIVATED');
+ $errors[] = 'CANNOT DELETE - LANGUAGE IS ACTIVATED';
break;
}
if (!isset($this->fs_languages[$language_id]))
{
- array_push($errors, 'CANNOT DELETE - LANGUAGE DOES NOT EXIST');
+ $errors[] = 'CANNOT DELETE - LANGUAGE DOES NOT EXIST';
break;
}
@@ -368,7 +368,7 @@ UPDATE '.USER_INFOS_TABLE.'
and $old_files = file($extract_path.'/obsolete.list', FILE_IGNORE_NEW_LINES)
and !empty($old_files))
{
- array_push($old_files, 'obsolete.list');
+ $old_files[] = 'obsolete.list';
foreach($old_files as $old_file)
{
$path = $extract_path.'/'.$old_file;