Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-09-22 21:24:32 +0400
committerFlorian Pritz <bluewind@xinu.at>2011-09-24 20:41:47 +0400
commit8648e3c43c26da898c17798f89d60c9505d149b3 (patch)
tree34e10780eca9ec004900163f958f79192a0f226c /index.php
parent9c550e8e9f52efa9c117ef1b577386e555010547 (diff)
only call error_log() if DEBUG is true
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 23bc4fb7764..26e90ddfa5c 100644
--- a/index.php
+++ b/index.php
@@ -55,7 +55,7 @@ elseif(OC_User::isLoggedIn()) {
// remember was checked after last login
elseif(isset($_COOKIE["oc_remember_login"]) && $_COOKIE["oc_remember_login"]) {
OC_App::loadApps();
- error_log("Trying to login from cookie");
+ if(defined("DEBUG") && DEBUG) {error_log("Trying to login from cookie");}
// confirm credentials in cookie
if(OC_User::userExists($_COOKIE['oc_username']) &&
OC_Preferences::getValue($_COOKIE['oc_username'], "login", "token") == $_COOKIE['oc_token']) {
@@ -72,7 +72,7 @@ elseif(isset($_POST["user"]) && isset($_POST['password'])) {
OC_App::loadApps();
if(OC_User::login($_POST["user"], $_POST["password"])) {
if(!empty($_POST["remember_login"])){
- error_log("Setting remember login to cookie");
+ if(defined("DEBUG") && DEBUG) {error_log("Setting remember login to cookie");}
$token = md5($_POST["user"].time());
OC_Preferences::setValue($_POST['user'], 'login', 'token', $token);
OC_User::setMagicInCookie($_POST["user"], $token);