- 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
This commit is contained in:
plegall
2005-09-17 21:14:28 +00:00
parent 8a525d57ba
commit 518569483b
2 changed files with 33 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
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

View File

@@ -138,6 +138,22 @@ SELECT user_id
return array_from_query($query, '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 ?
*
@@ -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;