mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Minor header cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@1769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
587429f358
commit
d8722745ad
@ -2,7 +2,7 @@
|
|||||||
require_once('../wp-config.php');
|
require_once('../wp-config.php');
|
||||||
|
|
||||||
if ( !empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH) ) {
|
if ( !empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH) ) {
|
||||||
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
header('Cache-Control: no-cache, must-revalidate');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
21
wp-login.php
21
wp-login.php
@ -36,7 +36,14 @@ for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = '';
|
$error = '';
|
||||||
|
|
||||||
|
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
||||||
|
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||||
|
header('Cache-Control: no-cache, must-revalidate');
|
||||||
|
header('Pragma: no-cache');
|
||||||
|
|
||||||
// If someone has moved WordPress let's try to detect it
|
// If someone has moved WordPress let's try to detect it
|
||||||
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) != get_settings('siteurl') )
|
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) != get_settings('siteurl') )
|
||||||
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) );
|
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) );
|
||||||
@ -47,10 +54,7 @@ case 'logout':
|
|||||||
|
|
||||||
setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
|
setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
|
||||||
setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
|
setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
|
||||||
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
|
||||||
header('Pragma: no-cache');
|
|
||||||
if ($is_IIS)
|
if ($is_IIS)
|
||||||
header('Refresh: 0;url=wp-login.php');
|
header('Refresh: 0;url=wp-login.php');
|
||||||
else
|
else
|
||||||
@ -148,11 +152,6 @@ default:
|
|||||||
$redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
|
$redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
|
||||||
header('Pragma: no-cache');
|
|
||||||
|
|
||||||
if ( wp_login($log, $pwd) ) {
|
if ( wp_login($log, $pwd) ) {
|
||||||
$user_login = $log;
|
$user_login = $log;
|
||||||
$user_pass = $pwd;
|
$user_pass = $pwd;
|
||||||
@ -171,10 +170,6 @@ default:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( wp_login($user_login, $user_pass_md5, true) ) {
|
if ( wp_login($user_login, $user_pass_md5, true) ) {
|
||||||
header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday
|
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
|
||||||
header('Pragma: no-cache');
|
|
||||||
header('Location: wp-admin/');
|
header('Location: wp-admin/');
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user