WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/21/17 16:34:31 (4 months ago)
Author:
azaozz
Message:

Remove SWFUpload,

  • Refactor swfupload.js to output a simple upload form, and handlers.js.
  • Delete the SWFUpload plugins directory and swfupload.swf.
  • Remove flash cookies "hack" from async-upload.php.

See #41752.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/async-upload.php

    r39756 r41554  
    11<?php 
    22/** 
    3  * Server-side file upload handler from wp-plupload, swfupload or other asynchronous upload methods. 
     3 * Server-side file upload handler from wp-plupload or other asynchronous upload methods. 
    44 * 
    55 * @package WordPress 
     
    1515} 
    1616 
    17 if ( defined('ABSPATH') ) 
    18     require_once(ABSPATH . 'wp-load.php'); 
    19 else 
     17if ( defined( 'ABSPATH' ) ) { 
     18    require_once( ABSPATH . 'wp-load.php' ); 
     19} else { 
    2020    require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); 
    21  
    22 if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) { 
    23     // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 
    24     if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 
    25         $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie']; 
    26     elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 
    27         $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie']; 
    28     if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) ) 
    29         $_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie']; 
    30     unset($current_user); 
    3121} 
    3222 
Note: See TracChangeset for help on using the changeset viewer.