]> source.dussan.org Git - nextcloud-server.git/commitdiff
use (int) instead of intval for performance reasons
authorBjoern Schiessle <bjoern@schiessle.org>
Wed, 22 Feb 2017 14:14:36 +0000 (15:14 +0100)
committerBjoern Schiessle <bjoern@schiessle.org>
Wed, 22 Feb 2017 14:14:36 +0000 (15:14 +0100)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
apps/files_sharing/lib/Controller/ShareesAPIController.php

index 838dd1adf9b4f9ab4fc236cadcfaa50e577879d2..e4b5b0ce19c0d6397ab4070f84f7049e47c0df6a 100644 (file)
@@ -415,13 +415,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);
                }