Pass logged_in cookie to async-upload. Props nbachiyski. fixes #10739

git-svn-id: http://svn.automattic.com/wordpress/trunk@11904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-09-08 15:22:42 +00:00
parent 9d1f82b406
commit e8c32c03b0
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,8 @@ if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_c
$_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('admin.php');

View File

@ -1331,6 +1331,7 @@ SWFUpload.onload = function() {
post_params : {
"post_id" : "<?php echo $post_id; ?>",
"auth_cookie" : "<?php if ( is_ssl() ) echo $_COOKIE[SECURE_AUTH_COOKIE]; else echo $_COOKIE[AUTH_COOKIE]; ?>",
"logged_in_cookie": "<?php echo $_COOKIE[LOGGED_IN_COOKIE]; ?>",
"_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>",
"type" : "<?php echo $type; ?>",
"tab" : "<?php echo $tab; ?>",