public function commit() { if (!Field::commit()) { return false; } $id = $this->get('id'); if ($id === false) { return false; } fieldMemberTimezone::createSettingsTable(); $fields = array('field_id' => $id); if (is_array($this->get('available_zones'))) { $fields['available_zones'] = implode(",", $this->get('available_zones')); } return FieldManager::saveSettings($id, $fields); }
public function commit() { if (!Field::commit()) { return false; } $id = $this->get('id'); if ($id === false) { return false; } fieldMemberTimezone::createSettingsTable(); $fields = array('field_id' => $id); if (is_array($this->get('available_zones'))) { $fields['available_zones'] = implode(",", $this->get('available_zones')); } Symphony::Database()->query("DELETE FROM `tbl_fields_" . $this->handle() . "` WHERE `field_id` = '{$id}' LIMIT 1"); return Symphony::Database()->insert($fields, 'tbl_fields_' . $this->handle()); }