This commit is contained in:
Roman Kelesidis 2024-09-05 11:01:55 +07:00
commit 5d3bbc3a7a
3 changed files with 5 additions and 5 deletions

View file

@ -865,7 +865,7 @@ function get_list($mode, $id, $select)
if ($row[$idfield] == $id) { if ($row[$idfield] == $id) {
$s = ' selected'; $s = ' selected';
} }
$catlist .= '<option value="' . $row[$idfield] . '"' . $s . '>&nbsp;' . htmlCHR(str_short($row[$namefield], 60)) . '</option>\n'; $catlist .= '<option value="' . $row[$idfield] . '"' . $s . '>&nbsp;' . str_short(htmlCHR($row[$namefield]), 60) . '</option>\n';
} }
return $catlist; return $catlist;
@ -1102,7 +1102,7 @@ function sf_get_list($mode, $exclude = 0, $select = 0)
$selected = ($fid == $select) ? HTML_SELECTED : ''; $selected = ($fid == $select) ? HTML_SELECTED : '';
$disabled = ($fid == $exclude && !$forum_parent) ? HTML_DISABLED : ''; $disabled = ($fid == $exclude && !$forum_parent) ? HTML_DISABLED : '';
$style = $disabled ? ' style="color: gray" ' : (($fid == $exclude) ? ' style="color: darkred" ' : ''); $style = $disabled ? ' style="color: gray" ' : (($fid == $exclude) ? ' style="color: darkred" ' : '');
$opt .= '<option value="' . $fid . '" ' . $selected . $disabled . $style . '>' . ($f['forum_parent'] ? HTML_SF_SPACER : '') . htmlCHR(str_short($f['forum_name'], 60)) . "&nbsp;</option>\n"; $opt .= '<option value="' . $fid . '" ' . $selected . $disabled . $style . '>' . ($f['forum_parent'] ? HTML_SF_SPACER : '') . str_short(htmlCHR($f['forum_name']), 60) . "&nbsp;</option>\n";
} }
$opt .= '</optgroup>'; $opt .= '</optgroup>';

View file

@ -103,7 +103,7 @@ if (!$group_id) {
$options = ''; $options = '';
foreach ($params as $name => $data) { foreach ($params as $name => $data) {
$text = htmlCHR(str_short(rtrim($name), HTML_SELECT_MAX_LENGTH)); $text = str_short(rtrim(htmlCHR($name)), HTML_SELECT_MAX_LENGTH);
$members = ($data['m']) ? $lang['MEMBERS_IN_GROUP'] . ': ' . $data['m'] : $lang['NO_GROUP_MEMBERS']; $members = ($data['m']) ? $lang['MEMBERS_IN_GROUP'] . ': ' . $data['m'] : $lang['NO_GROUP_MEMBERS'];
$candidates = ($data['c']) ? $lang['PENDING_MEMBERS'] . ': ' . $data['c'] : $lang['NO_PENDING_GROUP_MEMBERS']; $candidates = ($data['c']) ? $lang['PENDING_MEMBERS'] . ': ' . $data['c'] : $lang['NO_PENDING_GROUP_MEMBERS'];

View file

@ -70,7 +70,7 @@ class Html
if (\is_array($opt_val)) { if (\is_array($opt_val)) {
$this->cur_attr =& $this->cur_attr[$opt_name]; $this->cur_attr =& $this->cur_attr[$opt_name];
$label = htmlCHR(str_short($opt_name, $this->max_length)); $label = str_short(htmlCHR($opt_name), $this->max_length);
$this->options .= "\t<optgroup label=\"&nbsp;" . $label . "\">\n"; $this->options .= "\t<optgroup label=\"&nbsp;" . $label . "\">\n";
$this->_build_select_rec($opt_val); $this->_build_select_rec($opt_val);
@ -78,7 +78,7 @@ class Html
$this->cur_attr =& $this->attr; $this->cur_attr =& $this->attr;
} else { } else {
$text = htmlCHR(str_short($opt_name, $this->max_length)); $text = str_short(htmlCHR($opt_name), $this->max_length);
$value = ' value="' . htmlCHR($opt_val) . '"'; $value = ' value="' . htmlCHR($opt_val) . '"';
$class = isset($this->cur_attr[$opt_name]['class']) ? ' class="' . $this->cur_attr[$opt_name]['class'] . '"' : ''; $class = isset($this->cur_attr[$opt_name]['class']) ? ' class="' . $this->cur_attr[$opt_name]['class'] . '"' : '';