/**
  * Saves a record based on its data array.
  *
  * @param string $table The table name for the record to save.
  * @param integer $uid The UID for the record to save.
  * @return void
  */
 public function doSave($table, $uid)
 {
     $data = $this->TSFE_EDIT['data'];
     if (!empty($data)) {
         $this->initializeTceMain();
         $this->tce->start($data, array());
         $this->tce->process_uploads($_FILES);
         $this->tce->process_datamap();
         // Save the new UID back into TSFE_EDIT
         $newUID = $this->tce->substNEWwithIDs['NEW'];
         if ($newUID) {
             $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['newUID'] = $newUID;
         }
     }
 }