aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_notification.inc.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 /include/functions_notification.inc.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 '')
-rw-r--r--include/functions_notification.inc.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php
index a687195d9..18378cbb4 100644
--- a/include/functions_notification.inc.php
+++ b/include/functions_notification.inc.php
@@ -206,7 +206,7 @@ function custom_notification_query($action, $type, $start, $end)
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($infos, $row);
+ $infos[] = $row;
}
return $infos;
@@ -369,7 +369,7 @@ function add_news_line(&$news, $count, $singular_fmt_key, $plural_fmt_key, $url=
{
$line = '<a href="'.$url.'">'.$line.'</a>';
}
- array_push($news, $line);
+ $news[] = $line;
}
}
@@ -450,7 +450,7 @@ SELECT date_available,
$dates = array();
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($dates, $row);
+ $dates[] = $row;
}
for ($i=0; $i<count($dates); $i++)
@@ -469,7 +469,7 @@ SELECT DISTINCT i.*
$result = pwg_query($query);
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($dates[$i]['elements'], $row);
+ $dates[$i]['elements'][] = $row;
}
}
@@ -489,7 +489,7 @@ SELECT DISTINCT c.uppercats, COUNT(DISTINCT i.id) AS img_count
$result = pwg_query($query);
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($dates[$i]['categories'], $row);
+ $dates[$i]['categories'][] = $row;
}
}
}
@@ -546,8 +546,7 @@ function get_html_description_recent_post_date($date_detail)
$description .=
'<li>'
- .l10n_dec('%d album updated', '%d albums updated',
- $date_detail['nb_cats'])
+ .l10n_dec('%d album updated', '%d albums updated', $date_detail['nb_cats'])
.'</li>';
$description .= '<ul>';
@@ -557,8 +556,7 @@ function get_html_description_recent_post_date($date_detail)
'<li>'
.get_cat_display_name_cache($cat['uppercats'])
.' ('.
- l10n_dec('%d new photo',
- '%d new photos', $cat['img_count']).')'
+ l10n_dec('%d new photo', '%d new photos', $cat['img_count']).')'
.'</li>';
}
$description .= '</ul>';