Changeset 1793 for trunk/wp-admin/post.php
- Timestamp:
- 10/14/2004 05:00:51 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1787 r1793 1 1 <?php 2 /* <Edit> */3 4 2 require_once('../wp-includes/wp-l10n.php'); 5 3 … … 655 653 case 'mailapprovecomment': 656 654 657 $standalone = 0;655 $standalone = 1; 658 656 require_once('./admin-header.php'); 659 657 … … 661 659 die (__('Cheatin’ uh?')); 662 660 663 $comment = $_GET['comment'];664 $p = $_GET['p']; 661 $comment = (int) $_GET['comment']; 662 665 663 $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 666 664 667 wp_set_comment_status($comment, "approve"); 668 if (get_settings("comments_notify") == true) { 669 wp_notify_postauthor($comment); 670 } 671 672 echo "<div class=\"wrap\">\n"; 673 echo "<p>" . __('Comment has been approved.') . "</p>\n"; 674 675 echo "<form action=\"". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments\" method=\"get\">\n"; 676 echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n"; 677 echo "<input type=\"hidden\" name=\"c\" value=\"1\" />\n"; 678 echo "<input type=\"submit\" value=\"" . __('Ok') . "\" />"; 679 echo "</form>\n"; 680 echo "</div>\n"; 665 if ('1' != $commentdata['comment_approved']) { 666 wp_set_comment_status($comment, 'approve'); 667 if (true == get_option('comments_notify')) 668 wp_notify_postauthor($comment); 669 } 670 671 header('Location: ' . get_option('siteurl') . '/wp-admin/moderation.php?approved=1'); 681 672 682 673 break;
Note: See TracChangeset
for help on using the changeset viewer.