From 561d13c20ed0fca697d98f8845630ecaa0979bd5 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 17 Apr 2014 17:37:30 +0200 Subject: [PATCH] Simplify cropPhoto args --- lib/controller/contactphotocontroller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/controller/contactphotocontroller.php b/lib/controller/contactphotocontroller.php index 04bdf32a..7eca8b7e 100644 --- a/lib/controller/contactphotocontroller.php +++ b/lib/controller/contactphotocontroller.php @@ -187,10 +187,10 @@ class ContactPhotoController extends Controller { */ public function cropPhoto() { $params = $this->request->urlParams; - $x = (isset($this->request->post['x']) && $this->request->post['x']) ? $this->request->post['x'] : 0; - $y = (isset($this->request->post['y']) && $this->request->post['y']) ? $this->request->post['y'] : 0; - $w = (isset($this->request->post['w']) && $this->request->post['w']) ? $this->request->post['w'] : -1; - $h = (isset($this->request->post['h']) && $this->request->post['h']) ? $this->request->post['h'] : -1; + $x = $this->params('x', 0); + $y = $this->params('y', 0); + $w = $this->params('w', -1); + $h = $this->params('h', -1); $tmpkey = $params['key']; $addressBook = $this->app->getAddressBook($params['backend'], $params['addressBookId']);