Changeset 1974
- Timestamp:
- 12/18/2004 08:56:26 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/templates.php
r1956 r1974 1 1 <?php 2 2 require_once('admin.php'); 3 $title = __('Template & file editing');3 $title = __('Template & File Editing'); 4 4 $parent_file = 'edit.php'; 5 5 -
trunk/wp-comments-post.php
r1968 r1974 44 44 $location = get_permalink($comment_post_ID); 45 45 46 if ($is_IIS) { 47 header("Refresh: 0;url=$location"); 48 } else { 49 header("Location: $location"); 50 } 46 header("Location: $location"); 51 47 52 48 ?> -
trunk/wp-includes/vars.php
r1965 r1974 108 108 // Server detection 109 109 $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0; 110 $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;111 110 112 111 // if the config file does not provide the smilies array, let's define it here -
trunk/wp-login.php
r1964 r1974 2 2 require( dirname(__FILE__) . '/wp-config.php' ); 3 3 4 $wpvarstoreset = array('action'); 5 6 for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) { 7 $wpvar = $wpvarstoreset[$i]; 8 if (!isset($$wpvar)) { 9 if (empty($_POST["$wpvar"])) { 10 if (empty($_GET["$wpvar"])) { 11 $$wpvar = ''; 12 } else { 13 $$wpvar = $_GET["$wpvar"]; 14 } 15 } else { 16 $$wpvar = $_POST["$wpvar"]; 17 } 18 } 19 } 20 4 $action = $_REQUEST['action']; 21 5 $error = ''; 22 6 … … 37 21 setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); 38 22 39 if ($is_IIS) 40 header('Refresh: 0;url=wp-login.php'); 41 else 42 header('Location: wp-login.php'); 23 header('Location: wp-login.php'); 43 24 exit(); 44 25 … … 129 110 if( !empty($_POST) ) { 130 111 $user_login = $_POST['log']; 131 $user_pass = $_POST['pwd'];112 $user_pass = $_POST['pwd']; 132 113 $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_POST['redirect_to']); 133 114 } elseif ( !empty($_COOKIE) ) { 134 if (! empty($_COOKIE['wordpressuser_' . COOKIEHASH]) )115 if (! empty($_COOKIE['wordpressuser_' . COOKIEHASH]) ) 135 116 $user_login = $_COOKIE['wordpressuser_' . COOKIEHASH]; 136 if (! empty($_COOKIE['wordpresspass_' . COOKIEHASH]) ) {117 if (! empty($_COOKIE['wordpresspass_' . COOKIEHASH]) ) { 137 118 $user_pass = $_COOKIE['wordpresspass_' . COOKIEHASH]; 138 119 $using_cookie = true; … … 142 123 143 124 $user = get_userdatabylogin($user_login); 144 if ( 0 == $user->user_level) {125 if ( 0 == $user->user_level ) 145 126 $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; 146 }147 127 148 128 if ($user_login && $user_pass) { … … 154 134 } 155 135 156 if ($is_IIS) 157 header("Refresh: 0;url=$redirect_to"); 158 else 159 header("Location: $redirect_to"); 136 header("Location: $redirect_to"); 160 137 exit(); 161 138 } else { … … 164 141 } 165 142 } 166 167 ?> 143 if ( isset($_REQUEST['redirect_to']) ) 144 $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']); 145 ?> 168 146 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 169 147 <html xmlns="http://www.w3.org/1999/xhtml"> … … 174 152 <script type="text/javascript"> 175 153 function focusit() { 176 // focus on first input field177 154 document.getElementById('log').focus(); 178 155 } … … 185 162 <h1><a href="http://wordpress.org/">WordPress</a></h1> 186 163 <?php 187 if ( $error)164 if ( $error ) 188 165 echo "<div id='login_error'>$error</div>"; 189 166 ?> … … 192 169 <p><label><?php _e('Login') ?>: <input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label></p> 193 170 <p><label><?php _e('Password') ?>: <input type="password" name="pwd" value="" size="20" tabindex="2" /></label></p> 194 <p class="submit"><input type="submit" name="submit" value="<?php _e('Login'); ?> »" tabindex="3" /> 195 <?php if (isset($_GET["redirect_to"])) { ?> 196 <input type="hidden" name="redirect_to" value="<?php echo $_GET["redirect_to"] ?>" /> 197 <?php } else { ?> 198 <input type="hidden" name="redirect_to" value="wp-admin/" /> 199 <?php } ?> 171 <p class="submit"> 172 <input type="submit" name="submit" value="<?php _e('Login'); ?> »" tabindex="3" /> 173 <input type="hidden" name="redirect_to" value="<?php echo $redirect_to; ?>" /> 200 174 </p> 201 175 </form>
Note: See TracChangeset
for help on using the changeset viewer.