diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-07-09 10:00:15 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-07-09 10:00:15 +0000 |
| commit | 6211685ea85940b5cd34a850f3f1de9d483dd4df (patch) | |
| tree | 9867583f435190c01e8116614c9f93935fb7ceb6 /wp-admin | |
| parent | bfed4d22293ce81b07d262eb89ae1883a5e3b5ab (diff) | |
| download | wordpress-mu-6211685ea85940b5cd34a850f3f1de9d483dd4df.tar.gz wordpress-mu-6211685ea85940b5cd34a850f3f1de9d483dd4df.tar.xz wordpress-mu-6211685ea85940b5cd34a850f3f1de9d483dd4df.zip | |
WP Merge with revision 8300
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1360 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin')
| -rw-r--r-- | wp-admin/admin-ajax.php | 53 | ||||
| -rw-r--r-- | wp-admin/css/install.css | 22 | ||||
| -rw-r--r-- | wp-admin/gears-manifest.php | 4 | ||||
| -rw-r--r-- | wp-admin/includes/template.php | 8 | ||||
| -rw-r--r-- | wp-admin/upgrade.php | 6 |
5 files changed, 66 insertions, 27 deletions
diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index b2049e6..7564a8b 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -30,14 +30,17 @@ switch ( $action = $_POST['action'] ) : case 'delete-comment' : check_ajax_referer( "delete-comment_$id" ); if ( !$comment = get_comment( $id ) ) - die('0'); + die('1'); if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) die('-1'); - if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) + if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { + if ( 'spam' == wp_get_comment_status( $comment->comment_ID ) ) + die('1'); $r = wp_set_comment_status( $comment->comment_ID, 'spam' ); - else + } else { $r = wp_delete_comment( $comment->comment_ID ); + } die( $r ? '1' : '0' ); break; @@ -46,24 +49,38 @@ case 'delete-cat' : if ( !current_user_can( 'manage_categories' ) ) die('-1'); + $cat = get_category( $id ); + if ( !$cat || is_wp_error( $cat ) ) + die('1'); + if ( wp_delete_category( $id ) ) die('1'); - else die('0'); + else + die('0'); break; case 'delete-tag' : check_ajax_referer( "delete-tag_$id" ); if ( !current_user_can( 'manage_categories' ) ) die('-1'); + $tag = get_term( $id, 'post_tag' ); + if ( !$tag || is_wp_error( $tag ) ) + die('1'); + if ( wp_delete_term($id, 'post_tag')) die('1'); - else die('0'); + else + die('0'); break; case 'delete-link-cat' : check_ajax_referer( "delete-link-category_$id" ); if ( !current_user_can( 'manage_categories' ) ) die('-1'); + $cat = get_term( $id, 'link_category' ); + if ( !$cat || is_wp_error( $cat ) ) + die('1'); + $cat_name = get_term_field('name', $id, 'link_category'); // Don't delete the default cats. @@ -94,14 +111,20 @@ case 'delete-link' : if ( !current_user_can( 'manage_links' ) ) die('-1'); + $link = get_bookmark( $id ); + if ( !$link || is_wp_error( $link ) ) + die('1'); + if ( wp_delete_link( $id ) ) die('1'); - else die('0'); + else + die('0'); break; case 'delete-meta' : check_ajax_referer( "delete-meta_$id" ); if ( !$meta = get_post_meta_by_id( $id ) ) - die('0'); + die('1'); + if ( !current_user_can( 'edit_post', $meta->post_id ) ) die('-1'); if ( delete_meta( $meta->meta_id ) ) @@ -113,6 +136,9 @@ case 'delete-post' : if ( !current_user_can( 'delete_post', $id ) ) die('-1'); + if ( !get_post( $id ) ) + die('1'); + if ( wp_delete_post( $id ) ) die('1'); else @@ -123,19 +149,28 @@ case 'delete-page' : if ( !current_user_can( 'delete_page', $id ) ) die('-1'); + if ( !get_page( $id ) ) + die('1'); + if ( wp_delete_post( $id ) ) die('1'); - else die('0'); + else + die('0'); break; case 'dim-comment' : if ( !$comment = get_comment( $id ) ) die('0'); + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) die('-1'); if ( !current_user_can( 'moderate_comments' ) ) die('-1'); - if ( 'unapproved' == wp_get_comment_status($comment->comment_ID) ) { + $current = wp_get_comment_status( $comment->comment_ID ); + if ( $_POST['new'] == $current ) + die('1'); + + if ( 'unapproved' == $current ) { check_ajax_referer( "approve-comment_$id" ); if ( wp_set_comment_status( $comment->comment_ID, 'approve' ) ) die('1'); diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css index 5f4164c..bc44b1c 100644 --- a/wp-admin/css/install.css +++ b/wp-admin/css/install.css @@ -37,7 +37,11 @@ ul, ol { padding: 5px 5px 5px 22px; } #logo { margin: 6px 0 14px 0px; border-bottom: none;} -.step a, .step input { font-size: 2em; } +.step { + font-size: 2.2em; +} + +.step input { font-size: 2em; } td input { font-size: 1.5em; } @@ -45,14 +49,13 @@ td input { font-size: 1.5em; } .submit input, .button, .button-secondary { font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 6px; - border: none; + padding: 5px 7px 7px; + border: 1px solid #a3a3a3; margin-left: 0; - font-size: 13px !important; - -moz-border-radius: 2px; - -khtml-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; color: #246; background: #e5e5e5; } @@ -63,6 +66,7 @@ td input { font-size: 1.5em; } .submit input:hover, .button:hover, .button-secondary:hover { color: #d54e21; + border-color: #535353; } .form-table { @@ -121,4 +125,4 @@ h1 { #error-page code { font-size: 1em; -}
\ No newline at end of file +} diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php index 7daed22..9abb9b3 100644 --- a/wp-admin/gears-manifest.php +++ b/wp-admin/gears-manifest.php @@ -145,7 +145,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311b" }, { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, @@ -158,7 +158,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index bde13d0..9d7caf5 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -768,15 +768,15 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true $actions = array(); if ( current_user_can('edit_post', $comment->comment_post_ID) ) { - $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; - $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; + $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; + $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; // we're looking at list of only approved or only unapproved comments if ( 'moderated' == $comment_status ) { - $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; + $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; unset($actions['unapprove']); } elseif ( 'approved' == $comment_status ) { - $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; + $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; unset($actions['approve']); } diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index dc7ec4b..e3afe46 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -25,7 +25,7 @@ else <h2><?php _e('No Upgrade Required'); ?></h2> <p><?php _e('Your WordPress database is already up-to-date!'); ?></p> -<h2 class="step"><a href="<?php echo get_option('home'); ?>/"><?php _e('Continue'); ?></a></h2> +<p class="step"><a class="button" href="<?php echo get_option('home'); ?>/"><?php _e('Continue'); ?></a></p> <?php else : switch($step) : @@ -37,7 +37,7 @@ switch($step) : <h2><?php _e('Database Upgrade Required'); ?></h2> <p><?php _e('Your WordPress database is out-of-date, and must be upgraded before you can continue.'); ?></p> <p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p> -<h2 class="step"><a href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress'); ?></a></h2> +<p class="step"><a class="button" href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress'); ?></a></p> <?php break; case 1: @@ -57,7 +57,7 @@ switch($step) : ?> <h2><?php _e('Upgrade Complete'); ?></h2> <p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p> - <h2 class="step"><a href="<?php echo $backto; ?>"><?php _e('Continue'); ?></a></h2> + <p class="step"><a class="button" href="<?php echo $backto; ?>"><?php _e('Continue'); ?></a></p> <!-- <pre> |
