42 function __construct ()
46 $this->sizeLimit = $config->get_cfg_value(
'LDAPSIZELIMIT', 200);
47 $this->ignore = preg_match(
'/true/i', $config->get_cfg_value(
'LDAPSIZEIGNORE',
'TRUE'));
50 function getSizeLimit ()
55 function setSizeLimit ($limit)
57 $this->sizeLimit = $limit;
60 function setLimitExceeded ($exceeded = TRUE)
62 $this->limitExceeded = $exceeded;
70 if (isset($_POST[
'set_size_action']) && isset($_POST[
'action'])) {
71 switch ($_POST[
'action']) {
73 if (isset($_POST[
'new_limit']) &&
tests::is_id($_POST[
'new_limit'])) {
74 if (($error = static::checkMaxInputVars($_POST[
'new_limit'])) !== FALSE) {
77 $this->sizeLimit = intval($_POST[
'new_limit']);
78 $this->ignore = FALSE;
95 if (isset($_POST[
'edit_sizelimit'])) {
96 $this->ignore = FALSE;
116 if ($this->limitExceeded) {
118 $smarty->assign(
'sizelimit', $this->sizeLimit);
133 if ($this->limitExceeded) {
134 $config =
'<input type="submit" name="edit_sizelimit" value="'.htmlescape(_(
'Configure')).
'" formnovalidate="formnovalidate"/>';
135 return '('.htmlescape(_(
'incomplete')).
') '.$config;
147 $maxInputVars = ini_get(
'max_input_vars');
149 if (($maxInputVars !=
'') && (($newLimit + 10) >= intval($maxInputVars))) {
152 $messageTemplate ?? _(
'Limit %d is greater than or too close to configured max_input_vars PHP ini setting of %d. Please change max_input_vars ini setting to a higher value if you wish to set the limit higher.'),
htmlescape(string $str)
Escape string for HTML output.
update()
Handle sizelimit dialog related posts.
get_template_path($filename='', $plugin=FALSE, $path='')
Return themed path for specified base file.
Class ldapSizeLimit This class contains all informations and functions to handle the LDAP size limit ...
& get_smarty()
Get global smarty object.
static checkMaxInputVars(int $newLimit, string $messageTemplate=NULL)
renderWarning()
Print a sizelimit warning.
$sizeLimit
Current size limit.
$limitExceeded
Limit was exceeded.
Parent class for all errors in FusionDirectory.
check()
Show sizelimit configuration dialog.
static is_id($id)
Check if the given argument is an id.