OCP\Util::writeLog('contacts','ajax/savecrop.php: '.$msg, OCP\Util::DEBUG);
exit();
}
-function debug($msg) {
- OCP\Util::writeLog('contacts','ajax/savecrop.php: '.$msg, OCP\Util::DEBUG);
-}
// Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('contacts');
-foreach($_POST as $key=>$value) {
- debug('POST: '.$key.'=>'.$value);
-}
-foreach($_GET as $key=>$value) {
- debug('GET: '.$key.'=>'.$value);
-}
OCP\JSON::callCheck();
-// foreach ($_POST as $key=>$element) {
-// OCP\Util::writeLog('contacts','ajax/savecrop.php: '.$key.'=>'.$element, OCP\Util::DEBUG);
-// }
-
// Firefox and Konqueror tries to download application/json for me. --Arthur
OCP\JSON::setContentTypeHeader('text/plain');
OCP\JSON::setContentTypeHeader('text/plain');
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('contacts');
-foreach($_POST as $key=>$value) {
- debug('POST: '.$key.'=>'.$value);
-}
-foreach($_GET as $key=>$value) {
- debug('GET: '.$key.'=>'.$value);
-}
OCP\JSON::callCheck();
// If it is a Drag'n'Drop transfer it's handled here.
$id = $_GET['id'];
$tmpfname = tempnam(get_temp_dir(), 'occOrig');
file_put_contents($tmpfname, file_get_contents('php://input'));
- debug($tmpfname.' uploaded');
$image = new OC_Image();
if($image->loadFromFile($tmpfname)) {
if($image->width() > 400 || $image->height() > 400) {