Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
@@ -38,10 +38,8 @@ class HTML_QuickForm_Rule_CompareDate extends HTML_QuickForm_Rule
if (!is_array($values[0]) && !is_array($values[1])) {
return api_strtotime($values[0]) < api_strtotime($values[1]);
} else {
$compareFn = create_function(
'$a, $b', 'return mktime($a[\'H\'],$a[\'i\'],0,$a[\'M\'],$a[\'d\'],$a[\'Y\']) <= mktime($b[\'H\'],$b[\'i\'],0,$b[\'M\'],$b[\'d\'],$b[\'Y\'] );'
);
return $compareFn($values[0], $values[1]);
return mktime($values[0]['H'], $values[0]['i'], 0, $values[0]['M'], $values[0]['d'], $values[0]['Y'])
<= mktime($values[1]['H'], $values[1]['i'], 0, $values[1]['M'], $values[1]['d'], $values[1]['Y']);
}
}
}
@@ -14,7 +14,6 @@ class Html_Quickform_Rule_Date extends HTML_QuickForm_Rule
*/
function validate($date, $options)
{
$compareDate = create_function('$a', 'return checkdate($a[\'M\'],$a[\'d\'],$a[\'Y\']);');
return $compareDate($date);
return checkdate($date['M'], $date['d'], $date['Y']);
}
}
@@ -773,14 +773,6 @@ class HTML_QuickForm_advmultiselect extends HTML_QuickForm_select
$leftAll = "<br /><br /><button $attrStrAdd /> <em class='fa fa-backward'></em></button>";
}
$strHtmlAdd = "<div class='d-flex justify-content-center align-items-center' style='height: 100%; padding-top: 100px;'>
<button $attrStrAdd><em class='fa fa-arrow-right'></em></button>
</div>";
$strHtmlRemove = "<div class='d-flex justify-content-center align-items-center' style='padding-top: 10px;'>
<button $attrStrRemove><em class='fa fa-arrow-left'></em></button>
</div>";
// build the select all button with all its attributes
$strHtmlAll = '';
+2 -2
View File
@@ -348,14 +348,14 @@ class HTML_QuickForm_date extends HTML_QuickForm_group
$this->_options['maxYear'],
$this->_options['minYear'] > $this->_options['maxYear']? -1: 1
);
array_walk($options, create_function('&$v,$k','$v = substr($v,-2);'));
array_walk($options, function(&$v, $k) { $v = substr($v, -2); });
break;
case 'h':
$options = $this->_createOptionList(1, 12);
break;
case 'g':
$options = $this->_createOptionList(1, 12);
array_walk($options, create_function('&$v,$k', '$v = intval($v);'));
array_walk($options, function(&$v, $k) { $v = intval($v); });
break;
case 'H':
$options = $this->_createOptionList(0, 23);
+10 -3
View File
@@ -419,8 +419,11 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
if (!empty($strValues) && in_array($option['attr']['value'], $strValues, true)) {
$option['attr']['selected'] = 'selected';
}
$strHtml .= $tabs . "<option" . $this->_getAttrString($option['attr']) . '>' .
$option['text'] . "</option>";
$strHtml .= $tabs.Display::tag(
'option',
Security::remove_XSS($option['text']),
$option['attr']
);
}
foreach ($this->_optgroups as $optgroup) {
$strHtml .= $tabs . '<optgroup label="' . $optgroup['label'] . '">';
@@ -432,7 +435,11 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
$option['selected'] = 'selected';
}
$strHtml .= $tabs . " <option" . $this->_getAttrString($option) . '>' .$text . "</option>";
$strHtml .= $tabs.Display::tag(
'option',
Security::remove_XSS($text),
$option
);
}
$strHtml .= "</optgroup>";
}
@@ -188,7 +188,7 @@ class Text_CAPTCHA_Driver_Equation extends Text_CAPTCHA_Driver_Base
{
$equation = sprintf($operator, $one, $two);
$function = create_function('', 'return ' . $equation . ';');
$result = eval('return ' . $equation . ';');
if ($this->_numbersToText) {
$numberWords = new Numbers_Words();
@@ -198,7 +198,7 @@ class Text_CAPTCHA_Driver_Equation extends Text_CAPTCHA_Driver_Base
$numberWords->toWords($two, $this->_locale)
);
}
return array($equation, $function());
return array($equation, $result);
}
/**
@@ -332,7 +332,7 @@ class Text_Diff_Engine_native {
$i = 0;
$j = 0;
assert('count($lines) == count($changed)');
assert(count($lines) == count($changed));
$len = count($lines);
$other_len = count($other_changed);
@@ -353,7 +353,7 @@ class Text_Diff_Engine_native {
}
while ($i < $len && ! $changed[$i]) {
assert('$j < $other_len && ! $other_changed[$j]');
assert($j < $other_len && !$other_changed[$j]);
$i++; $j++;
while ($j < $other_len && $other_changed[$j]) {
$j++;
@@ -385,11 +385,11 @@ class Text_Diff_Engine_native {
while ($start > 0 && $changed[$start - 1]) {
$start--;
}
assert('$j > 0');
assert($j > 0);
while ($other_changed[--$j]) {
continue;
}
assert('$j >= 0 && !$other_changed[$j]');
assert($j >= 0 && !$other_changed[$j]);
}
/* Set CORRESPONDING to the end of the changed run, at the
@@ -410,7 +410,7 @@ class Text_Diff_Engine_native {
$i++;
}
assert('$j < $other_len && ! $other_changed[$j]');
assert($j < $other_len && !$other_changed[$j]);
$j++;
if ($j < $other_len && $other_changed[$j]) {
$corresponding = $i;
@@ -426,11 +426,11 @@ class Text_Diff_Engine_native {
while ($corresponding < $i) {
$changed[--$start] = 1;
$changed[--$i] = 0;
assert('$j > 0');
assert($j > 0);
while ($other_changed[--$j]) {
continue;
}
assert('$j >= 0 && !$other_changed[$j]');
assert($j >= 0 && !$other_changed[$j]);
}
}
}
+1 -1
View File
@@ -85,7 +85,7 @@ class Text_Diff_Engine_shell {
if ($from_line_no < $match[1] || $to_line_no < $match[4]) {
// copied lines
assert('$match[1] - $from_line_no == $match[4] - $to_line_no');
assert($match[1] - $from_line_no == $match[4] - $to_line_no);
array_push($edits,
new Text_Diff_Op_copy(
$this->_getLines($from_lines, $from_line_no, $match[1] - 1),