]> source.dussan.org Git - nextcloud-server.git/commitdiff
Using table prefix preference in 'inc/lib_ocs.php'
authorAldo "xoen" Giambelluca <xoen@xoen.org>
Sat, 3 Jul 2010 17:12:51 +0000 (19:12 +0200)
committerAldo "xoen" Giambelluca <xoen@xoen.org>
Sat, 3 Jul 2010 17:12:51 +0000 (19:12 +0200)
inc/lib_ocs.php

index 52dc95800ab2baef2b617f6841ddbf514a5f32f5..c2fe6dba33a87be45d8e09a93f9a3e645e3cca87 100755 (executable)
@@ -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).'';