mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-10 21:24:33 +01:00
Fix additional 404's refs https://github.com/owncloud/contacts/issues/623#issuecomment-56631474
This commit is contained in:
parent
2bf76c213c
commit
5e714a7e8e
@ -217,7 +217,7 @@ OC.notify = function(params) {
|
||||
if(!contacts_properties_indexed) {
|
||||
// Wait a couple of mins then check if contacts are indexed.
|
||||
setTimeout(function() {
|
||||
$.when($.post(OC.generateUrl('apps/contacts/indexproperties/{user}/')))
|
||||
$.when($.post(OC.generateUrl('apps/contacts/indexproperties/{user}/', {user: OC.currentUser})))
|
||||
.then(function(response) {
|
||||
if(!response.isIndexed) {
|
||||
OC.notify({message:t('contacts', 'Indexing contacts'), timeout:20});
|
||||
|
@ -91,8 +91,8 @@ class AddressbookProvider implements \OCP\IAddressBook {
|
||||
public function search($pattern, $searchProperties, $options) {
|
||||
$ids = array();
|
||||
$results = array();
|
||||
$query = 'SELECT DISTINCT `contactid` FROM `' . self::PROPERTY_TABLE . '` WHERE (';
|
||||
$params = array();
|
||||
$query = 'SELECT DISTINCT `contactid` FROM `' . self::PROPERTY_TABLE . '` WHERE `userid` = ? AND (';
|
||||
$params = array(\OCP\User::getUser());
|
||||
foreach($searchProperties as $property) {
|
||||
$params[] = $property;
|
||||
$params[] = '%' . $pattern . '%';
|
||||
|
@ -204,6 +204,11 @@ class Hooks{
|
||||
}
|
||||
$offset += $limit;
|
||||
}
|
||||
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*contacts_cards_properties`
|
||||
WHERE NOT EXISTS(SELECT NULL
|
||||
FROM `*PREFIX*contacts_cards`
|
||||
WHERE `*PREFIX*contacts_cards`.id = `*PREFIX*contacts_cards_properties`.contactid)');
|
||||
$result = $stmt->execute(array());
|
||||
}
|
||||
|
||||
public static function getCalenderSources($parameters) {
|
||||
|
Loading…
Reference in New Issue
Block a user