1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Contacts: Replace hardcoded db prefixes.

This commit is contained in:
Thomas Tanghus 2013-03-05 01:32:04 +01:00
parent 358a41a8ac
commit 39c5e4700e

View File

@ -285,9 +285,9 @@ class App {
public static function lastModified($contact = null) { public static function lastModified($contact = null) {
if(is_null($contact)) { if(is_null($contact)) {
// FIXME: This doesn't take shared address books into account. // FIXME: This doesn't take shared address books into account.
$sql = 'SELECT MAX(`lastmodified`) FROM `oc_contacts_cards`, `oc_contacts_addressbooks` ' . $sql = 'SELECT MAX(`lastmodified`) FROM `*PREFIX*contacts_cards`, `*PREFIX*contacts_addressbooks` ' .
'WHERE `oc_contacts_cards`.`addressbookid` = `oc_contacts_addressbooks`.`id` AND ' . 'WHERE `*PREFIX*contacts_cards`.`addressbookid` = `*PREFIX*contacts_addressbooks`.`id` AND ' .
'`oc_contacts_addressbooks`.`userid` = ?'; '`*PREFIX*contacts_addressbooks`.`userid` = ?';
$stmt = \OCP\DB::prepare($sql); $stmt = \OCP\DB::prepare($sql);
$result = $stmt->execute(array(\OCP\USER::getUser())); $result = $stmt->execute(array(\OCP\USER::getUser()));
if (\OC_DB::isError($result)) { if (\OC_DB::isError($result)) {