Skip to content
Snippets Groups Projects
Commit 3f457718 authored by Aldo "xoen" Giambelluca's avatar Aldo "xoen" Giambelluca
Browse files

Using table prefix preference in 'inc/lib_ocs.php'

parent 31df117f
No related branches found
No related tags found
No related merge requests found
...@@ -372,15 +372,17 @@ class OC_OCS { ...@@ -372,15 +372,17 @@ class OC_OCS {
* @return string xml/json * @return string xml/json
*/ */
private static function activityget($format,$page,$pagesize) { private static function activityget($format,$page,$pagesize) {
global $CONFIG_DBTABLEPREFIX;
$dbTableLog = $CONFIG_DBTABLEPREFIX . 'Log';
$user=OC_OCS::checkpassword(); $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(); $entry=$result->fetchRow();
$totalcount=$entry['co']; $totalcount=$entry['co'];
OC_DB::free_result($result); 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); $itemscount=count($result);
$url='http://'.substr($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'],0,-11).''; $url='http://'.substr($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'],0,-11).'';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment