From 3f4577189591d84dc92f10c5263d13778f5c3e98 Mon Sep 17 00:00:00 2001
From: "Aldo \"xoen\" Giambelluca" <xoen@xoen.org>
Date: Sat, 3 Jul 2010 19:12:51 +0200
Subject: [PATCH] Using table prefix preference in 'inc/lib_ocs.php'

---
 inc/lib_ocs.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/inc/lib_ocs.php b/inc/lib_ocs.php
index 52dc95800a..c2fe6dba33 100755
--- a/inc/lib_ocs.php
+++ b/inc/lib_ocs.php
@@ -372,15 +372,17 @@ class OC_OCS {
    * @return string xml/json
    */
   private static function activityget($format,$page,$pagesize) {
+	global $CONFIG_DBTABLEPREFIX;
 
+	$dbTableLog = $CONFIG_DBTABLEPREFIX . 'Log';
     $user=OC_OCS::checkpassword();
 
-    $result = OC_DB::query('select count(*) as co from log');
+    $result = OC_DB::query("select count(*) as co from $dbTableLog");
     $entry=$result->fetchRow();
     $totalcount=$entry['co'];
     OC_DB::free_result($result);
 
-    $result = OC_DB::select('select id,timestamp,user,type,message from log order by timestamp desc limit '.($page*$pagesize).','.$pagesize);
+    $result = OC_DB::select("select id,timestamp,user,type,message from $dbTableLog order by timestamp desc limit " . ($page*$pagesize) . ",$pagesize");
     $itemscount=count($result);
 
     $url='http://'.substr($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'],0,-11).'';
-- 
GitLab