Merge branch 'master' of gitorious.org:owncloud/owncloud
Conflicts: inc/lib_log.php
This commit is contained in:
commit
1bdfe395cd
|
@ -50,7 +50,6 @@ class OC_LOG {
|
||||||
public static function event($user,$type,$message){
|
public static function event($user,$type,$message){
|
||||||
global $CONFIG_DBTABLEPREFIX;
|
global $CONFIG_DBTABLEPREFIX;
|
||||||
$result = OC_DB::query('INSERT INTO `' . $CONFIG_DBTABLEPREFIX . 'log` (`timestamp`,`user`,`type`,`message`) VALUES ('.time().',\''.addslashes($user).'\','.addslashes($type).',\''.addslashes($message).'\');');
|
$result = OC_DB::query('INSERT INTO `' . $CONFIG_DBTABLEPREFIX . 'log` (`timestamp`,`user`,`type`,`message`) VALUES ('.time().',\''.addslashes($user).'\','.addslashes($type).',\''.addslashes($message).'\');');
|
||||||
OC_DB::free_result($result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,16 @@ class OC_USER {
|
||||||
public static function loginlisener(){
|
public static function loginlisener(){
|
||||||
if(isset($_POST['loginbutton']) and isset($_POST['password']) and isset($_POST['login'])){
|
if(isset($_POST['loginbutton']) and isset($_POST['password']) and isset($_POST['login'])){
|
||||||
if(OC_USER::login($_POST['login'],$_POST['password'])){
|
if(OC_USER::login($_POST['login'],$_POST['password'])){
|
||||||
|
echo 1;
|
||||||
OC_LOG::event($_SESSION['username'],1,'');
|
OC_LOG::event($_SESSION['username'],1,'');
|
||||||
return('');
|
echo 2;
|
||||||
|
if((isset($CONFIG_HTTPFORCESSL) and $CONFIG_HTTPFORCESSL) or isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on') {
|
||||||
|
$url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
||||||
|
}else{
|
||||||
|
$url = "http://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
||||||
|
}
|
||||||
|
header("Location: $url");
|
||||||
|
die();
|
||||||
}else{
|
}else{
|
||||||
return('error');
|
return('error');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue