mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-12 23:09:15 +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) {
|
if(!contacts_properties_indexed) {
|
||||||
// Wait a couple of mins then check if contacts are indexed.
|
// Wait a couple of mins then check if contacts are indexed.
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$.when($.post(OC.generateUrl('apps/contacts/indexproperties/{user}/')))
|
$.when($.post(OC.generateUrl('apps/contacts/indexproperties/{user}/', {user: OC.currentUser})))
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
if(!response.isIndexed) {
|
if(!response.isIndexed) {
|
||||||
OC.notify({message:t('contacts', 'Indexing contacts'), timeout:20});
|
OC.notify({message:t('contacts', 'Indexing contacts'), timeout:20});
|
||||||
|
@ -91,8 +91,8 @@ class AddressbookProvider implements \OCP\IAddressBook {
|
|||||||
public function search($pattern, $searchProperties, $options) {
|
public function search($pattern, $searchProperties, $options) {
|
||||||
$ids = array();
|
$ids = array();
|
||||||
$results = array();
|
$results = array();
|
||||||
$query = 'SELECT DISTINCT `contactid` FROM `' . self::PROPERTY_TABLE . '` WHERE (';
|
$query = 'SELECT DISTINCT `contactid` FROM `' . self::PROPERTY_TABLE . '` WHERE `userid` = ? AND (';
|
||||||
$params = array();
|
$params = array(\OCP\User::getUser());
|
||||||
foreach($searchProperties as $property) {
|
foreach($searchProperties as $property) {
|
||||||
$params[] = $property;
|
$params[] = $property;
|
||||||
$params[] = '%' . $pattern . '%';
|
$params[] = '%' . $pattern . '%';
|
||||||
|
@ -204,6 +204,11 @@ class Hooks{
|
|||||||
}
|
}
|
||||||
$offset += $limit;
|
$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) {
|
public static function getCalenderSources($parameters) {
|
||||||
|
Loading…
Reference in New Issue
Block a user