Changeset 549 for trunk/wp-admin/wp-moderation.php
- Timestamp:
- 11/15/2003 08:58:18 AM (23 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/wp-moderation.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/wp-moderation.php
r546 r549 43 43 44 44 $standalone = 1; 45 require_once( "b2header.php");45 require_once('b2header.php'); 46 46 47 47 if ($user_level < 3) { 48 die('<p>You have no right to moderate comments.<br />Ask for a promotion toyour <a href="mailto:$admin_email">blog admin</a>. :)</p>');48 die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>'); 49 49 } 50 50 51 51 // check if comment moderation is turned on in the settings 52 52 // if not, just give a short note and stop 53 if ( get_settings("comment_moderation") == "none") {54 echo "<div class=\"wrap\">\n";55 echo "Comment moderation has been turned off.<br /><br />\n";56 echo "</div>\n";57 include("b2footer.php");53 if ('none' == get_settings("comment_moderation")) { 54 echo '<div class="wrap"> 55 <p>Comment moderation has been turned off.</p> 56 </div>'; 57 require('b2footer.php'); 58 58 exit; 59 59 } … … 65 65 foreach($comment as $key => $value) { 66 66 switch($value) { 67 case "later":68 // do nothing with that comment69 // wp_set_comment_status($key, "hold");70 ++$item_ignored;71 break;72 73 case "delete":74 wp_set_comment_status($key, "delete");75 ++$item_deleted;76 break;77 78 case "approve":79 wp_set_comment_status($key, "approve");80 if (get_settings("comments_notify") == true) {81 wp_notify_postauthor($key);82 }83 ++$item_approved;84 break;67 case 'later': 68 // do nothing with that comment 69 // wp_set_comment_status($key, "hold"); 70 ++$item_ignored; 71 break; 72 73 case 'delete': 74 wp_set_comment_status($key, 'delete'); 75 ++$item_deleted; 76 break; 77 78 case 'approve': 79 wp_set_comment_status($key, 'approve'); 80 if (get_settings('comments_notify') == true) { 81 wp_notify_postauthor($key); 82 } 83 ++$item_approved; 84 break; 85 85 } 86 86 } … … 97 97 98 98 if ($user_level <= 3) { 99 die('<p>You have no right to moderate comments.<br>Ask for a promotion toyour <a href="mailto:$admin_email">blog admin</a>. :)</p>');99 die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>'); 100 100 } 101 101 102 102 // check if comment moderation is turned on in the settings 103 103 // if not, just give a short note and stop 104 if ( get_settings("comment_moderation") == "none") {105 echo "<div class=\"wrap\">\n";106 echo "Comment moderation has been turned off.<br /><br />\n";107 echo "</div>\n";104 if ('none' == get_settings('comment_moderation')) { 105 echo '<div class="wrap"> 106 <p>Comment moderation has been turned off.</p> 107 </div>'; 108 108 include("b2footer.php"); 109 109 exit; … … 145 145 <?php 146 146 147 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_approved ='0'");147 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_approved = 0"); 148 148 if ($comments) { 149 149 // list all comments that are waiting for approval
Note: See TracChangeset
for help on using the changeset viewer.