diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 17:38:27 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 17:38:27 +0200 |
commit | d0554bef069b29affa95ec3c2bf78af637703a90 (patch) | |
tree | f28c25fef284dc6b61425917e79a812c85274597 /apps/contacts/ajax/savecrop.php | |
parent | 7ded9cf520f74b595bc0f8939ac59249b47ccbc9 (diff) | |
download | nextcloud-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/ajax/savecrop.php')
-rwxr-xr-x[-rw-r--r--] | apps/contacts/ajax/savecrop.php | 14 |
1 files changed, 7 insertions, 7 deletions
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; |