protected function parseFields()
 {
     if ($this->settings['autoCreate'] && $GLOBALS['TSFE']->beUserLogin) {
         $this->createTable();
     }
     $dbFields = $this->db->admin_get_fields($this->table);
     foreach ($dbFields as $field => $properties) {
         if ($field != $this->key && !isset($this->settings['fields.'][$field])) {
             $this->settings['fields.'][$field . '.'] = array('mapping' => $field);
         }
     }
     $fields = parent::parseFields();
     $escapedFields = array();
     foreach ($fields as $field => $value) {
         $escapedFields['`' . $field . '`'] = $value;
     }
     return $escapedFields;
 }
 protected function parseFields()
 {
     $doAutoCreate = intval($this->utilityFuncs->getSingle($this->settings, 'newFieldsSqlAttribs'));
     if ($doAutoCreate === 1 && $GLOBALS['TSFE']->beUserLogin) {
         $this->createTable();
     }
     $dbFields = $this->db->admin_get_fields($this->table);
     foreach ($dbFields as $field => $properties) {
         if ($field != $this->key && !isset($this->settings['fields.'][$field])) {
             $this->settings['fields.'][$field . '.'] = array('mapping' => $field);
         }
     }
     $fields = parent::parseFields();
     $escapedFields = array();
     foreach ($fields as $field => $value) {
         $escapedFields['`' . $field . '`'] = $value;
     }
     return $escapedFields;
 }
 /**
  * Inits the finisher mapping settings values to internal attributes.
  *
  * @see Tx_Formhandler_Finisher_DB::init
  * @return void
  */
 public function init($gp, $settings)
 {
     //if adodb is installed
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('adodb')) {
         require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('adodb') . 'adodb/adodb.inc.php';
         $this->driver = $this->utilityFuncs->getSingle($settings, 'driver');
         $this->db = $this->utilityFuncs->getSingle($settings, 'db');
         $this->host = $this->utilityFuncs->getSingle($settings, 'host');
         $this->port = $this->utilityFuncs->getSingle($settings, 'port');
         $this->user = $this->utilityFuncs->getSingle($settings, 'username');
         $this->password = $this->utilityFuncs->getSingle($settings, 'password');
         if (!$this->driver) {
             throw new Exception('No driver given!');
         }
     } else {
         $this->utilityFuncs->throwException('extension_required', 'adodb', 'Tx_Formhandler_Finisher_DifferentDB');
     }
     parent::init($gp, $settings);
 }