Changeset 864


Ignore:
Timestamp:
09/17/05 23:14:28 (15 years ago)
Author:
plg
Message:
  • new: the number of elements waiting for validation is notified in RSS feed.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/ChangeLog

    r863 r864  
     12005-09-17 Pierrick LE GALL 
     2 
     3        * new: the number of elements waiting for validation is notified 
     4        in RSS feed. 
     5 
    162005-09-17 Pierrick LE GALL 
    27 
  • trunk/feed.php

    r862 r864  
    140140 
    141141/** 
     142 * currently waiting pictures 
     143 * 
     144 * @return array waiting ids 
     145 */ 
     146function waiting_elements() 
     147{ 
     148  $query = ' 
     149SELECT id 
     150  FROM '.WAITING_TABLE.' 
     151  WHERE validated = \'false\' 
     152;'; 
     153 
     154  return array_from_query($query, 'id'); 
     155} 
     156 
     157/** 
    142158 * What's new between two dates ? 
    143159 * 
     
    188204    { 
    189205      array_push($news, sprintf(l10n('%d new users'), $nb_new_users)); 
     206    } 
     207 
     208    $nb_waiting_elements = count(waiting_elements()); 
     209    if ($nb_waiting_elements > 0) 
     210    { 
     211      array_push( 
     212        $news, 
     213        sprintf( 
     214          l10n('%d waiting elements'), 
     215          $nb_waiting_elements 
     216          ) 
     217        ); 
    190218    } 
    191219  } 
Note: See TracChangeset for help on using the changeset viewer.