mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
loadTagsFor() => load()
This commit is contained in:
parent
e06bd9b17a
commit
5c2aefbc5a
@ -71,7 +71,7 @@ class Hooks{
|
|||||||
|
|
||||||
if(count($parameters['contactids'])) {
|
if(count($parameters['contactids'])) {
|
||||||
// Remove contacts from groups
|
// Remove contacts from groups
|
||||||
$tagMgr = \OC::$server->getTagManager()->loadTagsFor('contact');
|
$tagMgr = \OC::$server->getTagManager()->load('contact');
|
||||||
$tagMgr->purgeObjects($parameters['contactids']);
|
$tagMgr->purgeObjects($parameters['contactids']);
|
||||||
|
|
||||||
// Purge property indexes
|
// Purge property indexes
|
||||||
@ -92,7 +92,7 @@ class Hooks{
|
|||||||
public static function contactDeletion($parameters) {
|
public static function contactDeletion($parameters) {
|
||||||
\OCP\Util::writeLog('contacts', __METHOD__.' id: '.$parameters['id'], \OCP\Util::DEBUG);
|
\OCP\Util::writeLog('contacts', __METHOD__.' id: '.$parameters['id'], \OCP\Util::DEBUG);
|
||||||
$ids = is_array($parameters['id']) ? $parameters['id'] : array($parameters['id']);
|
$ids = is_array($parameters['id']) ? $parameters['id'] : array($parameters['id']);
|
||||||
$tagMgr = \OC::$server->getTagManager()->loadTagsFor('contact');
|
$tagMgr = \OC::$server->getTagManager()->load('contact');
|
||||||
$tagMgr->purgeObjects($ids);
|
$tagMgr->purgeObjects($ids);
|
||||||
Utils\Properties::purgeIndexes($ids);
|
Utils\Properties::purgeIndexes($ids);
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ class Hooks{
|
|||||||
$contact = $parameters['contact'];
|
$contact = $parameters['contact'];
|
||||||
if(isset($contact->CATEGORIES)) {
|
if(isset($contact->CATEGORIES)) {
|
||||||
\OCP\Util::writeLog('contacts', __METHOD__.' groups: '.print_r($contact->CATEGORIES->getParts(), true), \OCP\Util::DEBUG);
|
\OCP\Util::writeLog('contacts', __METHOD__.' groups: '.print_r($contact->CATEGORIES->getParts(), true), \OCP\Util::DEBUG);
|
||||||
$tagMgr = \OC::$server->getTagManager()->loadTagsFor('contact');
|
$tagMgr = \OC::$server->getTagManager()->load('contact');
|
||||||
foreach($contact->CATEGORIES->getParts() as $group) {
|
foreach($contact->CATEGORIES->getParts() as $group) {
|
||||||
\OCP\Util::writeLog('contacts', __METHOD__.' group: '.$group, \OCP\Util::DEBUG);
|
\OCP\Util::writeLog('contacts', __METHOD__.' group: '.$group, \OCP\Util::DEBUG);
|
||||||
$tagMgr->tagAs($parameters['id'], $group);
|
$tagMgr->tagAs($parameters['id'], $group);
|
||||||
@ -132,7 +132,7 @@ class Hooks{
|
|||||||
$offset = 0;
|
$offset = 0;
|
||||||
$limit = 10;
|
$limit = 10;
|
||||||
|
|
||||||
$tagMgr = \OC::$server->getTagManager()->loadTagsFor('contact');
|
$tagMgr = \OC::$server->getTagManager()->load('contact');
|
||||||
$tags = array();
|
$tags = array();
|
||||||
|
|
||||||
foreach($tagMgr->getTags() as $tag) {
|
foreach($tagMgr->getTags() as $tag) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user