| @@ 110-127 (lines=18) @@ | ||
| 107 | $this->appendStatusFooter($wrapper); |
|
| 108 | } |
|
| 109 | ||
| 110 | public function commit() |
|
| 111 | { |
|
| 112 | if (!parent::commit()) { |
|
| 113 | return false; |
|
| 114 | } |
|
| 115 | ||
| 116 | $id = $this->get('id'); |
|
| 117 | ||
| 118 | if ($id === false) { |
|
| 119 | return false; |
|
| 120 | } |
|
| 121 | ||
| 122 | $fields = array('validator'=>null); |
|
| 123 | ||
| 124 | $fields['validator'] = ($fields['validator'] == 'custom' ? null : $this->get('validator')); |
|
| 125 | ||
| 126 | return FieldManager::saveSettings($id, $fields); |
|
| 127 | } |
|
| 128 | ||
| 129 | /*------------------------------------------------------------------------- |
|
| 130 | Publish: |
|
| @@ 219-237 (lines=19) @@ | ||
| 216 | parent::checkFields($errors, $checkForDuplicates); |
|
| 217 | } |
|
| 218 | ||
| 219 | public function commit() |
|
| 220 | { |
|
| 221 | if (!parent::commit()) { |
|
| 222 | return false; |
|
| 223 | } |
|
| 224 | ||
| 225 | $id = $this->get('id'); |
|
| 226 | ||
| 227 | if ($id === false) { |
|
| 228 | return false; |
|
| 229 | } |
|
| 230 | ||
| 231 | $fields = array(); |
|
| 232 | ||
| 233 | $fields['destination'] = $this->get('destination'); |
|
| 234 | $fields['validator'] = ($fields['validator'] == 'custom' ? null : $this->get('validator')); |
|
| 235 | ||
| 236 | return FieldManager::saveSettings($id, $fields); |
|
| 237 | } |
|
| 238 | ||
| 239 | /*------------------------------------------------------------------------- |
|
| 240 | Publish: |
|