diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-02-21 17:22:06 -0600 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-02-21 17:22:06 -0600 |
commit | 8e3d0fecd237a457fe66e00bc293923dae9a5adf (patch) | |
tree | a92841d5891fed07968c3bb55afb147d728b7312 /core/js/sharedialogview.js | |
parent | 3284efd1996854df0252d3e40574759e698b812d (diff) | |
download | nextcloud-server-8e3d0fecd237a457fe66e00bc293923dae9a5adf.tar.gz nextcloud-server-8e3d0fecd237a457fe66e00bc293923dae9a5adf.zip |
Use intval() for validation of config options
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/js/sharedialogview.js')
-rw-r--r-- | core/js/sharedialogview.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index bbc40c9c8d4..6a92c6a8dd5 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -267,7 +267,10 @@ // show a notice that the list is truncated // this is the case if one of the search results is at least as long as the max result config option - if(Math.min(perPage, oc_config['sharing.maxAutocompleteResults']) <= Math.max(users.length, groups.length, remotes.length, emails.length, lookup.length)) { + if(oc_config['sharing.maxAutocompleteResults'] > 0 && + Math.min(perPage, oc_config['sharing.maxAutocompleteResults']) + <= Math.max(users.length, groups.length, remotes.length, emails.length, lookup.length)) { + var message = t('core', 'This list is maybe truncated - please refine your search term to see more results.'); $('.ui-autocomplete').append('<li class="autocomplete-note">' + message + '</li>'); } |