From fef86c9964610101b207e326fb11ec93da19e96e Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sat, 18 Dec 2004 20:56:26 +0000 Subject: [PATCH] Some code cleanups. git-svn-id: http://svn.automattic.com/wordpress/trunk@1974 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/templates.php | 2 +- wp-comments-post.php | 6 +---- wp-includes/vars.php | 1 - wp-login.php | 54 +++++++++++------------------------------- 4 files changed, 16 insertions(+), 47 deletions(-) diff --git a/wp-admin/templates.php b/wp-admin/templates.php index fa87d045e9..9a7067a034 100644 --- a/wp-admin/templates.php +++ b/wp-admin/templates.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 5cb0700ff4..e298c12d05 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -107,7 +107,6 @@ $wp_gecko_correction['out'] = array( // Server detection $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0; -$is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0; // if the config file does not provide the smilies array, let's define it here if (!isset($wpsmiliestrans)) { diff --git a/wp-login.php b/wp-login.php index 7083747da5..8859e865cb 100644 --- a/wp-login.php +++ b/wp-login.php @@ -1,23 +1,7 @@ user_level) { + if ( 0 == $user->user_level ) $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; - } if ($user_login && $user_pass) { if ( wp_login($user_login, $user_pass, $using_cookie) ) { @@ -153,18 +133,16 @@ default: setcookie('wordpresspass_'. COOKIEHASH, $user_pass, time() + 31536000, COOKIEPATH); } - if ($is_IIS) - header("Refresh: 0;url=$redirect_to"); - else - header("Location: $redirect_to"); + header("Location: $redirect_to"); exit(); } else { if ($using_cookie) $error = __('Your session has expired.'); } } - - ?> + if ( isset($_REQUEST['redirect_to']) ) + $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']); +?> @@ -173,7 +151,6 @@ default: