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. Built from https://develop.svn.wordpress.org/trunk@41554 git-svn-id: http://core.svn.wordpress.org/trunk@41387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Server-side file upload handler from wp-plupload, swfupload or other asynchronous upload methods.
|
||||
* Server-side file upload handler from wp-plupload or other asynchronous upload methods.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
@@ -14,20 +14,10 @@ if ( ! defined( 'WP_ADMIN' ) ) {
|
||||
define( 'WP_ADMIN', true );
|
||||
}
|
||||
|
||||
if ( defined('ABSPATH') )
|
||||
require_once(ABSPATH . 'wp-load.php');
|
||||
else
|
||||
if ( defined( 'ABSPATH' ) ) {
|
||||
require_once( ABSPATH . 'wp-load.php' );
|
||||
} else {
|
||||
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
|
||||
|
||||
if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) {
|
||||
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
|
||||
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
|
||||
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
|
||||
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
|
||||
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
|
||||
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
|
||||
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
|
||||
unset($current_user);
|
||||
}
|
||||
|
||||
require_once( ABSPATH . 'wp-admin/admin.php' );
|
||||
|
||||
Reference in New Issue
Block a user