[TYPO3-project-formidable] UPLOAD or FILE renderlet

Manuel Rego Casasnovas mrego at igalia.com
Tue Oct 30 10:07:53 CET 2007


Manuel Rego Casasnovas escribió:

Sorry I forgot the default param:
>         function deleteFile($sFile, $bUpdateInDb = 0) {
>                 $aValues = t3lib_div::trimExplode(",", $this->_getValue());
>                 unset($aValues[array_search($sFile, $aValues)]);
>                 @unlink($this->getFullServerPath($sFile));
>                 $this->setValue(implode(",", $aValues));
>
>                 if ($bUpdateInDb) {
>                         $tablename =
> $this->oForm->_navConf("/control/datahandler/tablename");
>                         $keyname =
> $this->oForm->_navConf("/control/datahandler/keyname");
>                         $entryid =
> $this->oForm->oDataHandler->_currentEntryId();
>                         $fieldname = $this->_getName();
>                         $value = $this->_getValue();
>                        
> @$GLOBALS['TYPO3_DB']->exec_UPDATEquery($tablename, $keyname . '="' .
> $entryid . '"', array($fieldname => $value));
>                 }
>         }

Best regards,
   Rego

-- 
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com


More information about the TYPO3-project-formidable mailing list