diff options
author | Marvin Thomas Rabe <m.rabe@echtzeitraum.de> | 2011-09-30 20:22:12 +0400 |
---|---|---|
committer | Marvin Thomas Rabe <m.rabe@echtzeitraum.de> | 2011-09-30 20:25:34 +0400 |
commit | ccfa2dd24ce8313b9dede2d1c18761aa9e294e5c (patch) | |
tree | 913814d42b4b2bf284662af956b56dc282ad1c0a /index.php | |
parent | c3b57944ac31f63cbbd575dfd7200fa3b050f4ef (diff) |
Error when only oc_remember_login cookie set fixed.
Filled username field when oc_username is set repaired.
Problems with "advanced settings" button in installation wizard fixed.
CSS improved - login and installation now looks more clean.
Request password link removed (email feature not implemented yet).
Database radio button bugs removed.
It is possible to have an empty database password, now ownCloud will support this "security issue".
Ignore Mac OS X ".DSstore" files.
Fade in/out of login button and remember checkbox removed due to some display errors.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/index.php b/index.php index 2ac3f6df7bb..68754fcc567 100644 --- a/index.php +++ b/index.php @@ -53,7 +53,7 @@ elseif(OC_User::isLoggedIn()) { } // remember was checked after last login -elseif(isset($_COOKIE["oc_remember_login"]) && $_COOKIE["oc_remember_login"]) { +elseif(isset($_COOKIE["oc_remember_login"]) && isset($_COOKIE["oc_token"]) && isset($_COOKIE["oc_username"]) && $_COOKIE["oc_remember_login"]) { OC_App::loadApps(); if(defined("DEBUG") && DEBUG) {error_log("Trying to login from cookie");} // confirm credentials in cookie @@ -63,7 +63,7 @@ elseif(isset($_COOKIE["oc_remember_login"]) && $_COOKIE["oc_remember_login"]) { OC_Util::redirectToDefaultPage(); } else { - OC_Template::printGuestPage("", "login", array("error" => true)); + OC_Template::printGuestPage("", "login", array("error" => true, 'username' => isset($_COOKIE['oc_username'])?$_COOKIE['oc_username']:'' )); } } @@ -81,13 +81,8 @@ elseif(isset($_POST["user"]) && isset($_POST['password'])) { OC_User::unsetMagicInCookie(); } OC_Util::redirectToDefaultPage(); - } - else { - if(isset($_COOKIE["oc_username"])){ - OC_Template::printGuestPage("", "login", array("error" => true, "username" => $_COOKIE["oc_username"])); - }else{ - OC_Template::printGuestPage("", "login", array("error" => true)); - } + } else { + OC_Template::printGuestPage('', 'login', array('error' => true, 'username' => isset($_COOKIE['oc_username'])?$_COOKIE['oc_username']:'' )); } } @@ -126,11 +121,7 @@ elseif(isset($_GET['resetpassword']) && isset($_GET['token']) && isset($_GET['us // For all others cases, we display the guest page : else { OC_App::loadApps(); - if(isset($_COOKIE["username"])){ - OC_Template::printGuestPage("", "login", array("error" => false, "username" => $_COOKIE["username"])); - }else{ - OC_Template::printGuestPage("", "login", array("error" => false)); - } + OC_Template::printGuestPage('', 'login', array('error' => false, 'username' => isset($_COOKIE['oc_username'])?$_COOKIE['oc_username']:'' )); } -?> +?>
\ No newline at end of file |