mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[core] fix #1706 configurable to limit max number of selectable items
Added an option `maxTargets` of connector main option.
This commit is contained in:
@@ -87,6 +87,12 @@ class elFinderConnector {
|
||||
$_REQUEST = $this->input_filter(array_merge_recursive($src, $_REQUEST));
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($src['targets']) && $this->elFinder->maxTargets && count($src['targets']) > $this->elFinder->maxTargets) {
|
||||
$error = $this->elFinder->error(elFinder::ERROR_MAX_TARGTES);
|
||||
$this->output(array('error' => $this->elFinder->error(elFinder::ERROR_MAX_TARGTES)));
|
||||
}
|
||||
|
||||
$cmd = isset($src['cmd']) ? $src['cmd'] : '';
|
||||
$args = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user