aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog5
-rw-r--r--feed.php28
2 files changed, 33 insertions, 0 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 643dcca60..47a70328a 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,10 @@
2005-09-17 Pierrick LE GALL
+ * new: the number of elements waiting for validation is notified
+ in RSS feed.
+
+2005-09-17 Pierrick LE GALL
+
* translation: common and admin strings translated in french from
english files
diff --git a/feed.php b/feed.php
index 49b52c103..9f26000f7 100644
--- a/feed.php
+++ b/feed.php
@@ -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;