[wp-cvs] wordpress/wp-admin edit-form-comment.php, 1.15, 1.16 post.php, 1.121, 1.122

Matthew Mullenweg saxmatt at users.sourceforge.net
Mon Jan 31 04:22:03 GMT 2005


Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21451/wp-admin

Modified Files:
	edit-form-comment.php post.php 
Log Message:
Moderation confirmation from Ryan, some other template and comment editing improvements.

Index: edit-form-comment.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-form-comment.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** edit-form-comment.php	9 Sep 2004 17:51:33 -0000	1.15
--- edit-form-comment.php	31 Jan 2005 04:22:00 -0000	1.16
***************
*** 1,4 ****
  <?php
- 
  $submitbutton_text = __('Edit Comment &raquo;');
  $toprow_title = sprintf(__('Editing Comment # %s'), $commentdata['comment_ID']);
--- 1,3 ----
***************
*** 6,12 ****
  $form_extra = "' />\n<input type='hidden' name='comment_ID' value='$comment' />\n<input type='hidden' name='comment_post_ID' value='".$commentdata["comment_post_ID"];
  ?>
- <div class="wrap">
  
  <form name="post" action="post.php" method="post" id="post">
  <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
  <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
--- 5,11 ----
  $form_extra = "' />\n<input type='hidden' name='comment_ID' value='$comment' />\n<input type='hidden' name='comment_post_ID' value='".$commentdata["comment_post_ID"];
  ?>
  
  <form name="post" action="post.php" method="post" id="post">
+ <div class="wrap">
  <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
  <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
***************
*** 60,75 ****
  </p>
  
  
! <?php
  
  
! // if the level is 5+, allow user to edit the timestamp - not on 'new post' screen though
! // if (($user_level > 4) && ($action != "post"))
! if ($user_level > 4) {
! 	touch_time(($action == 'edit'));
! }
! ?>
  
- </form>
- <p><a class="delete" href="post.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $commentdata['comment_ID']; ?>&amp;p=<?php echo $commentdata['comment_post_ID']; ?>"><?php _e('Delete comment') ?></a></p>
  </div>
--- 59,89 ----
  </p>
  
+ </div>
  
! <div class="wrap">
! <h2><?php _e('Advanced'); ?></h2>
  
+ <table width="100%" cellspacing="2" cellpadding="5" class="editform">
+ 	<tr>
+ 		<th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
+ 		<td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment_status, '1'); ?> /> <?php _e('Approved') ?></label><br />
+ 	  <label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment_status, '0'); ?> /> <?php _e('Moderated') ?></label><br />
+ 	  <label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment_status, 'spam'); ?> /> <?php _e('Spam') ?></label></td>
+ 	</tr>
  
! <?php if ($user_level > 4) : ?>
! 	<tr>
! 		<th scope="row"><?php _e('Edit time'); ?>:</th>
! 		<td><?php touch_time(($action == 'edit')); ?></td>
! 	</tr>
! <?php endif; ?>
! 
! 	<tr>
! 		<th scope="row"><?php _e('Delete'); ?>:</th>
! 		<td><p><a class="delete" href="post.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $commentdata['comment_ID']; ?>&amp;p=<?php echo $commentdata['comment_post_ID']; ?>"><?php _e('Delete comment') ?></a></p></td>
! 	</tr>
! </table>
  
  </div>
+ 
+ </form>

Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** post.php	24 Jan 2005 05:36:20 -0000	1.121
--- post.php	31 Jan 2005 04:22:00 -0000	1.122
***************
*** 430,433 ****
--- 430,435 ----
  	$content = format_to_edit($content);
  	$content = apply_filters('comment_edit_pre', $content);
+ 	
+ 	$comment_status = $commentdata['comment_approved'];
  
  	include('edit-form-comment.php');
***************
*** 586,589 ****
--- 588,592 ----
  	$newcomment_author_email = $_POST['newcomment_author_email'];
  	$newcomment_author_url = $_POST['newcomment_author_url'];
+ 	$comment_status = $_POST['comment_status'];
  
  	if (!user_can_edit_post_comments($user_ID, $comment_post_ID)) {
***************
*** 613,616 ****
--- 616,620 ----
  			comment_author = '$newcomment_author',
  			comment_author_email = '$newcomment_author_email',
+ 			comment_approved = '$comment_status',
  			comment_author_url = '$newcomment_author_url'".$datemodif."
  		WHERE comment_ID = $comment_ID"



More information about the cvs mailing list