diff options
author | plegall <plg@piwigo.org> | 2005-09-17 21:14:28 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-09-17 21:14:28 +0000 |
commit | 518569483b2f814c6915e4f13aa5bb32a67df872 (patch) | |
tree | 01ccb959eab2df5e8069166ba43637bfa06c85db /feed.php | |
parent | 8a525d57ba8c4da537b87f6f04d09160e3d9a490 (diff) |
- new: the number of elements waiting for validation is notified in RSS
feed.
git-svn-id: http://piwigo.org/svn/trunk@864 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'feed.php')
-rw-r--r-- | feed.php | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -139,6 +139,22 @@ SELECT user_id } /** + * currently waiting pictures + * + * @return array waiting ids + */ +function waiting_elements() +{ + $query = ' +SELECT id + FROM '.WAITING_TABLE.' + WHERE validated = \'false\' +;'; + + return array_from_query($query, 'id'); +} + +/** * What's new between two dates ? * * Informations : number of new comments, number of new elements, number of @@ -188,6 +204,18 @@ function news($start, $end) { array_push($news, sprintf(l10n('%d new users'), $nb_new_users)); } + + $nb_waiting_elements = count(waiting_elements()); + if ($nb_waiting_elements > 0) + { + array_push( + $news, + sprintf( + l10n('%d waiting elements'), + $nb_waiting_elements + ) + ); + } } return $news; |