diff options
author | Aldo "xoen" Giambelluca <xoen@xoen.org> | 2010-07-04 11:32:39 +0200 |
---|---|---|
committer | Aldo "xoen" Giambelluca <xoen@xoen.org> | 2010-07-04 11:32:39 +0200 |
commit | 76672fe0379acfd26ac5b85c4c99040c9cb2554e (patch) | |
tree | 3eb79fb1af2b8c469248a5b146fd477a0cfeeaf4 /inc/lib_ocs.php | |
parent | f3627a756ea132cd61dc35ba94edd7d2d06315a3 (diff) | |
download | nextcloud-server-76672fe0379acfd26ac5b85c4c99040c9cb2554e.tar.gz nextcloud-server-76672fe0379acfd26ac5b85c4c99040c9cb2554e.zip |
Avoid creation of variables just to put the table names with prefix
Diffstat (limited to 'inc/lib_ocs.php')
-rwxr-xr-x | inc/lib_ocs.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/inc/lib_ocs.php b/inc/lib_ocs.php index c2fe6dba33a..e464d2ed9fb 100755 --- a/inc/lib_ocs.php +++ b/inc/lib_ocs.php @@ -374,15 +374,14 @@ class OC_OCS { 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 $dbTableLog"); + $result = OC_DB::query("select count(*) as co from {$CONFIG_DBTABLEPREFIX}log"); $entry=$result->fetchRow(); $totalcount=$entry['co']; OC_DB::free_result($result); - $result = OC_DB::select("select id,timestamp,user,type,message from $dbTableLog order by timestamp desc limit " . ($page*$pagesize) . ",$pagesize"); + $result = OC_DB::select("select id,timestamp,user,type,message from {$CONFIG_DBTABLEPREFIX}log order by timestamp desc limit " . ($page*$pagesize) . ",$pagesize"); $itemscount=count($result); $url='http://'.substr($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'],0,-11).''; |