From 59f4ffb9a38b778519d8fd5e766d2039cee7275f Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 22 Feb 2017 15:14:36 +0100 Subject: use (int) instead of intval for performance reasons Signed-off-by: Bjoern Schiessle --- apps/files_sharing/lib/Controller/ShareesAPIController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index d6b517f3c43..2fb554f392c 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -429,13 +429,13 @@ class ShareesAPIController extends OCSController { public function search($search = '', $itemType = null, $page = 1, $perPage = 200, $shareType = null, $lookup = true) { // only search for string larger than a given threshold - $threshold = intval($this->config->getSystemValue('sharing.minSearchStringLength', 0)); + $threshold = (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0); if (strlen($search) < $threshold) { return new DataResponse($this->result); } // never return more than the max. number of results configured in the config.php - $maxResults = intval($this->config->getSystemValue('sharing.maxAutocompleteResults', 0)); + $maxResults = (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0); if ($maxResults > 0) { $perPage = min($perPage, $maxResults); } -- cgit v1.2.3