| @@ 99-116 (lines=18) @@ | ||
| 96 | Settings: |
|
| 97 | -------------------------------------------------------------------------*/ |
|
| 98 | ||
| 99 | public function commit() |
|
| 100 | { |
|
| 101 | if (!parent::commit()) { |
|
| 102 | return false; |
|
| 103 | } |
|
| 104 | ||
| 105 | $id = $this->get('id'); |
|
| 106 | ||
| 107 | if ($id === false) { |
|
| 108 | return false; |
|
| 109 | } |
|
| 110 | ||
| 111 | $fields = array('validator' => null); |
|
| 112 | ||
| 113 | $fields['validator'] = ($fields['validator'] === 'custom' ? null : $this->get('validator')); |
|
| 114 | ||
| 115 | return FieldManager::saveSettings($id, $fields); |
|
| 116 | } |
|
| 117 | ||
| 118 | public function displayPublishPanel( |
|
| 119 | XMLElement &$wrapper, |
|
| @@ 205-223 (lines=19) @@ | ||
| 202 | parent::checkFields($errors, $checkForDuplicates); |
|
| 203 | } |
|
| 204 | ||
| 205 | public function commit() |
|
| 206 | { |
|
| 207 | if (!parent::commit()) { |
|
| 208 | return false; |
|
| 209 | } |
|
| 210 | ||
| 211 | $id = $this->get('id'); |
|
| 212 | ||
| 213 | if ($id === false) { |
|
| 214 | return false; |
|
| 215 | } |
|
| 216 | ||
| 217 | $fields = array(); |
|
| 218 | ||
| 219 | $fields['destination'] = $this->get('destination'); |
|
| 220 | $fields['validator'] = ($fields['validator'] === 'custom' ? null : $this->get('validator')); |
|
| 221 | ||
| 222 | return FieldManager::saveSettings($id, $fields); |
|
| 223 | } |
|
| 224 | ||
| 225 | public function displayPublishPanel( |
|
| 226 | XMLElement &$wrapper, |
|