Changeset 11971
- Timestamp:
- 09/24/2009 05:19:13 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/import.php
r11963 r11971 61 61 function wp_import_handle_upload() { 62 62 if ( !isset($_FILES['import']) ) { 63 $file['error'] = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 63 $file['error'] = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 64 64 return $file; 65 65 } 66 66 67 67 $overrides = array( 'test_form' => false, 'test_type' => false ); 68 68 $_FILES['import']['name'] .= '.txt'; -
trunk/wp-admin/includes/plugin.php
r11966 r11971 348 348 if ( ! $silent ) 349 349 do_action( 'deactivate_plugin', trim( $plugin ) ); 350 350 351 351 $key = array_search( $plugin, (array) $current ); 352 352 353 353 if ( false !== $key ) 354 354 array_splice( $current, $key, 1 ); 355 355 356 356 //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output. 357 357 if ( ! $silent ) { … … 490 490 491 491 function validate_active_plugins() { 492 $check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') ); 492 $check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') ); 493 493 494 494 // Sanity check. If the active plugin list is not an array, make it an -
trunk/wp-admin/includes/post.php
r11968 r11971 590 590 $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->postmeta (post_id,meta_key,meta_value ) VALUES (%s, %s, %s)", $post_ID, $metakey, $metavalue) ); 591 591 do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, $metakey, $metavalue ); 592 592 593 593 return $wpdb->insert_id; 594 594 } -
trunk/wp-admin/press-this.php
r11944 r11971 63 63 if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=\\\?(\"|\')'.preg_quote(htmlspecialchars($image), '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content); 64 64 } 65 65 66 66 // set the post_content and status 67 67 $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft'; -
trunk/wp-admin/upload.php
r11952 r11971 178 178 </h2> 179 179 180 <?php 180 <?php 181 181 $message = ''; 182 182 if ( isset($_GET['posted']) && (int) $_GET['posted'] ) { -
trunk/wp-includes/comment.php
r11968 r11971 864 864 865 865 add_comment_meta($comment_id,'_wp_trash_meta_status', $comment->comment_approved); 866 add_comment_meta($comment_id,'_wp_trash_meta_time', time() ); 867 866 add_comment_meta($comment_id,'_wp_trash_meta_time', time() ); 867 868 868 wp_set_comment_status($comment_id, 'trash'); 869 869 … … 887 887 888 888 $comment = array('comment_ID'=>$comment_id, 'comment_approved'=>'0'); 889 889 890 890 //Either set comment_approved to the value in comment_meta or worse case to false which will mean moderation 891 891 $comment['comment_approved'] = get_comment_meta($comment_id, '_wp_trash_meta_status', true); -
trunk/wp-includes/functions.php
r11968 r11971 3386 3386 3387 3387 $comments_to_delete = $wpdb->get_results($wpdb->prepare("SELECT comment_id FROM $wpdb->commentmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A); 3388 3388 3389 3389 foreach ( (array) $comments_to_delete as $comment ) { 3390 3390 wp_delete_comment($comment['comment_id']); -
trunk/wp-includes/meta.php
r11968 r11971 25 25 26 26 if ( $unique && $wpdb->get_var( $wpdb->prepare( 27 "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d", 27 "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d", 28 28 $meta_key, $object_id ) ) ) 29 29 return false; … … 32 32 33 33 $wpdb->insert( $table, array( 34 $column => $object_id, 35 'meta_key' => $meta_key, 34 $column => $object_id, 35 'meta_key' => $meta_key, 36 36 'meta_value' => $meta_value 37 37 ) ); … … 97 97 98 98 $query = $wpdb->prepare( "SELECT meta_id FROM $table WHERE meta_key = %s", $meta_key ); 99 99 100 100 if ( $meta_value ) 101 101 $query .= $wpdb->prepare("AND meta_value = %s", $meta_value ); … … 106 106 107 107 $query = "DELETE FROM $table WHERE meta_id IN( " . implode( ',', $meta_ids ) . " )"; 108 108 109 109 $count = $wpdb->query($query); 110 110 111 111 if ( !$count ) 112 112 return false; … … 178 178 $id_list = join(',', $ids); 179 179 $cache = array(); 180 $meta_list = $wpdb->get_results( $wpdb->prepare("SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)", 180 $meta_list = $wpdb->get_results( $wpdb->prepare("SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)", 181 181 $meta_type), ARRAY_A ); 182 182 -
trunk/wp-includes/taxonomy.php
r11941 r11971 1690 1690 $wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) ); 1691 1691 do_action( 'edited_term_taxonomy', $tt_id ); 1692 1692 1693 1693 do_action("edit_term", $term_id, $tt_id); 1694 1694 do_action("edit_$taxonomy", $term_id, $tt_id); -
trunk/wp-includes/theme.php
r11959 r11971 908 908 * @since 2.9.0 909 909 * @access private 910 * 910 * 911 911 * @return string 912 912 */ … … 917 917 /** 918 918 * Private function to modify the current stylesheet when previewing a theme 919 * 919 * 920 920 * @since 2.9.0 921 921 * @access private 922 * 922 * 923 923 * @return string 924 924 */
Note: See TracChangeset
for help on using the changeset viewer.