diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-26 00:47:29 +0400 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-26 23:17:17 +0400 |
commit | aae6881494af7ada98301667c133272a345ef8f0 (patch) | |
tree | 29edb813927dbf06c390ab56ee6268221a54e6a9 /index.php | |
parent | e4dc33b368ffcfb7b0223dfaf57cfec1b93a5a73 (diff) |
Move display of login page to function in OC_Util
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/index.php b/index.php index 63ffba135ae..bb1e370d241 100644 --- a/index.php +++ b/index.php @@ -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_Util::displayLoginPage(array('error' => true)); } } @@ -83,11 +83,7 @@ elseif(isset($_POST["user"]) && isset($_POST['password'])) { 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)); - } + OC_Util::displayLoginPage(array('error' => true)); } } @@ -126,11 +122,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_Util::displayLoginPage(array('error' => false)); } ?> |