@@ -44,7 +44,8 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $this->attrs['allowFreeEntries'] = true; |
| 46 | 46 | |
| 47 | - if($xml) { |
|
| 47 | + if($xml) |
|
| 48 | + { |
|
| 48 | 49 | parent::__construct($xml); |
| 49 | 50 | } |
| 50 | 51 | } |
@@ -80,7 +81,8 @@ discard block |
||
| 80 | 81 | $results[] = array('id' => $id, 'label' => $name); |
| 81 | 82 | } |
| 82 | 83 | |
| 83 | - usort($results, function ($a, $b) use ($query) { |
|
| 84 | + usort($results, function ($a, $b) use ($query) |
|
| 85 | + { |
|
| 84 | 86 | similar_text($query, $a["label"], $percent_a); |
| 85 | 87 | similar_text($query, $b["label"], $percent_b); |
| 86 | 88 | return $percent_a === $percent_b ? 0 : ($percent_a > $percent_b ? -1 : 1); |
@@ -149,8 +151,7 @@ discard block |
||
| 149 | 151 | !($this->attrs['domainOptional'] && preg_match (Taglist::EMAIL_PREG_NO_DOMAIN, $val)) && |
| 150 | 152 | // Allow merge placeholders. Might be a better way to do this though. |
| 151 | 153 | !preg_match('/{{.+}}|\$\$.+\$\$/',$val) |
| 152 | - ) |
|
| 153 | - { |
|
| 154 | + ) { |
|
| 154 | 155 | self::set_validation_error($form_name,lang("'%1' has an invalid format",$val),''); |
| 155 | 156 | } |
| 156 | 157 | } |
@@ -165,7 +166,10 @@ discard block |
||
| 165 | 166 | $valid =& self::get_array($validated, $form_name, true); |
| 166 | 167 | // returning null instead of array(), as array() will be overwritten by etemplate_new::complete_array_merge() |
| 167 | 168 | // with preserved old content and therefore user can not empty a taglist |
| 168 | - if (true) $valid = $value ? $value : null; |
|
| 169 | + if (true) |
|
| 170 | + { |
|
| 171 | + $valid = $value ? $value : null; |
|
| 172 | + } |
|
| 169 | 173 | //error_log(__METHOD__."() $form_name: ".array2string($value_in).' --> '.array2string($value).', allowed='.array2string($allowed)); |
| 170 | 174 | } |
| 171 | 175 | } |