com web/master: Implemented the IS_DEV hint.: include /login.inc
| From: | Philip Olson | Date: | Thu, 05 Apr 2012 18:17:56 +0000 |
| Subject: | com web/master: Implemented the IS_DEV hint.: include /login.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-13332@lists.php.net to get a copy of this message | ||
Commit: 3fbc7ef3d6a51d36b653582ead5d90caef57e9d7
Author: Philip Olson <philip@php.net> Thu, 5 Apr 2012 11:17:56 -0700
Parents: 0667e59318943ab79b6868db26f5bbb10e96764f
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=3fbc7ef3d6a51d36b653582ead5d90caef57e9d7
Log:
Implemented the IS_DEV hint.
Changed paths:
M include/login.inc
Diff:
diff --git a/include/login.inc b/include/login.inc
index 1673269..06fa512 100644
--- a/include/login.inc
+++ b/include/login.inc
@@ -28,6 +28,16 @@ if (!$user || !$pw || !verify_password($user,$pw)) {
}
exit;
}
+
+ // IS_DEV was 1 or 0 until 22 Feb 2012. It's now a @php.net username hint.
+ $username = '';
+ if (isset($_COOKIE['IS_DEV']) && !is_numeric($_COOKIE['IS_DEV'])) {
+ $username = clean($_COOKIE['IS_DEV']);
+ } else {
+ if (!empty($_POST['user'])) {
+ $username = clean($_POST['user']);
+ }
+ }
?>
<html>
@@ -41,7 +51,7 @@ if (!$user || !$pw || !verify_password($user,$pw)) {
<table>
<tr>
<th align="right">Username:</th>
- <td><input type="text" name="user" value="<?php echo
clean($user);?>" />@php.net
+ <td><input type="text" name="user" value="<?php echo
$username;?>" />@php.net
</tr>
<tr>
<th align="right">Password:</th>