Changeset 25084 for trunk/admin.php


Ignore:
Timestamp:
Oct 22, 2013, 10:39:10 PM (11 years ago)
Author:
plg
Message:

feature 2920 added: change admin screen "pending comments" to "all comments".
Now the administrator can filter on "all" or "pending" with a single click.

In the admin menu, we display the number of pending comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r24834 r25084  
    207207if ($conf['activate_comments'])
    208208{
    209   $template->assign('U_PENDING_COMMENTS', $link_start.'comments');
     209  $template->assign('U_COMMENTS', $link_start.'comments');
     210 
     211  // pending comments
     212  $query = '
     213SELECT COUNT(*)
     214  FROM '.COMMENTS_TABLE.'
     215  WHERE validated=\'false\'
     216;';
     217  list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
     218
     219  if ($nb_comments > 0)
     220  {
     221    $template->assign('NB_PENDING_COMMENTS', $nb_comments);
     222  }
    210223}
    211224
Note: See TracChangeset for help on using the changeset viewer.