--- dam/modfunc_file_upload/class.tx_dam_file_upload.php 2010-06-16 11:19:40.000000000 +0200 +++ dam.new/modfunc_file_upload/class.tx_dam_file_upload.php 2010-06-11 15:46:30.000000000 +0200 @@ -97,11 +97,11 @@ */ class tx_dam_file_upload extends t3lib_extobjbase { + public $enableBatchProcessing = true; + + protected $hookObjectsArray = array(); - - var $enableBatchProcessing = true; - - + /** * Configures the module for use in element Browser * @@ -288,10 +288,13 @@ $content = ''; $header = ''; - - - - + $this->hookObjectsArray = array(); + if (is_array ($TYPO3_CONF_VARS['EXTCONF']['dam']['fileUpload'])) { + foreach ($TYPO3_CONF_VARS['EXTCONF']['dam']['fileUpload'] as $classRef) { + $this->hookObjectsArray[] = &t3lib_div::getUserObj($classRef); + } + } + $uidList = $GLOBALS['TYPO3_DB']->cleanIntList(t3lib_div::_POST('batch_items')); if ((t3lib_div::_GP('batch') OR t3lib_div::_GP('process')) AND ($uidList)) { @@ -461,6 +464,7 @@ function uploadForm($path, $uploadFields=5) { global $BACK_PATH, $LANG, $FILEMOUNTS; + $code = array(); // number of max upload fields $maxUploads = 15; @@ -481,9 +485,17 @@ $content .= $select; - + if (is_array($this->hookObjectsArray)) { + foreach($this->hookObjectsArray as $hookObj) { + if (method_exists ($hookObj, 'uploadForm_addCode')) { + $code[] = $hookObj->uploadForm_addCode($this, $code); + } + } + } + + // Make checkbox for "overwrite" - $code .=' + $code[] =' pObj->MOD_SETTINGS['tx_dam_file_upload_overwrite']?' checked="checked"':'').' /> @@ -491,13 +503,14 @@ '; + // Produce the number of upload-fields needed: - $code .= ' + $code[] = '
'.sprintf($LANG->getLL('tx_dam_file_upload.maxSizeHint',1), t3lib_div::formatSize($upload_max_filesize)).'
'; } - $code .= ' + $code[] = '