Changeset 788
- Timestamp:
- 10/03/06 10:52:54 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-functions.php (modified) (1 diff)
- trunk/wp-admin/edit-comments.php (modified) (1 diff)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-form-comment.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-admin/import/dotclear.php (modified) (1 diff)
- trunk/wp-admin/import/textpattern.php (modified) (1 diff)
- trunk/wp-admin/theme-editor.php (modified) (1 diff)
- trunk/wp-admin/wp-admin.css (modified) (1 diff)
- trunk/wp-content/themes/default/attachment.php (modified) (1 diff)
- trunk/wp-content/themes/default/page.php (modified) (1 diff)
- trunk/wp-content/themes/default/single.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (3 diffs)
- trunk/wp-includes/comment.php (modified) (2 diffs)
- trunk/wp-includes/default-filters.php (modified) (1 diff)
- trunk/wp-includes/feed.php (modified) (1 diff)
- trunk/wp-includes/pluggable.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-functions.php
r774 r788 1912 1912 $new_file = $uploads['path'] . "/$filename"; 1913 1913 if ( false === @ move_uploaded_file($file['tmp_name'], $new_file) ) 1914 wp_die(printf(__('The uploaded file could not be moved to %s.'), $ file['path']));1914 wp_die(printf(__('The uploaded file could not be moved to %s.'), $uploads['path'])); 1915 1915 1916 1916 // Set correct file permissions trunk/wp-admin/edit-comments.php
r774 r788 192 192 } // end foreach 193 193 ?></table> 194 <p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" />194 <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" /> 195 195 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p> 196 196 </form> trunk/wp-admin/edit-form-advanced.php
r770 r788 253 253 254 254 <?php if ('edit' == $action) : $delete_nonce = wp_create_nonce( 'delete-post_' . $post_ID ); ?> 255 <input name="deletepost" class="button " type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />255 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 256 256 <?php endif; ?> 257 257 trunk/wp-admin/edit-form-comment.php
r729 r788 67 67 68 68 <tr> 69 <th scope="row" valign="top"><?php _e('Delete'); ?>:</th>70 <td><input name="deletecomment" class="button " type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"return confirm('" . __("You are about to delete this comment \\n \'Cancel\' to stop, \'OK\' to delete.") . "')\""; ?> />69 <th scope="row" valign="top"><?php _e('Delete'); $delete_nonce = wp_create_nonce( 'delete-comment_' . $comment->comment_ID ); ?>:</th> 70 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . __("You are about to delete this comment \\n \'Cancel\' to stop, \'OK\' to delete.") . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> /> 71 71 <input type="hidden" name="comment" value="<?php echo $comment->comment_ID ?>" /> 72 72 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> trunk/wp-admin/edit-page-form.php
r734 r788 190 190 $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID ); 191 191 if ( current_user_can('delete_page', $post->ID) ) ?> 192 <input name="deletepost" class="button " type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />192 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 193 193 <?php endif; ?> 194 194 </div> trunk/wp-admin/import/dotclear.php
r734 r788 409 409 if($cat1 = get_catbynicename($post_cat_name)) { $cats[1] = $cat1; } 410 410 411 if(!empty($cats)) { wp_set_post_cat s('',$ret_id, $cats); }411 if(!empty($cats)) { wp_set_post_categories($ret_id, $cats); } 412 412 } 413 413 } trunk/wp-admin/import/textpattern.php
r734 r788 339 339 if($cat2 = get_catbynicename($Category2)) { $cats[2] = $cat2; } 340 340 341 if(!empty($cats)) { wp_set_post_cat s('',$ret_id, $cats); }341 if(!empty($cats)) { wp_set_post_categories($ret_id, $cats); } 342 342 } 343 343 } trunk/wp-admin/theme-editor.php
r729 r788 46 46 fwrite($f, $newcontent); 47 47 fclose($f); 48 wp_redirect("theme-editor.php?file=$file&theme=$theme&a=te");48 $location = "theme-editor.php?file=$file&theme=$theme&a=te"; 49 49 } else { 50 wp_redirect("theme-editor.php?file=$file&theme=$theme");50 $location = "theme-editor.php?file=$file&theme=$theme"; 51 51 } 52 52 53 $location = wp_kses_no_null($location); 54 $strip = array('%0d', '%0a'); 55 $location = str_replace($strip, '', $location); 56 header("Location: $location"); 53 57 exit(); 54 58 trunk/wp-admin/wp-admin.css
r774 r788 503 503 } 504 504 505 #deletepost:hover, #deletecomment:hover {505 input.delete:hover { 506 506 background: #ce0000; 507 507 color: #fff; trunk/wp-content/themes/default/attachment.php
r712 r788 18 18 <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> 19 19 20 <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>20 <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> 21 21 22 22 <p class="postmetadata alt"> trunk/wp-content/themes/default/page.php
r712 r788 9 9 <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> 10 10 11 <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>11 <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> 12 12 13 13 </div> trunk/wp-content/themes/default/single.php
r712 r788 16 16 <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> 17 17 18 <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>18 <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> 19 19 20 20 <p class="postmetadata alt"> trunk/wp-includes/bookmark-template.php
r771 r788 317 317 parse_str($args, $r); 318 318 319 $defaults = array('orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => 0,319 $defaults = array('orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => '', 320 320 'category_name' => '', 'hide_invisible' => 1, 'show_updated' => 0, 'echo' => 1, 321 321 'categorize' => 1, 'title_li' => __('Bookmarks'), 'title_before' => '<h2>', 'title_after' => '</h2>', … … 324 324 extract($r); 325 325 326 // TODO: The rest of it.327 // If $categorize, group links by category with the category name being the328 // title of each li, otherwise just list them with title_li as the li title.329 // If $categorize and $category or $category_name, list links for the given category330 // with the category name as the title li. If not $categorize, use title_li.331 // When using each category's name as a title li, use before and after args for specifying332 // any markup. We don't want to hardcode h2.333 334 326 $output = ''; 335 327 336 328 if ( $categorize ) { 337 $cats = get_categories("type=link&orderby=$category_orderby&order=$category_order&hierarchical=0"); 329 //Split the bookmarks into ul's for each category 330 $cats = get_categories("type=link&category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0"); 331 338 332 foreach ( (array) $cats as $cat ) { 339 $r['category'] = $cat->cat_ID; 340 $bookmarks = get_bookmarks($r); 333 $bookmarks = get_bookmarks("limit=$limit&category={$cat->cat_ID}&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_inivisible&show_updated=$show_updated"); 341 334 if ( empty($bookmarks) ) 342 335 continue; … … 345 338 $output .= "\n\t</ul>\n</li>\n"; 346 339 } 340 } else { 341 //output one single list using title_li for the title 342 $bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_inivisible&show_updated=$show_updated"); 343 344 if ( !empty($bookmarks) ) { 345 $output .= "<li id='linkuncat' class='linkcat'>$title_before$title_li$title_after\n\t<ul>\n"; 346 $output .= _walk_bookmarks($bookmarks, $r); 347 $output .= "\n\t</ul>\n</li>\n"; 348 } 347 349 } 348 350 trunk/wp-includes/comment.php
r761 r788 188 188 $time_lastcomment = mysql2date('U', $lasttime); 189 189 $time_newcomment = mysql2date('U', $comment_date_gmt); 190 if ( ($time_newcomment - $time_lastcomment) < 15 ) { 190 $flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment); 191 if ( $flood_die ) { 191 192 do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment); 192 wp_die( __(' Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') );193 wp_die( __('You are posting comments too quickly. Slow down.') ); 193 194 } 194 195 } … … 354 355 $commentdata['filtered'] = true; 355 356 return $commentdata; 357 } 358 359 function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) { 360 if ( $block ) // a plugin has already blocked... we'll let that decision stand 361 return $block; 362 if ( ($time_newcomment - $time_lastcomment) < 15 ) 363 return true; 364 return false; 356 365 } 357 366 trunk/wp-includes/default-filters.php
r763 r788 38 38 39 39 add_filter('comment_email', 'antispambot'); 40 41 add_filter('comment_flood_filter', 'wp_throttle_comment_flood', 10, 3); 40 42 41 43 add_filter('comment_url', 'clean_url'); trunk/wp-includes/feed.php
r774 r788 103 103 $link = get_option('home') . '?feed=rss2&author=' . $author_id; 104 104 } else { 105 $link = get_author_ link(0,$author_id, $author_nicename);105 $link = get_author_posts_url($author_id, $author_nicename); 106 106 $link = $link . "feed/"; 107 107 } trunk/wp-includes/pluggable.php
r770 r788 273 273 $location = str_replace($strip, '', $location); 274 274 275 status_header($status); 276 277 if ($is_IIS) 275 if ( $is_IIS ) { 278 276 header("Refresh: 0;url=$location"); 279 else 277 } else { 278 status_header($status); // This causes problems on IIS 280 279 header("Location: $location"); 280 } 281 281 } 282 282 endif;
