Make WordPress Core


Ignore:
Timestamp:
03/01/2013 04:28:40 PM (12 years ago)
Author:
ryan
Message:

Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image-edit.php

    r23416 r23554  
    455455        return false;
    456456
    457     $changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash( $_REQUEST['history'] ) ) : null;
     457    $changes = !empty($_REQUEST['history']) ? json_decode( stripslashes($_REQUEST['history']) ) : null;
    458458    if ( $changes )
    459459        $img = image_edit_apply_changes( $img, $changes );
     
    534534    }
    535535
    536     if ( !wp_update_attachment_metadata($post_id, $meta) || !wp_update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) {
     536    if ( !wp_update_attachment_metadata($post_id, $meta) || !update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) {
    537537        $msg->error = __('Cannot save image metadata.');
    538538        return $msg;
     
    588588        }
    589589    } elseif ( !empty($_REQUEST['history']) ) {
    590         $changes = json_decode( wp_unslash( $_REQUEST['history'] ) );
     590        $changes = json_decode( stripslashes($_REQUEST['history']) );
    591591        if ( $changes )
    592592            $img = image_edit_apply_changes($img, $changes);
     
    700700    if ( $success ) {
    701701        wp_update_attachment_metadata( $post_id, $meta );
    702         wp_update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes);
     702        update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes);
    703703
    704704        if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
Note: See TracChangeset for help on using the changeset viewer.