mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-06 01:08:16 +01:00
Fiz namespace errors.
This commit is contained in:
parent
749dcad116
commit
495b94685a
@ -58,7 +58,7 @@ class VCard {
|
|||||||
$stmt = \OCP\DB::prepare($sql, $num, $start);
|
$stmt = \OCP\DB::prepare($sql, $num, $start);
|
||||||
$result = $stmt->execute($id);
|
$result = $stmt->execute($id);
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -73,7 +73,7 @@ class VCard {
|
|||||||
$stmt = \OCP\DB::prepare($sql, $num, $start);
|
$stmt = \OCP\DB::prepare($sql, $num, $start);
|
||||||
$result = $stmt->execute(array($id));
|
$result = $stmt->execute(array($id));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -107,7 +107,7 @@ class VCard {
|
|||||||
$stmt = \OCP\DB::prepare( 'SELECT * FROM `*PREFIX*contacts_cards` WHERE `id` = ?' );
|
$stmt = \OCP\DB::prepare( 'SELECT * FROM `*PREFIX*contacts_cards` WHERE `id` = ?' );
|
||||||
$result = $stmt->execute(array($id));
|
$result = $stmt->execute(array($id));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -130,7 +130,7 @@ class VCard {
|
|||||||
$stmt = \OCP\DB::prepare( 'SELECT * FROM `*PREFIX*contacts_cards` WHERE `addressbookid` = ? AND `uri` = ?' );
|
$stmt = \OCP\DB::prepare( 'SELECT * FROM `*PREFIX*contacts_cards` WHERE `addressbookid` = ? AND `uri` = ?' );
|
||||||
$result = $stmt->execute(array($aid,$uri));
|
$result = $stmt->execute(array($aid,$uri));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -196,7 +196,7 @@ class VCard {
|
|||||||
try {
|
try {
|
||||||
$result = $stmt->execute(array($aid,$uri));
|
$result = $stmt->execute(array($aid,$uri));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
@ -359,7 +359,7 @@ class VCard {
|
|||||||
try {
|
try {
|
||||||
$result = $stmt->execute(array($aid, $fn, $data, $uri, time()));
|
$result = $stmt->execute(array($aid, $fn, $data, $uri, time()));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -416,7 +416,7 @@ class VCard {
|
|||||||
try {
|
try {
|
||||||
$result = $stmt->execute(array($data,time(),$object[0]));
|
$result = $stmt->execute(array($data,time(),$object[0]));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
}
|
}
|
||||||
//OCP\Util::writeLog('contacts','OCA\Contacts\VCard::updateDataByID, id: '.$object[0].': '.$object[1],OCP\Util::DEBUG);
|
//OCP\Util::writeLog('contacts','OCA\Contacts\VCard::updateDataByID, id: '.$object[0].': '.$object[1],OCP\Util::DEBUG);
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
@ -489,7 +489,7 @@ class VCard {
|
|||||||
try {
|
try {
|
||||||
$result = $stmt->execute(array($fn, $data, time(), $id));
|
$result = $stmt->execute(array($fn, $data, time(), $id));
|
||||||
if (\OC_DB::isError($result)) {
|
if (\OC_DB::isError($result)) {
|
||||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
|
\OCP\Util::writeLog('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -525,7 +525,7 @@ class VCard {
|
|||||||
self::edit($oldcard['id'], $card);
|
self::edit($oldcard['id'], $card);
|
||||||
return true;
|
return true;
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
OCP\Util::writeLog('contacts', __METHOD__.', exception: '
|
\OCP\Util::writeLog('contacts', __METHOD__.', exception: '
|
||||||
. $e->getMessage() . ', '
|
. $e->getMessage() . ', '
|
||||||
. \OCP\USER::getUser(), \OCP\Util::ERROR);
|
. \OCP\USER::getUser(), \OCP\Util::ERROR);
|
||||||
\OCP\Util::writeLog('contacts', __METHOD__.', uri'
|
\OCP\Util::writeLog('contacts', __METHOD__.', uri'
|
||||||
@ -561,7 +561,7 @@ class VCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($addressbook['userid'] != \OCP\User::getUser() && !\OC_Group::inGroup(\OCP\User::getUser(), 'admin')) {
|
if ($addressbook['userid'] != \OCP\User::getUser() && !\OC_Group::inGroup(\OCP\User::getUser(), 'admin')) {
|
||||||
OCP\Util::writeLog('contacts', __METHOD__.', '
|
\OCP\Util::writeLog('contacts', __METHOD__.', '
|
||||||
. $addressbook['userid'] . ' != ' . \OCP\User::getUser(), \OCP\Util::DEBUG);
|
. $addressbook['userid'] . ' != ' . \OCP\User::getUser(), \OCP\Util::DEBUG);
|
||||||
$sharedAddressbook = \OCP\Share::getItemSharedWithBySource(
|
$sharedAddressbook = \OCP\Share::getItemSharedWithBySource(
|
||||||
'addressbook',
|
'addressbook',
|
||||||
@ -589,10 +589,10 @@ class VCard {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OC_Hook::emit('\OCA\Contacts\VCard', 'pre_deleteVCard',
|
\OC_Hook::emit('\OCA\Contacts\VCard', 'pre_deleteVCard',
|
||||||
array('aid' => null, 'id' => $id, 'uri' => null)
|
array('aid' => null, 'id' => $id, 'uri' => null)
|
||||||
);
|
);
|
||||||
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*contacts_cards` WHERE `id` = ?');
|
$stmt = \OCP\DB::prepare('DELETE FROM `*PREFIX*contacts_cards` WHERE `id` = ?');
|
||||||
try {
|
try {
|
||||||
$stmt->execute(array($id));
|
$stmt->execute(array($id));
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
@ -606,7 +606,7 @@ class VCard {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
OC_Contacts_App::getVCategories()->purgeObject($id);
|
App::getVCategories()->purgeObject($id);
|
||||||
|
|
||||||
App::updateDBProperties($id);
|
App::updateDBProperties($id);
|
||||||
App::getVCategories()->purgeObject($id);
|
App::getVCategories()->purgeObject($id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user