summaryrefslogtreecommitdiffstats
path: root/apps/contacts
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-01 17:38:27 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-01 17:38:27 +0200
commitd0554bef069b29affa95ec3c2bf78af637703a90 (patch)
treef28c25fef284dc6b61425917e79a812c85274597 /apps/contacts
parent7ded9cf520f74b595bc0f8939ac59249b47ccbc9 (diff)
downloadnextcloud-server-d0554bef069b29affa95ec3c2bf78af637703a90.tar.gz
nextcloud-server-d0554bef069b29affa95ec3c2bf78af637703a90.zip
finish porting of the LOG calls or the apps to the public api
Diffstat (limited to 'apps/contacts')
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/activation.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/addcontact.php6
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/addproperty.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/categories/categoriesfor.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/categories/delete.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/categories/rescan.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/contactdetails.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/createaddressbook.php6
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/cropphoto.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/currentphoto.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/deletecard.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/deleteproperty.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/editname.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/loadcard.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/loadphoto.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/oc_photo.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/savecrop.php14
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/saveproperty.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/updateaddressbook.php6
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/uploadimport.php6
-rwxr-xr-x[-rw-r--r--]apps/contacts/ajax/uploadphoto.php10
-rwxr-xr-x[-rw-r--r--]apps/contacts/dynphoto.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/import.php4
-rwxr-xr-x[-rw-r--r--]apps/contacts/lib/addressbook.php8
-rwxr-xr-x[-rw-r--r--]apps/contacts/lib/app.php12
-rwxr-xr-x[-rw-r--r--]apps/contacts/lib/vcard.php40
-rwxr-xr-x[-rw-r--r--]apps/contacts/photo.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/templates/part.cropphoto.php2
-rwxr-xr-x[-rw-r--r--]apps/contacts/thumbnail.php12
29 files changed, 89 insertions, 89 deletions
diff --git a/apps/contacts/ajax/activation.php b/apps/contacts/ajax/activation.php
index 06d1a7e24fc..b45d1a6ccbe 100644..100755
--- a/apps/contacts/ajax/activation.php
+++ b/apps/contacts/ajax/activation.php
@@ -15,7 +15,7 @@ $bookid = $_POST['bookid'];
$book = OC_Contacts_App::getAddressbook($bookid);// is owner access check
if(!OC_Contacts_Addressbook::setActive($bookid, $_POST['active'])) {
- OC_Log::write('contacts','ajax/activation.php: Error activating addressbook: '.$bookid, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/activation.php: Error activating addressbook: '.$bookid, OCP\Util::ERROR);
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error (de)activating addressbook.'))));
exit();
}
diff --git a/apps/contacts/ajax/addcontact.php b/apps/contacts/ajax/addcontact.php
index 152277181bb..d87cbabe819 100644..100755
--- a/apps/contacts/ajax/addcontact.php
+++ b/apps/contacts/ajax/addcontact.php
@@ -24,11 +24,11 @@
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/addcontact.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/addcontact.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/addcontact.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/addcontact.php: '.$msg, OCP\Util::DEBUG);
}
// Check if we are a user
@@ -56,7 +56,7 @@ $vcard->setString('N',$n);
$id = OC_Contacts_VCard::add($aid,$vcard);
if(!$id) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('There was an error adding the contact.'))));
- OC_Log::write('contacts','ajax/addcontact.php: Recieved non-positive ID on adding card: '.$id, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/addcontact.php: Recieved non-positive ID on adding card: '.$id, OCP\Util::ERROR);
exit();
}
diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php
index 9a5e59692d6..8623c6fdca7 100644..100755
--- a/apps/contacts/ajax/addproperty.php
+++ b/apps/contacts/ajax/addproperty.php
@@ -60,7 +60,7 @@ foreach($current as $item) {
$tmpvalue = (is_array($value)?implode(';', $value):$value);
if($tmpvalue == $item->value) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Trying to add duplicate property: ').$name.': '.$tmpvalue)));
- OC_Log::write('contacts','ajax/addproperty.php: Trying to add duplicate property: '.$name.': '.$tmpvalue, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/addproperty.php: Trying to add duplicate property: '.$name.': '.$tmpvalue, OCP\Util::DEBUG);
exit();
}
}
@@ -118,7 +118,7 @@ $checksum = md5($vcard->children[$line]->serialize());
if(!OC_Contacts_VCard::edit($id,$vcard)) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error adding contact property.'))));
- OC_Log::write('contacts','ajax/addproperty.php: Error updating contact property: '.$name, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/addproperty.php: Error updating contact property: '.$name, OCP\Util::ERROR);
exit();
}
diff --git a/apps/contacts/ajax/categories/categoriesfor.php b/apps/contacts/ajax/categories/categoriesfor.php
index 39a7758c8fb..c6b753a73b5 100644..100755
--- a/apps/contacts/ajax/categories/categoriesfor.php
+++ b/apps/contacts/ajax/categories/categoriesfor.php
@@ -17,7 +17,7 @@ if(is_null($id)) {
}
$vcard = OC_Contacts_App::getContactVCard( $id );
foreach($vcard->children as $property){
- //OC_Log::write('contacts','ajax/categories/checksumfor.php: '.$property->name, OC_Log::DEBUG);
+ //OCP\Util::writeLog('contacts','ajax/categories/checksumfor.php: '.$property->name, OCP\Util::DEBUG);
if($property->name == 'CATEGORIES') {
$checksum = md5($property->serialize());
OC_JSON::success(array('data' => array('value'=>$property->value, 'checksum'=>$checksum)));
diff --git a/apps/contacts/ajax/categories/delete.php b/apps/contacts/ajax/categories/delete.php
index 3cc2dea6638..f4e7ba76aa9 100644..100755
--- a/apps/contacts/ajax/categories/delete.php
+++ b/apps/contacts/ajax/categories/delete.php
@@ -16,11 +16,11 @@ foreach ($_POST as $key=>$element) {
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/categories/delete.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/categories/delete.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/categories/delete.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/categories/delete.php: '.$msg, OCP\Util::DEBUG);
}
$categories = isset($_POST['categories'])?$_POST['categories']:null;
diff --git a/apps/contacts/ajax/categories/rescan.php b/apps/contacts/ajax/categories/rescan.php
index 09208c3f685..97fd1b22fea 100644..100755
--- a/apps/contacts/ajax/categories/rescan.php
+++ b/apps/contacts/ajax/categories/rescan.php
@@ -16,11 +16,11 @@ foreach ($_POST as $key=>$element) {
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/categories/rescan.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/categories/rescan.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG);
}
$addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser());
diff --git a/apps/contacts/ajax/contactdetails.php b/apps/contacts/ajax/contactdetails.php
index 87c2ecbcdad..aa6aca4562a 100644..100755
--- a/apps/contacts/ajax/contactdetails.php
+++ b/apps/contacts/ajax/contactdetails.php
@@ -24,7 +24,7 @@
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/contactdetails.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/contactdetails.php: '.$msg, OCP\Util::DEBUG);
exit();
}
diff --git a/apps/contacts/ajax/createaddressbook.php b/apps/contacts/ajax/createaddressbook.php
index 5cdb9b49ef8..6c9976f6fa3 100644..100755
--- a/apps/contacts/ajax/createaddressbook.php
+++ b/apps/contacts/ajax/createaddressbook.php
@@ -16,19 +16,19 @@ $userid = OC_User::getUser();
$name = trim(strip_tags($_POST['name']));
if(!$name) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Cannot add addressbook with an empty name.'))));
- OC_Log::write('contacts','ajax/createaddressbook.php: Cannot add addressbook with an empty name: '.strip_tags($_POST['name']), OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/createaddressbook.php: Cannot add addressbook with an empty name: '.strip_tags($_POST['name']), OCP\Util::ERROR);
exit();
}
$bookid = OC_Contacts_Addressbook::add($userid, $name, null);
if(!$bookid) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error adding addressbook.'))));
- OC_Log::write('contacts','ajax/createaddressbook.php: Error adding addressbook: '.$_POST['name'], OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/createaddressbook.php: Error adding addressbook: '.$_POST['name'], OCP\Util::ERROR);
exit();
}
if(!OC_Contacts_Addressbook::setActive($bookid, 1)) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error activating addressbook.'))));
- OC_Log::write('contacts','ajax/createaddressbook.php: Error activating addressbook: '.$bookid, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/createaddressbook.php: Error activating addressbook: '.$bookid, OCP\Util::ERROR);
//exit();
}
$addressbook = OC_Contacts_App::getAddressbook($bookid);
diff --git a/apps/contacts/ajax/cropphoto.php b/apps/contacts/ajax/cropphoto.php
index 96e66ffb69c..09bdbbc439a 100644..100755
--- a/apps/contacts/ajax/cropphoto.php
+++ b/apps/contacts/ajax/cropphoto.php
@@ -29,7 +29,7 @@ OC_JSON::checkAppEnabled('contacts');
$tmp_path = $_GET['tmp_path'];
$id = $_GET['id'];
-OC_Log::write('contacts','ajax/cropphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OC_Log::DEBUG);
+OCP\Util::writeLog('contacts','ajax/cropphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OCP\Util::DEBUG);
$tmpl = new OC_TEMPLATE("contacts", "part.cropphoto");
$tmpl->assign('tmp_path', $tmp_path);
$tmpl->assign('id', $id);
diff --git a/apps/contacts/ajax/currentphoto.php b/apps/contacts/ajax/currentphoto.php
index 171f5c34785..488f064836b 100644..100755
--- a/apps/contacts/ajax/currentphoto.php
+++ b/apps/contacts/ajax/currentphoto.php
@@ -29,11 +29,11 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/currentphoto.php: '.$msg, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/currentphoto.php: '.$msg, OCP\Util::ERROR);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/currentphoto.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/currentphoto.php: '.$msg, OCP\Util::DEBUG);
}
if (!isset($_GET['id'])) {
diff --git a/apps/contacts/ajax/deletecard.php b/apps/contacts/ajax/deletecard.php
index 98cdb85f0fc..84526e9b13b 100644..100755
--- a/apps/contacts/ajax/deletecard.php
+++ b/apps/contacts/ajax/deletecard.php
@@ -21,7 +21,7 @@
*/
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/saveproperty.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/saveproperty.php: '.$msg, OCP\Util::DEBUG);
exit();
}
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php
index 73786cb10cf..4c753816218 100644..100755
--- a/apps/contacts/ajax/deleteproperty.php
+++ b/apps/contacts/ajax/deleteproperty.php
@@ -41,7 +41,7 @@ unset($vcard->children[$line]);
if(!OC_Contacts_VCard::edit($id,$vcard)) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error deleting contact property.'))));
- OC_Log::write('contacts','ajax/deleteproperty.php: Error deleting contact property', OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/deleteproperty.php: Error deleting contact property', OCP\Util::ERROR);
exit();
}
diff --git a/apps/contacts/ajax/editname.php b/apps/contacts/ajax/editname.php
index 9e4d6814620..0baa9403524 100644..100755
--- a/apps/contacts/ajax/editname.php
+++ b/apps/contacts/ajax/editname.php
@@ -11,11 +11,11 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/editname.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/editname.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/editname.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/editname.php: '.$msg, OCP\Util::DEBUG);
}
$tmpl = new OC_TEMPLATE("contacts", "part.edit_name_dialog");
diff --git a/apps/contacts/ajax/loadcard.php b/apps/contacts/ajax/loadcard.php
index b2650a76f0e..a2660130a25 100644..100755
--- a/apps/contacts/ajax/loadcard.php
+++ b/apps/contacts/ajax/loadcard.php
@@ -24,11 +24,11 @@
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/loadcard.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/loadcard.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/loadcard.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/loadcard.php: '.$msg, OCP\Util::DEBUG);
}
// foreach ($_POST as $key=>$element) {
// debug('_POST: '.$key.'=>'.$element);
diff --git a/apps/contacts/ajax/loadphoto.php b/apps/contacts/ajax/loadphoto.php
index c076d97a7c2..8d40669a5b3 100644..100755
--- a/apps/contacts/ajax/loadphoto.php
+++ b/apps/contacts/ajax/loadphoto.php
@@ -26,12 +26,12 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
// foreach ($_POST as $key=>$element) {
-// OC_Log::write('contacts','ajax/savecrop.php: '.$key.'=>'.$element, OC_Log::DEBUG);
+// OCP\Util::writeLog('contacts','ajax/savecrop.php: '.$key.'=>'.$element, OCP\Util::DEBUG);
// }
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/loadphoto.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/loadphoto.php: '.$msg, OCP\Util::DEBUG);
exit();
}
diff --git a/apps/contacts/ajax/oc_photo.php b/apps/contacts/ajax/oc_photo.php
index e46441c4821..8c6b95c5563 100644..100755
--- a/apps/contacts/ajax/oc_photo.php
+++ b/apps/contacts/ajax/oc_photo.php
@@ -29,11 +29,11 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/oc_photo.php: '.$msg, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/oc_photo.php: '.$msg, OCP\Util::ERROR);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/oc_photo.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/oc_photo.php: '.$msg, OCP\Util::DEBUG);
}
if(!isset($_GET['id'])) {
diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php
index c1a0e2b0583..36d582eca9c 100644..100755
--- a/apps/contacts/ajax/savecrop.php
+++ b/apps/contacts/ajax/savecrop.php
@@ -23,14 +23,14 @@
*/
// Init owncloud
-OC_Log::write('contacts','ajax/savecrop.php: Huzzah!!!', OC_Log::DEBUG);
+OCP\Util::writeLog('contacts','ajax/savecrop.php: Huzzah!!!', OCP\Util::DEBUG);
// Check if we are a user
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
// foreach ($_POST as $key=>$element) {
-// OC_Log::write('contacts','ajax/savecrop.php: '.$key.'=>'.$element, OC_Log::DEBUG);
+// OCP\Util::writeLog('contacts','ajax/savecrop.php: '.$key.'=>'.$element, OCP\Util::DEBUG);
// }
// Firefox and Konqueror tries to download application/json for me. --Arthur
@@ -38,7 +38,7 @@ OC_JSON::setContentTypeHeader('text/plain');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/savecrop.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/savecrop.php: '.$msg, OCP\Util::DEBUG);
exit();
}
@@ -61,14 +61,14 @@ if($id == '') {
bailOut('Missing contact id.');
}
-OC_Log::write('contacts','savecrop.php: files: '.$tmp_path.' exists: '.file_exists($tmp_path), OC_Log::DEBUG);
+OCP\Util::writeLog('contacts','savecrop.php: files: '.$tmp_path.' exists: '.file_exists($tmp_path), OCP\Util::DEBUG);
if(file_exists($tmp_path)) {
$image = new OC_Image();
if($image->loadFromFile($tmp_path)) {
$w = ($w != -1 ? $w : $image->width());
$h = ($h != -1 ? $h : $image->height());
- OC_Log::write('contacts','savecrop.php, x: '.$x1.' y: '.$y1.' w: '.$w.' h: '.$h, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','savecrop.php, x: '.$x1.' y: '.$y1.' w: '.$w.' h: '.$h, OCP\Util::DEBUG);
if($image->crop($x1, $y1, $w, $h)) {
if($image->resize(200)) {
$tmpfname = tempnam("/tmp", "occCropped"); // create a new file because of caching issues.
@@ -80,7 +80,7 @@ if(file_exists($tmp_path)) {
bailOut('Error getting contact object.');
}
if($card->__isset('PHOTO')) {
- OC_Log::write('contacts','savecrop.php: PHOTO property exists.', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','savecrop.php: PHOTO property exists.', OCP\Util::DEBUG);
$property = $card->__get('PHOTO');
if(!$property) {
unlink($tmpfname);
@@ -91,7 +91,7 @@ if(file_exists($tmp_path)) {
$property->parameters[] = new Sabre_VObject_Parameter('TYPE', $image->mimeType());
$card->__set('PHOTO', $property);
} else {
- OC_Log::write('contacts','savecrop.php: files: Adding PHOTO property.', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','savecrop.php: files: Adding PHOTO property.', OCP\Util::DEBUG);
$card->addProperty('PHOTO', $image->__toString(), array('ENCODING' => 'b', 'TYPE' => $image->mimeType()));
}
$now = new DateTime;
diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php
index e459ed733d8..b8b4a422cf2 100644..100755
--- a/apps/contacts/ajax/saveproperty.php
+++ b/apps/contacts/ajax/saveproperty.php
@@ -29,11 +29,11 @@ OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/saveproperty.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/saveproperty.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/saveproperty.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/saveproperty.php: '.$msg, OCP\Util::DEBUG);
}
// foreach ($_POST as $key=>$element) {
// debug('_POST: '.$key.'=>'.print_r($element, true));
diff --git a/apps/contacts/ajax/updateaddressbook.php b/apps/contacts/ajax/updateaddressbook.php
index 06028db479a..b016cf92939 100644..100755
--- a/apps/contacts/ajax/updateaddressbook.php
+++ b/apps/contacts/ajax/updateaddressbook.php
@@ -18,19 +18,19 @@ OC_Contacts_App::getAddressbook($bookid); // is owner access check
$name = trim(strip_tags($_POST['name']));
if(!$name) {
OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Cannot update addressbook with an empty name.'))));
- OC_Log::write('contacts','ajax/updateaddressbook.php: Cannot update addressbook with an empty name: '.strip_tags($_POST['name']), OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/updateaddressbook.php: Cannot update addressbook with an empty name: '.strip_tags($_POST['name']), OCP\Util::ERROR);
exit();
}
if(!OC_Contacts_Addressbook::edit($bookid, $name, null)) {
OC_JSON::error(array('data' => array('message' => $l->t('Error updating addressbook.'))));
- OC_Log::write('contacts','ajax/updateaddressbook.php: Error adding addressbook: ', OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/updateaddressbook.php: Error adding addressbook: ', OCP\Util::ERROR);
//exit();
}
if(!OC_Contacts_Addressbook::setActive($bookid, $_POST['active'])) {
OC_JSON::error(array('data' => array('message' => $l->t('Error (de)activating addressbook.'))));
- OC_Log::write('contacts','ajax/updateaddressbook.php: Error (de)activating addressbook: '.$bookid, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/updateaddressbook.php: Error (de)activating addressbook: '.$bookid, OCP\Util::ERROR);
//exit();
}
diff --git a/apps/contacts/ajax/uploadimport.php b/apps/contacts/ajax/uploadimport.php
index f44335a961e..e2bc6d7290b 100644..100755
--- a/apps/contacts/ajax/uploadimport.php
+++ b/apps/contacts/ajax/uploadimport.php
@@ -27,11 +27,11 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/uploadimport.php: '.$msg, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','ajax/uploadimport.php: '.$msg, OCP\Util::ERROR);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/uploadimport.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadimport.php: '.$msg, OCP\Util::DEBUG);
}
$view = OC_App::getStorage('contacts');
@@ -51,7 +51,7 @@ if($fn) {
// File input transfers are handled here
if (!isset($_FILES['importfile'])) {
- OC_Log::write('contacts','ajax/uploadphoto.php: No file was uploaded. Unknown error.', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadphoto.php: No file was uploaded. Unknown error.', OCP\Util::DEBUG);
OC_JSON::error(array('data' => array( 'message' => 'No file was uploaded. Unknown error' )));
exit();
}
diff --git a/apps/contacts/ajax/uploadphoto.php b/apps/contacts/ajax/uploadphoto.php
index 082776f7f27..1148c271dcd 100644..100755
--- a/apps/contacts/ajax/uploadphoto.php
+++ b/apps/contacts/ajax/uploadphoto.php
@@ -29,11 +29,11 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
- OC_Log::write('contacts','ajax/uploadphoto.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadphoto.php: '.$msg, OCP\Util::DEBUG);
exit();
}
function debug($msg) {
- OC_Log::write('contacts','ajax/uploadphoto.php: '.$msg, OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadphoto.php: '.$msg, OCP\Util::DEBUG);
}
// If it is a Drag'n'Drop transfer it's handled here.
@@ -41,7 +41,7 @@ $fn = (isset($_SERVER['HTTP_X_FILE_NAME']) ? $_SERVER['HTTP_X_FILE_NAME'] : fals
if ($fn) {
// AJAX call
if (!isset($_GET['id'])) {
- OC_Log::write('contacts','ajax/uploadphoto.php: No contact ID was submitted.', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadphoto.php: No contact ID was submitted.', OCP\Util::DEBUG);
OC_JSON::error(array('data' => array( 'message' => 'No contact ID was submitted.' )));
exit();
}
@@ -70,12 +70,12 @@ if ($fn) {
if (!isset($_POST['id'])) {
- OC_Log::write('contacts','ajax/uploadphoto.php: No contact ID was submitted.', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadphoto.php: No contact ID was submitted.', OCP\Util::DEBUG);
OC_JSON::error(array('data' => array( 'message' => 'No contact ID was submitted.' )));
exit();
}
if (!isset($_FILES['imagefile'])) {
- OC_Log::write('contacts','ajax/uploadphoto.php: No file was uploaded. Unknown error.', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','ajax/uploadphoto.php: No file was uploaded. Unknown error.', OCP\Util::DEBUG);
OC_JSON::error(array('data' => array( 'message' => 'No file was uploaded. Unknown error' )));
exit();
}
diff --git a/apps/contacts/dynphoto.php b/apps/contacts/dynphoto.php
index c1646e483de..ea6cef227e1 100644..100755
--- a/apps/contacts/dynphoto.php
+++ b/apps/contacts/dynphoto.php
@@ -26,7 +26,7 @@ $tmp_path = $_GET['tmp_path'];
$maxsize = isset($_GET['maxsize']) ? $_GET['maxsize'] : -1;
header("Cache-Control: no-cache, no-store, must-revalidate");
-OC_Log::write('contacts','dynphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OC_Log::DEBUG);
+OCP\Util::writeLog('contacts','dynphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OCP\Util::DEBUG);
$image = new OC_Image($tmp_path);
if($maxsize != -1) {
diff --git a/apps/contacts/import.php b/apps/contacts/import.php
index 8e0a427399b..8fb1c055e0f 100644..100755
--- a/apps/contacts/import.php
+++ b/apps/contacts/import.php
@@ -116,7 +116,7 @@ foreach($importready as $import){
$card = OC_VObject::parse($import);
if (!$card) {
$failed += 1;
- OC_Log::write('contacts','Import: skipping card. Error parsing VCard: '.$import, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','Import: skipping card. Error parsing VCard: '.$import, OCP\Util::ERROR);
continue; // Ditch cards that can't be parsed by Sabre.
}
$imported += 1;
@@ -134,7 +134,7 @@ if(is_writable('import_tmp/')){
}
if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') {
if(!$view->unlink('/' . $_POST['file'])) {
- OC_Log::write('contacts','Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], OCP\Util::ERROR);
}
}
OC_JSON::success(array('data' => array('imported'=>$imported, 'failed'=>$failed)));
diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php
index 9061fa19140..bf1cb9323db 100644..100755
--- a/apps/contacts/lib/addressbook.php
+++ b/apps/contacts/lib/addressbook.php
@@ -195,9 +195,9 @@ class OC_Contacts_Addressbook{
$stmt = OC_DB::prepare( $prep );
$result = $stmt->execute($active);
} catch(Exception $e) {
- OC_Log::write('contacts','OC_Contacts_Addressbook:active:, exception: '.$e->getMessage(),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_Addressbook:active, ids: '.join(',', $active),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_Addressbook::active, SQL:'.$prep,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_Addressbook:active:, exception: '.$e->getMessage(),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_Addressbook:active, ids: '.join(',', $active),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_Addressbook::active, SQL:'.$prep,OCP\Util::DEBUG);
}
while( $row = $result->fetchRow()){
@@ -246,7 +246,7 @@ class OC_Contacts_Addressbook{
* @return boolean
*/
public static function isActive($id){
- //OC_Log::write('contacts','OC_Contacts_Addressbook::isActive('.$id.'):'.in_array($id, self::activeIds()), OC_Log::DEBUG);
+ //OCP\Util::writeLog('contacts','OC_Contacts_Addressbook::isActive('.$id.'):'.in_array($id, self::activeIds()), OCP\Util::DEBUG);
return in_array($id, self::activeIds());
}
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 128b9cd660d..26ea6d06092 100644..100755
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -19,11 +19,11 @@ class OC_Contacts_App {
$addressbook = OC_Contacts_Addressbook::find( $id );
if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()) {
if ($addressbook === false) {
- OC_Log::write('contacts', 'Addressbook not found: '. $id, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts', 'Addressbook not found: '. $id, OCP\Util::ERROR);
OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('Addressbook not found.'))));
}
else {
- OC_Log::write('contacts', 'Addressbook('.$id.') is not from '.OC_User::getUser(), OC_Log::ERROR);
+ OCP\Util::writeLog('contacts', 'Addressbook('.$id.') is not from '.OC_User::getUser(), OCP\Util::ERROR);
OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('This is not your addressbook.'))));
}
exit();
@@ -34,7 +34,7 @@ class OC_Contacts_App {
public static function getContactObject($id) {
$card = OC_Contacts_VCard::find( $id );
if( $card === false ) {
- OC_Log::write('contacts', 'Contact could not be found: '.$id, OC_Log::ERROR);
+ OCP\Util::writeLog('contacts', 'Contact could not be found: '.$id, OCP\Util::ERROR);
OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('Contact could not be found.').' '.$id)));
exit();
}
@@ -55,11 +55,11 @@ class OC_Contacts_App {
if(!is_null($vcard) && !$vcard->__isset('N')) {
$appinfo = OC_App::getAppInfo('contacts');
if($appinfo['version'] >= 5) {
- OC_Log::write('contacts','OC_Contacts_App::getContactVCard. Deprecated check for missing N field', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_App::getContactVCard. Deprecated check for missing N field', OCP\Util::DEBUG);
}
- OC_Log::write('contacts','getContactVCard, Missing N field', OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','getContactVCard, Missing N field', OCP\Util::DEBUG);
if($vcard->__isset('FN')) {
- OC_Log::write('contacts','getContactVCard, found FN field: '.$vcard->__get('FN'), OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','getContactVCard, found FN field: '.$vcard->__get('FN'), OCP\Util::DEBUG);
$n = implode(';', array_reverse(array_slice(explode(' ', $vcard->__get('FN')), 0, 2))).';;;';
$vcard->setString('N', $n);
OC_Contacts_VCard::edit( $id, $vcard);
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php
index d8cce36b80b..45ce1ac3a2c 100644..100755
--- a/apps/contacts/lib/vcard.php
+++ b/apps/contacts/lib/vcard.php
@@ -56,17 +56,17 @@ class OC_Contacts_VCard{
$stmt = OC_DB::prepare( $prep );
$result = $stmt->execute($id);
} catch(Exception $e) {
- OC_Log::write('contacts','OC_Contacts_VCard:all:, exception: '.$e->getMessage(),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_VCard:all, ids: '.join(',', $id),OC_Log::DEBUG);
- OC_Log::write('contacts','SQL:'.$prep,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard:all:, exception: '.$e->getMessage(),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard:all, ids: '.join(',', $id),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','SQL:'.$prep,OCP\Util::DEBUG);
}
} elseif($id) {
try {
$stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*contacts_cards WHERE addressbookid = ? ORDER BY fullname' );
$result = $stmt->execute(array($id));
} catch(Exception $e) {
- OC_Log::write('contacts','OC_Contacts_VCard:all:, exception: '.$e->getMessage(),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_VCard:all, ids: '. $id,OC_Log::DEBUG);
+ OC\Util::writeLog('contacts','OC_Contacts_VCard:all:, exception: '.$e->getMessage(),OCP\Util::DEBUG);
+ OC\Util::writeLog('contacts','OC_Contacts_VCard:all, ids: '. $id,OCP\Util::DEBUG);
}
}
$cards = array();
@@ -181,7 +181,7 @@ class OC_Contacts_VCard{
// Add version if needed
if($version && $version < '3.0') {
$upgrade = true;
- OC_Log::write('contacts','OC_Contacts_VCard::updateValuesFromAdd. Updating from version: '.$version,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Updating from version: '.$version,OCP\Util::DEBUG);
}
foreach($vcard->children as &$property){
// Decode string properties and remove obsolete properties.
@@ -190,9 +190,9 @@ class OC_Contacts_VCard{
}
// Fix format of type parameters.
if($upgrade && in_array($property->name, $typeprops)) {
- OC_Log::write('contacts','OC_Contacts_VCard::updateValuesFromAdd. before: '.$property->serialize(),OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. before: '.$property->serialize(),OCP\Util::DEBUG);
self::formatPropertyTypes($property);
- OC_Log::write('contacts','OC_Contacts_VCard::updateValuesFromAdd. after: '.$property->serialize(),OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. after: '.$property->serialize(),OCP\Util::DEBUG);
}
if($property->name == 'FN'){
$fn = $property->value;
@@ -222,7 +222,7 @@ class OC_Contacts_VCard{
$fn = 'Unknown Name';
}
$vcard->setString('FN', $fn);
- OC_Log::write('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'FN\' field: '.$fn,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'FN\' field: '.$fn,OCP\Util::DEBUG);
}
if(!$n || $n = ';;;;'){ // Fix missing 'N' field. Ugly hack ahead ;-)
$slice = array_reverse(array_slice(explode(' ', $fn), 0, 2)); // Take 2 first name parts of 'FN' and reverse.
@@ -231,12 +231,12 @@ class OC_Contacts_VCard{
}
$n = implode(';', $slice).';;;';
$vcard->setString('N', $n);
- OC_Log::write('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'N\' field: '.$n,OC_Log::DEBUG);
+ OC\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'N\' field: '.$n,OCP\Util::DEBUG);
}
if(!$uid) {
$vcard->setUID();
$uid = $vcard->getAsString('UID');
- OC_Log::write('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'UID\' field: '.$uid,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'UID\' field: '.$uid,OCP\Util::DEBUG);
}
if(self::trueUID($aid, $uid)) {
$vcard->setString('UID', $uid);
@@ -263,7 +263,7 @@ class OC_Contacts_VCard{
*/
public static function add($aid, OC_VObject $card, $uri=null){
if(is_null($card)){
- OC_Log::write('contacts','OC_Contacts_VCard::add. No vCard supplied', OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::add. No vCard supplied', OCP\Util::ERROR);
return null;
};
@@ -317,10 +317,10 @@ class OC_Contacts_VCard{
$data = $vcard->serialize();
try {
$result = $stmt->execute(array($data,time(),$object[0]));
- //OC_Log::write('contacts','OC_Contacts_VCard::updateDataByID, id: '.$object[0].': '.$object[1],OC_Log::DEBUG);
+ //OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateDataByID, id: '.$object[0].': '.$object[1],OCP\Util::DEBUG);
} catch(Exception $e) {
- OC_Log::write('contacts','OC_Contacts_VCard::updateDataByID:, exception: '.$e->getMessage(),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_VCard::updateDataByID, id: '.$object[0],OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateDataByID:, exception: '.$e->getMessage(),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateDataByID, id: '.$object[0],OCP\Util::DEBUG);
}
}
}
@@ -526,9 +526,9 @@ class OC_Contacts_VCard{
$vals = array_merge((array)$aid, $id);
$result = $stmt->execute($vals);
} catch(Exception $e) {
- OC_Log::write('contacts','OC_Contacts_VCard::moveToAddressBook:, exception: '.$e->getMessage(),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_VCard::moveToAddressBook, ids: '.join(',', $vals),OC_Log::DEBUG);
- OC_Log::write('contacts','SQL:'.$prep,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::moveToAddressBook:, exception: '.$e->getMessage(),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::moveToAddressBook, ids: '.join(',', $vals),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','SQL:'.$prep,OCP\Util::DEBUG);
return false;
}
} else {
@@ -536,8 +536,8 @@ class OC_Contacts_VCard{
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*contacts_cards SET addressbookid = ? WHERE id = ?' );
$result = $stmt->execute(array($aid, $id));
} catch(Exception $e) {
- OC_Log::write('contacts','OC_Contacts_VCard::moveToAddressBook:, exception: '.$e->getMessage(),OC_Log::DEBUG);
- OC_Log::write('contacts','OC_Contacts_VCard::moveToAddressBook, id: '.$id,OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::moveToAddressBook:, exception: '.$e->getMessage(),OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts','OC_Contacts_VCard::moveToAddressBook, id: '.$id,OCP\Util::DEBUG);
return false;
}
}
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php
index c19ccccbc7f..f9e62455c13 100644..100755
--- a/apps/contacts/photo.php
+++ b/apps/contacts/photo.php
@@ -33,7 +33,7 @@ if(!$image) {
}
// invalid vcard
if( is_null($contact)) {
- OC_Log::write('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OCP\Util::ERROR);
} else {
OC_Response::enableCaching($caching);
OC_Contacts_App::setLastModifiedHeader($contact);
diff --git a/apps/contacts/templates/part.cropphoto.php b/apps/contacts/templates/part.cropphoto.php
index 5faa4aa6ac6..2284d49aca9 100644..100755
--- a/apps/contacts/templates/part.cropphoto.php
+++ b/apps/contacts/templates/part.cropphoto.php
@@ -1,7 +1,7 @@
<?php
$id = $_['id'];
$tmp_path = $_['tmp_path'];
-OC_Log::write('contacts','templates/part.cropphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OC_Log::DEBUG);
+OCP\Util::writeLog('contacts','templates/part.cropphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OCP\Util::DEBUG);
?>
<script language="Javascript">
jQuery(function($) {
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index 13f16954caf..1f9fbd7135e 100644..100755
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -33,7 +33,7 @@ function getStandardImage(){
}
if(!function_exists('imagecreatefromjpeg')) {
- OC_Log::write('contacts','thumbnail.php. GD module not installed',OC_Log::DEBUG);
+ OCP\Util::writeLog('contacts','thumbnail.php. GD module not installed',OCP\Util::DEBUG);
getStandardImage();
exit();
}
@@ -45,7 +45,7 @@ $contact = OC_Contacts_App::getContactVCard($id);
// invalid vcard
if(is_null($contact)){
- OC_Log::write('contacts','thumbnail.php. The VCard for ID '.$id.' is not RFC compatible',OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','thumbnail.php. The VCard for ID '.$id.' is not RFC compatible',OCP\Util::ERROR);
getStandardImage();
exit();
}
@@ -67,16 +67,16 @@ if($photo) {
// done
exit();
} else {
- OC_Log::write('contacts','thumbnail.php. Couldn\'t display thumbnail for ID '.$id,OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t display thumbnail for ID '.$id,OCP\Util::ERROR);
}
} else {
- OC_Log::write('contacts','thumbnail.php. Couldn\'t resize thumbnail for ID '.$id,OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t resize thumbnail for ID '.$id,OCP\Util::ERROR);
}
}else{
- OC_Log::write('contacts','thumbnail.php. Couldn\'t crop thumbnail for ID '.$id,OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t crop thumbnail for ID '.$id,OCP\Util::ERROR);
}
} else {
- OC_Log::write('contacts','thumbnail.php. Couldn\'t load image string for ID '.$id,OC_Log::ERROR);
+ OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t load image string for ID '.$id,OCP\Util::ERROR);
}
}
getStandardImage();