Skip to content
Snippets Groups Projects
Commit acf7916e authored by Serge Martin's avatar Serge Martin
Browse files

user is a reserved word in postgresql

parent a0b7b85c
Branches
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ class OC_Log { ...@@ -51,7 +51,7 @@ class OC_Log {
* This function adds another entry to the log database * This function adds another entry to the log database
*/ */
public static function add( $appid, $subject, $predicate, $object = ' ' ){ public static function add( $appid, $subject, $predicate, $object = ' ' ){
$query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,user,action,info) VALUES(NOW(),?,?,?,?)"); $query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,`user`,action,info) VALUES(NOW(),?,?,?,?)");
$result=$query->execute(array($appid,$subject,$predicate,$object)); $result=$query->execute(array($appid,$subject,$predicate,$object));
// Die if we have an error // Die if we have an error
if( PEAR::isError($result)) { if( PEAR::isError($result)) {
...@@ -90,7 +90,7 @@ class OC_Log { ...@@ -90,7 +90,7 @@ class OC_Log {
array_push($params,$filter('until')); array_push($params,$filter('until'));
} }
if(isset($filter['user'])){ if(isset($filter['user'])){
$queryString.='AND user=? '; $queryString.='AND `user`=? ';
array_push($params,$filter('user')); array_push($params,$filter('user'));
} }
if(isset($filter['app'])){ if(isset($filter['app'])){
......
...@@ -407,7 +407,7 @@ class OC_OCS { ...@@ -407,7 +407,7 @@ class OC_OCS {
$entry=$result->fetchRow(); $entry=$result->fetchRow();
$totalcount=$entry['co']; $totalcount=$entry['co'];
$query=OC_DB::prepare('select id,timestamp,user,type,message from *PREFIX*log order by timestamp desc limit ?,?'); $query=OC_DB::prepare('select id,timestamp,`user`,type,message from *PREFIX*log order by timestamp desc limit ?,?');
$result = $query->execute(array(($page*$pagesize),$pagesize))->fetchAll(); $result = $query->execute(array(($page*$pagesize),$pagesize))->fetchAll();
$itemscount=count($result); $itemscount=count($result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment