diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 4d21e1b0ef..755a57a45b 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -2,144 +2,35 @@ $title = 'Edit Comments'; $parent_file = 'edit.php'; require_once('admin-header.php'); - -if (!$showcomments) { - if ($comments_per_page) { - $showcomments=$comments_per_page; - } else { - $showcomments=10; - $comments_per_page=$showcomments; - } -} else { - $comments_per_page = $showcomments; -} - -if ((!empty($commentstart)) && (!empty($commentend)) && ($commentstart == $commentend)) { - $p=$commentstart; - $commentstart=0; - $commentend=0; -} - -if (!$commentstart) { - $commentstart=0; - $commentend=$showcomments; -} - -$nextXstart=$commentend; -$nextXend=$commentend+$showcomments; - -$previousXstart=($commentstart-$showcomments); -$previousXend=$commentstart; -if ($previousXstart < 0) { - $previousXstart=0; - $previousXend=$showcomments; -} - -ob_start(); ?>
- - - - - - - - - -
- Show comments: - - - - - - -
-
- 0) { -?> - - - - + +
+ Show Comments That Contain... + + +
+
+

View Mode | Mass Edit Mode

escape($s); + $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE + comment_author LIKE '%$s%' OR + comment_author_email LIKE '%$s%' OR + comment_author_url LIKE ('%$s%') OR + comment_author_IP LIKE ('%$s%') OR + comment_content LIKE ('%$s%') + ORDER BY comment_date"); +} else { + $comments = $wpdb->get_results("SELECT * FROM $tablecomments ORDER BY comment_date $commentorder LIMIT 20"); } -?> - -
-
- - - - -
-
-
-
- - -   - -
-
-
-  to   -   - -
-
-
- - -
- - get_results("SELECT * FROM $tablecomments - ORDER BY comment_date $commentorder - LIMIT $commentstart, $commentend" - ); - -// need to account for offet, etc. - if ($comments) { echo '
    '; foreach ($comments as $comment) { @@ -182,6 +73,5 @@ echo $comments_nav_bar;
diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index ce43e54947..8863f92fb3 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -1,27 +1,13 @@ - -
\n\n +
diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 925b46486c..cc38b1a336 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -1,53 +1,21 @@ - + get_results("SELECT ID, post_title FROM $tableposts WHERE post_status = 'draft' AND post_author = $user_ID"); if ($drafts) { - ?> -
-

Your Drafts: - +

+

Your Drafts: + ID' title='Edit this draft'>$draft->post_title"; ++$i; } - ?>.

-
- -
- - - - - - - - - -
- Show posts: - - - - - - -
- - 0) { -?> - - - - + ?> + .

+ - -
-
- - - - -
-
-
-
- - -   - -
-
-
-  to   -   - -
-
-
- - - -
- - - - - - -
-
- - - -
-
-
- - -
-
-
- "; - $arc_result=$wpdb->get_results("SELECT DISTINCT YEAR(post_date), MONTH(post_date) FROM $tableposts ORDER BY post_date DESC",ARRAY_A); - foreach ($arc_result as $arc_row) { - $arc_year = $arc_row["YEAR(post_date)"]; - $arc_month = $arc_row["MONTH(post_date)"]; - echo "\n"; - } - } elseif ($archive_mode == "daily") { - echo ""; - if (!isset($start_of_week)) { - $start_of_week = 1; - } - $archive_week_start_date_format = "Y/m/d"; - $archive_week_end_date_format = "Y/m/d"; - $archive_week_separator = " - "; - $arc_result=$wpdb->geT_results("SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date), WEEK(post_date) FROM $tableposts ORDER BY post_date DESC", ARRAY_A); - $arc_w_last = ''; - foreach ($arc_result as $arc_row) { - $arc_year = $arc_row["YEAR(post_date)"]; - $arc_w = $arc_row["WEEK(post_date)"]; - if ($arc_w != $arc_w_last) { - $arc_w_last = $arc_w; - $arc_ymd = $arc_year."-".zeroise($arc_row["MONTH(post_date)"],2)."-" .zeroise($arc_row["DAYOFMONTH(post_date)"],2); - $arc_week = get_weekstartend($arc_ymd, $start_of_week); - $arc_week_start = date($archive_week_start_date_format, $arc_week['start']); - $arc_week_end = date($archive_week_end_date_format, $arc_week['end']); - echo "\n"; - } - } - } elseif ($archive_mode == "postbypost") { - echo ''; - echo '"; - ?> - -
-
- - +
+
+
+ Show Posts That Contain... + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + -

- [ - $authordata->user_level) or ($user_login == $authordata->user_login)) { - echo " - Edit"; - echo " - Delete "; +

+ + + +
IDWhenTitleCategoriesCommentsAuthorEditDelete
g:i:s a'); ?> + + + post_status) echo ' - Private'; ?> + + $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "Edit"; } ?> $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "Delete"; } ?>
No posts found.
+get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); + if ($comments) { + ?> +

Comments

+
    +comment_ID); +?> + +
  1. > + + @ + + $authordata->user_level) or ($user_login == $authordata->user_login)) { + echo "[ comment_ID."\">Edit"; + echo " - ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete "; + if ( ('none' != $comment_status) && ($user_level >= 3) ) { + if ('approved' == wp_get_comment_status($comment->comment_ID)) { + echo " - ID."&comment=".$comment->comment_ID."\">Unapprove "; + } else { + echo " - ID."&comment=".$comment->comment_ID."\">Approve "; + } } - if ('private' == $post->post_status) echo ' - Private'; - ?> - ] -
    - (), in
    - -

    - get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); - if ($comments) { - ?> - -

    Comments

    -
      - - - -
    1. - comment_ID); - - if ("unapproved" == $comment_status) { - echo ""; - } - ?> - @ - $authordata->user_level) or ($user_login == $authordata->user_login)) { - echo "[ comment_ID."\">Edit"; - echo " - ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete "; - if ( ('none' != $comment_status) && ($user_level >= 3) ) { - if ('approved' == wp_get_comment_status($comment->comment_ID)) { - echo " - ID."&comment=".$comment->comment_ID."\">Unapprove "; - } else { - echo " - ID."&comment=".$comment->comment_ID."\">Approve "; - } - } - echo "]"; - } // end if any comments to show - ?> -
      - ( / ) (IP: ) - - "; - } - ?> -
    2. - - - '; - }//end if comments - if ($comment_error) - echo "

      Error: please fill the required fields (name & comment)

      "; - ?> - -

      Leave Comment

      - - - - -
      - - " /> -
      -
      -
      -
      - -
      - - - -
      - - -

      - No results found. -

      - - +
      + + + ( + + / + + ) (IP: + + ) + + + +'; + }//end if comments ?> - -
- +

Back to posts

+ +
+?> diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 8bb7b2c3a4..6a412bdf47 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -11,7 +11,7 @@ foreach ($menu as $item) { $item = explode("\t", $item); // 0 = user level, 1 = file, 2 = name $self = str_replace('/wp-admin/', '', $PHP_SELF); - if ((substr($self, -20) == substr($item[1], -20)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"'; + if ((substr($self, -20) == substr($item[1], -20) && empty($parent_file)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"'; if ($user_level >= $item[0]) { if (('upload.php' == $item[1] && $use_fileupload && ($user_level >= $fileupload_minlevel) && (in_array($user_login, explode(' ', $allowed_users)) || (trim($fileupload_allowedusers)==""))) || 'upload.php' != $item[1]) diff --git a/wp-admin/post.php b/wp-admin/post.php index c888fe371f..5cc343ecd1 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -431,6 +431,7 @@ switch($action) { case 'editcomment': $title = 'Edit Comment'; $standalone = 0; + $parent_file = 'edit.php'; require_once ('admin-header.php'); get_currentuserinfo();