Changeset 1260
- Timestamp:
- 04/24/08 11:45:39 (3 months ago)
- Files:
-
- trunk/wp-admin/admin-ajax.php (modified) (2 diffs)
- trunk/wp-admin/async-upload.php (modified) (2 diffs)
- trunk/wp-admin/comment.php (modified) (1 diff)
- trunk/wp-admin/css/media.css (modified) (5 diffs)
- trunk/wp-admin/css/widgets-rtl.css (modified) (1 diff)
- trunk/wp-admin/css/widgets.css (modified) (2 diffs)
- trunk/wp-admin/custom-header.php (modified) (5 diffs)
- trunk/wp-admin/edit-form-advanced.php (modified) (4 diffs)
- trunk/wp-admin/edit-form-comment.php (modified) (2 diffs)
- trunk/wp-admin/edit-link-form.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (2 diffs)
- trunk/wp-admin/edit-post-rows.php (modified) (3 diffs)
- trunk/wp-admin/edit.php (modified) (1 diff)
- trunk/wp-admin/import/blogger.php (modified) (1 diff)
- trunk/wp-admin/import/mt.php (modified) (1 diff)
- trunk/wp-admin/includes/admin.php (modified) (1 diff)
- trunk/wp-admin/includes/class-wp-filesystem-direct.php (modified) (13 diffs)
- trunk/wp-admin/includes/comment.php (modified) (2 diffs)
- trunk/wp-admin/includes/dashboard.php (modified) (1 diff)
- trunk/wp-admin/includes/file.php (modified) (1 diff)
- trunk/wp-admin/includes/image.php (modified) (1 diff)
- trunk/wp-admin/includes/media.php (modified) (8 diffs)
- trunk/wp-admin/includes/post.php (modified) (3 diffs)
- trunk/wp-admin/includes/schema.php (modified) (1 diff)
- trunk/wp-admin/includes/template.php (modified) (6 diffs)
- trunk/wp-admin/includes/upgrade.php (modified) (6 diffs)
- trunk/wp-admin/includes/widgets.php (modified) (9 diffs)
- trunk/wp-admin/index.php (modified) (1 diff)
- trunk/wp-admin/js/editor.js (modified) (7 diffs)
- trunk/wp-admin/js/post.js (modified) (4 diffs)
- trunk/wp-admin/js/widgets.js (modified) (2 diffs)
- trunk/wp-admin/menu.php (modified) (2 diffs)
- trunk/wp-admin/page.php (modified) (3 diffs)
- trunk/wp-admin/post.php (modified) (3 diffs)
- trunk/wp-admin/rtl.css (modified) (1 diff)
- trunk/wp-admin/widgets.php (modified) (2 diffs)
- trunk/wp-admin/wp-admin.css (modified) (3 diffs)
- trunk/wp-includes/author-template.php (modified) (1 diff)
- trunk/wp-includes/class-IXR.php (modified) (1 diff)
- trunk/wp-includes/classes.php (modified) (15 diffs)
- trunk/wp-includes/comment.php (modified) (2 diffs)
- trunk/wp-includes/feed-atom.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (5 diffs)
- trunk/wp-includes/functions.php (modified) (1 diff)
- trunk/wp-includes/js/autosave.js (modified) (4 diffs)
- trunk/wp-includes/js/swfupload/handlers.js (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/template.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/media/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/media/media.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/blank.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/pastetext.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/pasteword.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (6 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/about.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/anchor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/charmap.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/color_picker.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/editor_template.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/image.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/js/image.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/js/link.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/link.htm (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/content.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (7 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_gzip.php (deleted)
- trunk/wp-includes/js/tinymce/tiny_mce_popup.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/wordpress.css (modified) (1 diff)
- trunk/wp-includes/js/wp-lists.js (modified) (1 diff)
- trunk/wp-includes/link-template.php (modified) (3 diffs)
- trunk/wp-includes/media.php (modified) (10 diffs)
- trunk/wp-includes/pluggable.php (modified) (3 diffs)
- trunk/wp-includes/post-template.php (modified) (1 diff)
- trunk/wp-includes/post.php (modified) (10 diffs)
- trunk/wp-includes/query.php (modified) (2 diffs)
- trunk/wp-includes/rewrite.php (modified) (2 diffs)
- trunk/wp-includes/script-loader.php (modified) (7 diffs)
- trunk/wp-includes/shortcodes.php (modified) (6 diffs)
- trunk/wp-includes/taxonomy.php (modified) (1 diff)
- trunk/wp-includes/theme.php (modified) (1 diff)
- trunk/wp-includes/user.php (modified) (4 diffs)
- trunk/wp-includes/version.php (modified) (2 diffs)
- trunk/wp-includes/widgets.php (modified) (8 diffs)
- trunk/wp-login.php (modified) (3 diffs)
- trunk/wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r1218 r1260 163 163 continue; 164 164 $category = get_category( $cat_id ); 165 $checked_categories[] = $cat_id;166 165 ob_start(); 167 dropdown_categories( 0, $category);166 wp_category_checklist( 0, $cat_id, $checked_categories ); 168 167 $data = ob_get_contents(); 169 168 ob_end_clean(); … … 435 434 case 'add-user' : 436 435 check_ajax_referer( $action ); 437 if ( !current_user_can(' edit_users') )436 if ( !current_user_can('create_users') ) 438 437 die('-1'); 439 438 require_once(ABSPATH . WPINC . '/registration.php'); trunk/wp-admin/async-upload.php
r1214 r1260 21 21 wp_die(__('You do not have permission to upload files.')); 22 22 23 // just fetch the detail form for that attachment 24 if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) { 25 echo get_media_item($id); 26 exit; 27 } 28 23 29 $id = media_handle_upload('async-upload', $_REQUEST['post_id']); 24 30 if (is_wp_error($id)) { … … 27 33 } 28 34 29 $type = $_REQUEST['type']; 30 echo apply_filters("async_upload_{$type}", $id); 35 if ( $_REQUEST['short'] ) { 36 // short form response - attachment ID only 37 echo $id; 38 } 39 else { 40 // long form response - big chunk o html 41 $type = $_REQUEST['type']; 42 echo apply_filters("async_upload_{$type}", $id); 43 } 31 44 32 45 ?> trunk/wp-admin/comment.php
r1218 r1260 142 142 wp_delete_comment( $comment->comment_ID ); 143 143 144 if ( '' != wp_get_referer() && false == $noredir )144 if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' ) ) 145 145 wp_redirect( wp_get_referer() ); 146 else if ( '' != wp_get_original_referer() && false == $noredir ) 147 wp_redirect( wp_get_original_referer() ); 146 148 else 147 149 wp_redirect( get_option('siteurl') . '/wp-admin/edit-comments.php' ); trunk/wp-admin/css/media.css
r1218 r1260 92 92 } 93 93 94 .filename { 95 display: none; 94 .filename.original { 95 float: left; 96 } 97 .crunching { 98 display: block; 99 line-height: 32px; 100 text-align: right; 101 margin-right: 5px; 96 102 } 97 103 button.dismiss { … … 119 125 border-right-style: solid; 120 126 } 127 128 #library-form .progress, #gallery-form .progress { 129 display: none; 130 } 131 121 132 .media-item .thumbnail { 122 133 max-width: 128px; … … 124 135 } 125 136 .media-item .pinkynail { 126 position: absolute; 127 top: 2px; 128 left: 2px; 137 float: left; 138 margin: 2px; 129 139 height: 32px; 130 140 max-width: 40px; 131 141 } 132 142 133 t body.media-item-info tr {143 thead.media-item-info tr { 134 144 background-color: transparent; 135 145 } 136 t body.media-item-info th, tbody.media-item-info td {146 thead.media-item-info th, thead.media-item-info td { 137 147 border: none; 138 148 margin: 0; 139 149 } 140 150 141 .form-table t body.media-item-info {151 .form-table thead.media-item-info { 142 152 border: 8px solid #fff; 143 153 } … … 165 175 display: block; 166 176 line-height: 36px; 167 z-index: 2; 168 position: absolute; 169 top: 0px; 170 right: 20px; 177 float: right; 178 margin-right: 20px; 171 179 } 172 180 .describe-toggle-off { 173 181 display: none; 174 182 } 183 175 184 .clickmask { 176 background: transparent;177 position: absolute;178 top: 0px;179 left: 0px;180 cursor: pointer;181 border: none;182 z-index: 3;183 height: 36px;184 185 } 185 186 … … 211 212 212 213 #media-upload .media-item { 214 position: relative; 213 215 border-bottom-width: 1px; 214 216 border-bottom-style: solid; 215 width: 623px;216 position: relative;217 217 min-height: 36px; 218 } 219 #media-upload .filename { 220 display: block; 218 width: 100%; 219 } 220 .filename { 221 221 line-height: 36px; 222 margin-left: 50px;223 z-index: 2;222 margin-left: 10px; 223 float: left; 224 224 } 225 225 #media-upload .describe { trunk/wp-admin/css/widgets-rtl.css
r1218 r1260 36 36 li.widget-list-control-item h4.widget-title a, #dragHelper li.widget-list-control-item h4.widget-title a, #draghelper li.widget-list-control-item h4.widget-title a:visited { 37 37 right:auto; 38 left: 2em;38 left:1em; 39 39 } 40 40 trunk/wp-admin/css/widgets.css
r1218 r1260 92 92 } 93 93 94 ul.widget-control-list li { 95 position: relative; 96 } 97 94 98 div#current-widgets p.submit { 95 99 padding: 1em; … … 136 140 #dragHelper li.widget-list-control-item h4.widget-title a, 137 141 #draghelper li.widget-list-control-item h4.widget-title a:visited { 138 right: 2em;142 right: 1em; 139 143 } 140 144 trunk/wp-admin/custom-header.php
r1218 r1260 12 12 13 13 add_action("admin_print_scripts-$page", array(&$this, 'js_includes')); 14 add_action("admin_head-$page", array(&$this, 'take_action'), 50); 14 15 add_action("admin_head-$page", array(&$this, 'js'), 50); 15 16 add_action("admin_head-$page", $this->admin_header_callback, 51); 16 17 } 17 18 19 function step() { 20 $step = (int) @$_GET['step']; 21 if ( $step < 1 || 3 < $step ) 22 $step = 1; 23 return $step; 24 } 25 18 26 function js_includes() { 19 wp_enqueue_script('cropper'); 20 wp_enqueue_script('colorpicker'); 21 } 22 23 function js() { 24 27 $step = $this->step(); 28 if ( 1 == $step ) 29 wp_enqueue_script('colorpicker'); 30 elseif ( 2 == $step ) 31 wp_enqueue_script('cropper'); 32 } 33 34 function take_action() { 25 35 if ( isset( $_POST['textcolor'] ) ) { 26 36 check_admin_referer('custom-header'); … … 37 47 remove_theme_mods(); 38 48 } 39 ?> 49 } 50 51 function js() { 52 $step = $this->step(); 53 if ( 1 == $step ) 54 $this->js_1(); 55 elseif ( 2 == $step ) 56 $this->js_2(); 57 } 58 59 function js_1() { ?> 40 60 <script type="text/javascript"> 41 61 var cp = new ColorPicker(); 62 63 function pickColor(color) { 64 $('name').style.color = color; 65 $('desc').style.color = color; 66 $('textcolor').value = color; 67 } 68 function PopupWindow_hidePopup(magicword) { 69 if ( magicword != 'prettyplease' ) 70 return false; 71 if (this.divName != null) { 72 if (this.use_gebi) { 73 document.getElementById(this.divName).style.visibility = "hidden"; 74 } 75 else if (this.use_css) { 76 document.all[this.divName].style.visibility = "hidden"; 77 } 78 else if (this.use_layers) { 79 document.layers[this.divName].visibility = "hidden"; 80 } 81 } 82 else { 83 if (this.popupWindow && !this.popupWindow.closed) { 84 this.popupWindow.close(); 85 this.popupWindow = null; 86 } 87 } 88 return false; 89 } 90 function colorSelect(t,p) { 91 if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" ) { 92 cp.hidePopup('prettyplease'); 93 } else { 94 cp.p = p; 95 cp.select(t,p); 96 } 97 } 98 function colorDefault() { 99 pickColor('#<?php echo HEADER_TEXTCOLOR; ?>'); 100 } 101 102 function hide_text() { 103 $('name').style.display = 'none'; 104 $('desc').style.display = 'none'; 105 $('pickcolor').style.display = 'none'; 106 $('defaultcolor').style.display = 'none'; 107 $('textcolor').value = 'blank'; 108 $('hidetext').value = '<?php _e('Show Text'); ?>'; 109 // $('hidetext').onclick = 'show_text()'; 110 Event.observe( $('hidetext'), 'click', show_text ); 111 } 112 113 function show_text() { 114 $('name').style.display = 'block'; 115 $('desc').style.display = 'block'; 116 $('pickcolor').style.display = 'inline'; 117 $('defaultcolor').style.display = 'inline'; 118 $('textcolor').value = '<?php echo HEADER_TEXTCOLOR; ?>'; 119 $('hidetext').value = '<?php _e('Hide Text'); ?>'; 120 Event.stopObserving( $('hidetext'), 'click', show_text ); 121 Event.observe( $('hidetext'), 'click', hide_text ); 122 } 123 124 <?php if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?> 125 Event.observe( window, 'load', hide_text ); 126 <?php } ?> 127 128 </script> 129 <?php 130 } 131 132 function js_2() { ?> 133 <script type="text/javascript"> 42 134 function onEndCrop( coords, dimensions ) { 43 135 $( 'x1' ).value = coords.x1; … … 78 170 } 79 171 ); 80 81 var cp = new ColorPicker();82 83 function pickColor(color) {84 $('name').style.color = color;85 $('desc').style.color = color;86 $('textcolor').value = color;87 }88 function PopupWindow_hidePopup(magicword) {89 if ( magicword != 'prettyplease' )90 return false;91 if (this.divName != null) {92 if (this.use_gebi) {93 document.getElementById(this.divName).style.visibility = "hidden";94 }95 else if (this.use_css) {96 document.all[this.divName].style.visibility = "hidden";97 }98 else if (this.use_layers) {99 document.layers[this.divName].visibility = "hidden";100 }101 }102 else {103 if (this.popupWindow && !this.popupWindow.closed) {104 this.popupWindow.close();105 this.popupWindow = null;106 }107 }108 return false;109 }110 function colorSelect(t,p) {111 if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" ) {112 cp.hidePopup('prettyplease');113 } else {114 cp.p = p;115 cp.select(t,p);116 }117 }118 function colorDefault() {119 pickColor('<?php echo HEADER_TEXTCOLOR; ?>');120 }121 122 function hide_text() {123 $('name').style.display = 'none';124 $('desc').style.display = 'none';125 $('pickcolor').style.display = 'none';126 $('defaultcolor').style.display = 'none';127 $('textcolor').value = 'blank';128 $('hidetext').value = '<?php _e('Show Text'); ?>';129 // $('hidetext').onclick = 'show_text()';130 Event.observe( $('hidetext'), 'click', show_text );131 }132 133 function show_text() {134 $('name').style.display = 'block';135 $('desc').style.display = 'block';136 $('pickcolor').style.display = 'inline';137 $('defaultcolor').style.display = 'inline';138 $('textcolor').value = '<?php echo HEADER_TEXTCOLOR; ?>';139 $('hidetext').value = '<?php _e('Hide Text'); ?>';140 Event.stopObserving( $('hidetext'), 'click', show_text );141 Event.observe( $('hidetext'), 'click', hide_text );142 }143 144 <?php if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?>145 Event.observe( window, 'load', hide_text );146 <?php } ?>147 148 172 </script> 149 173 <?php … … 253 277 254 278 <p><?php _e('Choose the part of the image you want to use as your header.'); ?></p> 255 <div id="testWrap" >279 <div id="testWrap" style="position: relative"> 256 280 <img src="<?php echo $url; ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" /> 257 281 </div> … … 328 352 329 353 function admin_page() { 330 if ( !isset( $_GET['step'] ) ) 331 $step = 1; 332 else 333 $step = (int) $_GET['step']; 334 335 if ( 1 == $step ) { 354 $step = $this->step(); 355 if ( 1 == $step ) 336 356 $this->step_1(); 337 } elseif ( 2 == $step ) {357 elseif ( 2 == $step ) 338 358 $this->step_2(); 339 } elseif ( 3 == $step ) {359 elseif ( 3 == $step ) 340 360 $this->step_3(); 341 }342 343 361 } 344 362 trunk/wp-admin/edit-form-advanced.php
r1218 r1260 55 55 <input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" /> 56 56 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" /> 57 <input type="hidden" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />57 <input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" /> 58 58 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> 59 59 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> … … 61 61 if ( !empty($_REQUEST['popupurl']) ) 62 62 echo clean_url(stripslashes($_REQUEST['popupurl'])); 63 else if ( url_to_postid(wp_get_referer()) == $post_ID && strpos( wp_get_referer(), '/wp-admin/' ) === false)63 else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID ) 64 64 echo 'redo'; 65 65 else … … 223 223 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" /> 224 224 <?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> 225 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category divbutton" value="<?php _e( 'Add' ); ?>" tabindex="3" />225 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" /> 226 226 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?> 227 227 <span id="category-ajax-response"></span> … … 234 234 </ul> 235 235 236 <div id="categories-pop" class="ui-tabs-panel" style="display: none;"> 237 <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" > 238 <?php $popular_ids = wp_popular_terms_checklist('category'); ?> 239 </ul> 240 </div> 241 236 242 <div id="categories-all" class="ui-tabs-panel"> 237 243 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 238 <?php dropdown_categories(); ?> 239 </ul> 240 </div> 241 242 <div id="categories-pop" class="ui-tabs-panel" style="display: none;"> 243 <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" > 244 <?php wp_popular_terms_checklist('category'); ?> 244 <?php wp_category_checklist($post_ID) ?> 245 245 </ul> 246 246 </div> trunk/wp-admin/edit-form-comment.php
r1218 r1260 47 47 <input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> 48 48 <?php 49 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID ", 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";49 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; 50 50 ?> 51 51 </p> … … 96 96 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> 97 97 <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" /> 98 <?php wp_original_referer_field(true, 'previous'); ?> 98 99 <input type="hidden" name="noredir" value="1" /> 99 100 </div> trunk/wp-admin/edit-link-form.php
r1218 r1260 119 119 <div id="categories-all" class="ui-tabs-panel"> 120 120 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 121 <?php dropdown_link_categories(); ?>121 <?php wp_link_category_checklist($link_id); ?> 122 122 </ul> 123 123 </div> trunk/wp-admin/edit-page-form.php
r1225 r1260 49 49 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> 50 50 <input name="referredby" type="hidden" id="referredby" value="<?php 51 if ( url_to_postid(wp_get_referer()) == $post_ID && strpos( wp_get_referer(), '/wp-admin/' ) === false)51 if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID ) 52 52 echo 'redo'; 53 53 else … … 73 73 <p> 74 74 <select name='post_status' tabindex='4'> 75 <?php if ( current_user_can('publish_p osts') ) : ?>75 <?php if ( current_user_can('publish_pages') ) : ?> 76 76 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 77 77 <?php else: ?> trunk/wp-admin/edit-post-rows.php
r1218 r1260 23 23 $bgcolor = ''; 24 24 add_filter('the_title','wp_specialchars'); 25 26 // Create array of post IDs. 27 $post_ids = array(); 28 foreach ( $wp_query->posts as $a_post ) 29 $post_ids[] = $a_post->ID; 30 31 $comment_pending_count = get_pending_comments_num($post_ids); 32 25 33 while (have_posts()) : the_post(); 26 34 $class = 'alternate' == $class ? '' : 'alternate'; … … 68 76 } 69 77 ?> 70 <td><abbr title="<?php echo $t_time ?>"><?php echo $h_time?></abbr></td>78 <td><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name) ?></abbr></td> 71 79 <?php 72 80 break; … … 114 122 <td class="num"><div class="post-com-count-wrapper"> 115 123 <?php 116 $left = get_pending_comments_num( $post->ID );124 $left = isset($comment_pending_count) ? $comment_pending_count[$post->ID] : 0; 117 125 $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); 118 126 if ( $left ) trunk/wp-admin/edit.php
r1218 r1260 168 168 <?php } ?> 169 169 170 <?php wp_dropdown_categories('show_option_all='.__('View all categories').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?> 171 <?php do_action('restrict_manage_posts'); ?> 170 <?php 171 $dropdown_options = array('show_option_all' => __('View all categories'), 'hide_empty' => 0, 'hierarchical' => 1, 172 'show_count' => 0, 'orderby' => 'name', 'selected' => $cat); 173 wp_dropdown_categories($dropdown_options); 174 do_action('restrict_manage_posts'); 175 ?> 172 176 <input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" /> 173 177 trunk/wp-admin/import/blogger.php
r1218 r1260 771 771 772 772 if ( isset( $_REQUEST['blog'] ) ) { 773 $blog = is_array($_REQUEST['blog']) ? array_shift( array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog'];773 $blog = is_array($_REQUEST['blog']) ? array_shift( $keys = array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog']; 774 774 $blog = (int) $blog; 775 775 $result = $this->import_blog( $blog ); trunk/wp-admin/import/mt.php
r1218 r1260 313 313 $ping->title = $title; 314 314 } else if ( 0 === strpos($line, "STATUS:") ) { 315 $status = trim( s ubstr($line, strlen("STATUS:")) );315 $status = trim( strtolower( substr($line, strlen("STATUS:")) ) ); 316 316 if ( empty($status) ) 317 317 $status = 'publish'; trunk/wp-admin/includes/admin.php
r1218 r1260 1 1 <?php 2 3 if ( !defined( 'AUTOSAVE_INTERVAL' ) )4 define( 'AUTOSAVE_INTERVAL', 60 );5 2 6 3 require_once(ABSPATH . 'wp-admin/includes/bookmark.php'); trunk/wp-admin/includes/class-wp-filesystem-direct.php
r1218 r1260 27 27 } 28 28 function put_contents($file,$contents,$mode=false,$type=''){ 29 $fp=@fopen($file,'w'.$type); 30 if (!$fp) 29 if ( ! ($fp = @fopen($file,'w'.$type)) ) 31 30 return false; 32 31 @fwrite($fp,$contents); … … 37 36 function cwd(){ 38 37 return @getcwd(); 38 } 39 function chdir($dir){ 40 return @chdir($dir); 39 41 } 40 42 function chgrp($file,$group,$recursive=false){ … … 46 48 return @chgrp($file,$group); 47 49 //Is a directory, and we want recursive 50 $file = trailingslashit($file); 48 51 $filelist = $this->dirlist($file); 49 foreach($filelist as $filename) {50 $this->chgrp($file .'/'.$filename,$group,$recursive);51 } 52 foreach($filelist as $filename) 53 $this->chgrp($file . $filename, $group, $recursive); 54 52 55 return true; 53 56 } … … 62 65 return @chmod($file,$mode); 63 66 //Is a directory, and we want recursive 67 $file = trailingslashit($file); 64 68 $filelist = $this->dirlist($file); 65 foreach($filelist as $filename) {66 $this->chmod($file .'/'.$filename,$mode,$recursive);67 } 69 foreach($filelist as $filename) 70 $this->chmod($file . $filename, $mode, $recursive); 71 68 72 return true; 69 73 } … … 83 87 } 84 88 function owner($file){ 85 $owneruid =@fileowner($file);89 $owneruid = @fileowner($file); 86 90 if( ! $owneruid ) 87 91 return false; 88 92 if( !function_exists('posix_getpwuid') ) 89 93 return $owneruid; 90 $ownerarray =posix_getpwuid($owneruid);94 $ownerarray = posix_getpwuid($owneruid); 91 95 return $ownerarray['name']; 92 96 } … … 164 168 } 165 169 function group($file){ 166 $gid =@filegroup($file);170 $gid = @filegroup($file); 167 171 if( ! $gid ) 168 172 return false; 169 173 if( !function_exists('posix_getgrgid') ) 170 174 return $gid; 171 $grouparray =posix_getgrgid($gid);175 $grouparray = posix_getgrgid($gid); 172 176 return $grouparray['name']; 173 177 } 174 178 175 179 function copy($source,$destination,$overwrite=false){ 176 if( $overwrite && $this->exists($destination) )180 if( ! $overwrite && $this->exists($destination) ) 177 181 return false; 178 182 return copy($source,$destination); … … 180 184 181 185 function move($source,$destination,$overwrite=false){ 182 //Possible to use rename() 186 //Possible to use rename()? 183 187 if( $this->copy($source,$destination,$overwrite) && $this->exists($destination) ){ 184 188 $this->delete($source);
