Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9154
Modified Files:
Tag: branch-smarty
NEWS serendipity_admin_comments.inc.php
Log Message:
MFH
Index: serendipity_admin_comments.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_comments.inc.php,v
retrieving revision 1.17.2.3
retrieving revision 1.17.2.4
diff -u -d -r1.17.2.3 -r1.17.2.4
--- serendipity_admin_comments.inc.php 16 Sep 2004 12:18:09 -0000 1.17.2.3
+++ serendipity_admin_comments.inc.php 24 Sep 2004 22:03:18 -0000 1.17.2.4
@@ -113,6 +113,13 @@
$searchString .= (!empty($serendipity['GET']['filter'][$filter]) ? "&serendipity[filter][". $filter ."]=". $serendipity['GET']['filter'][$filter] : "");
}
+if ( $serendipity['GET']['filter']['show'] == 'approved' ) {
+ $and .= "AND status = 'approved'";
+} elseif ( $serendipity['GET']['filter']['show'] == 'pending' ) {
+ $and .= "AND status = 'pending'";
+} else {
+ $serendipity['GET']['filter']['show'] = 'all';
+}
/* Paging */
$sql = serendipity_db_query("SELECT COUNT(*) AS total FROM {$serendipity['dbPrefix']}comments c WHERE c.type = 'NORMAL' ". $and, true);
@@ -143,11 +150,6 @@
". $and ."
" . (($serendipity['serendipityUserlevel'] != USERLEVEL_ADMIN) ? 'AND e.authorid = ' . $serendipity['authorId'] : '') . "
ORDER BY id DESC $limit");
-if (!is_array($sql)) {
- echo NO_COMMENTS;
- return;
-}
-
?>
<script type="text/javascript">
function toggle(id) {
@@ -201,10 +203,23 @@
<td><input type="text" name="serendipity[filter][ip]" size="15" value="<?php echo $serendipity['GET']['filter']['ip'] ?>" /></td>
<td><?php echo CONTENT ?>:</td>
<td><input type="text" name="serendipity[filter][body]" size="15" value="<?php echo $serendipity['GET']['filter']['body'] ?>" /></td>
- <td colspan="2" align="center"><input type="submit" name="submit" value=" - <?php echo GO ?> - " /></td>
+ <td><?php echo COMMENTS_FILTER_SHOW ?>:</td>
+ <td><select name="serendipity[filter][show]">
+ <option value="all"<?php if ( $serendipity['GET']['filter']['show'] == 'all' ) echo ' SELECTED' ?>><?php echo COMMENTS_FILTER_ALL ?></option>
+ <option value="approved"<?php if ( $serendipity['GET']['filter']['show'] == 'approved' ) echo ' SELECTED' ?>><?php echo COMMENTS_FILTER_APPROVED_ONLY ?></option>
+ <option value="pending"<?php if ( $serendipity['GET']['filter']['show'] == 'pending' ) echo ' SELECTED' ?>><?php echo COMMENTS_FILTER_NEED_APPROVAL ?></option>
+ </select></td>
+ </tr>
+ <tr>
+ <td colspan="6" align="right"><input type="submit" name="submit" value=" - <?php echo GO ?> - " /></td>
</tr>
</table>
</form>
+<?php
+ if (!is_array($sql)) {
+ echo '<div align="center">'. NO_COMMENTS .'</div>';
+ } else {
+?>
<form action="" method="POST" name="formMultiDelete" id="formMultiDelete">
<input type="hidden" name="serendipity[formAction]" value="multiDelete" />
<table width="100%" cellspacing="5" cellpadding="0" border="0" class="serendipity_admin_list">
@@ -220,6 +235,7 @@
</td>
</tr>
<?php
+
$i = 0;
foreach ($sql as $rs) {
$i++;
@@ -299,3 +315,4 @@
</tr>
</table>
</form>
+<?php } ?>
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.214.2.22
retrieving revision 1.214.2.23
diff -u -d -r1.214.2.22 -r1.214.2.23
--- NEWS 23 Sep 2004 12:31:42 -0000 1.214.2.22
+++ NEWS 24 Sep 2004 22:03:18 -0000 1.214.2.23
@@ -29,6 +29,10 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Extend filter in commment moderation to allow the user to select
+ which types of comments he wants displayed "All", "Only approved",
+ "Need approval" (tomsommer)
+
* Upgraded Spam Protector event plugin. Optionally:
- use Captchas - images with string sequences which a
user has to enter before his comment is accepted.
@@ -54,7 +58,7 @@
* Bug #1031444 - Fixed postgreSQL error (for older versions of
pgsql) when creating categories (garvinhicking)
- * Fixed wrong XHTML enties in remoterss and shoutbox plugin. Thanks
+ * Fixed wrong XHTML entities in remoterss and shoutbox plugin. Thanks
to Stephan van Beerschoten! (garvinhicking)
* Fixed bug #1030581: Category sidebar plugin now properly displays
|