Ignore:
Timestamp:
Nov 2, 2007, 12:08:27 AM (17 years ago)
Author:
rvelices
Message:

merge -r 2158 from branch-1_7 to trunk
fix: in page_header.php U_HOME template var was overwriting the ones from every page -> now it is always make_index_url
fix: unvalidated comments use start end for RSS instead of end only (otherwise google reader creates a new item every time it downloads the feed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_notification.inc.php

    r1957 r2159  
    3030
    3131/*
    32  * get standard sql where in order to 
     32 * get standard sql where in order to
    3333 * restict an filter caregories and images
    3434 *
     
    8484      $query = '
    8585  FROM '.COMMENTS_TABLE.'
    86   WHERE date <= \''.$end.'\'
    87     AND (validated = \'false\'
    88          OR validation_date > \''.$end.'\')
     86  WHERE date> \''.$start.'\' AND date <= \''.$end.'\'
     87    AND validated = \'false\'
    8988;';
    9089      break;
     
    227226 * Comments that are registered and not validated yet on a precise date
    228227 *
    229  * @param string date (mysql datetime format)
     228 * @param string start (mysql datetime format)
     229 * @param string end (mysql datetime format)
    230230 * @return count comment ids
    231231 */
    232 function nb_unvalidated_comments($date)
    233 {
    234   return custom_notification_query('count', 'unvalidated_comments', $date, $date);
    235 }
    236 
    237 /**
    238  * unvalidated at a precise date
    239  *
    240  * Comments that are registered and not validated yet on a precise date
    241  *
    242  * @param string date (mysql datetime format)
    243  * @return array comment ids
    244  */
    245 function unvalidated_comments($date)
    246 {
    247   return custom_notification_query('info', 'unvalidated_comments', $start, $end);
    248 }
     232function nb_unvalidated_comments($start, $end)
     233{
     234  return custom_notification_query('count', 'unvalidated_comments', $start, $end);
     235}
     236
    249237
    250238/**
     
    363351          (nb_new_elements($start, $end) > 0) or
    364352          (nb_updated_categories($start, $end) > 0) or
    365           ((is_admin()) and (nb_unvalidated_comments($end) > 0)) or
     353          ((is_admin()) and (nb_unvalidated_comments($start, $end) > 0)) or
    366354          ((is_admin()) and (nb_new_users($start, $end) > 0)) or
    367355          ((is_admin()) and (nb_waiting_elements() > 0))
     
    425413  {
    426414    add_news_line( $news,
    427         nb_unvalidated_comments($end), '%d comment to validate', '%d comments to validate',
     415        nb_unvalidated_comments($start, $end), '%d comment to validate', '%d comments to validate',
    428416        get_root_url().'admin.php?page=comments', $add_url );
    429417
     
    514502
    515503/*
    516   Call function get_recent_post_dates but 
     504  Call function get_recent_post_dates but
    517505  the parameters to be passed to the function, as an indexed array.
    518  
     506
    519507*/
    520508function get_recent_post_dates_array($args)
     
    539527
    540528  $description = '';
    541  
     529
    542530  $description .=
    543531        '<li>'
Note: See TracChangeset for help on using the changeset viewer.