@@ -217,11 +217,9 @@ class Func
}
$l = \trim($dsr[0]);
- if (! \preg_match('%^[[:alpha:]]{1,8}(?:-[[:alnum:]]{1,8})?$%', $l)) {
- continue;
+ if (\preg_match('%^[[:alpha:]]{1,8}(?:-[[:alnum:]]{1,8})?$%', $l)) {
+ $result[$l] = $q;
-
- $result[$l] = $q;
\arsort($result, \SORT_NUMERIC);
@@ -350,11 +350,9 @@ class Structure extends ParentModel
foreach ($attrs as $name => $attr) {
$value = $this->getBBAttr($name, ['required', 'format', 'body format', 'text only']);
- if (null === $value) {
+ if (null !== $value) {
+ $result[$name] = $value;
- $result[$name] = $value;
return $result;
@@ -421,12 +421,11 @@ class Groups extends Admin
foreach ($this->groupsNew as $key => $title) {
if (
- $key === $group->g_id
- || $key === $this->c->GROUP_GUEST
+ $key !== $group->g_id
+ && $key !== $this->c->GROUP_GUEST
) {
+ $options[$key] = $title;
- $options[$key] = $title;
$fieldset['g_promote_next_group'] = [