* Fixed bug #4643: File Upload did not recognize BE-User option "defaultFileUp...
[Packages/TYPO3.CMS.git] / typo3 / file_upload.php
index c6276b7..45652f6 100755 (executable)
@@ -108,8 +108,11 @@ class SC_file_upload {
                $this->target = t3lib_div::_GP('target');
                $this->returnUrl = t3lib_div::_GP('returnUrl');
 
-               if (empty($this->number) && $GLOBALS['BE_USER']->getTSConfig('options.defaultFileUploads'))     {
-                       $this->number = t3lib_div::intInRange($GLOBALS['BE_USER']->getTSConfig('options.defaultFileUploads'),1,$this->uploadNumber);
+               if (empty($this->number))       {
+                       $defaultFileUploads = $GLOBALS['BE_USER']->getTSConfigVal('options.defaultFileUploads');
+                       if ($defaultFileUploads)        {
+                               $this->number = t3lib_div::intInRange($defaultFileUploads,1,$this->uploadNumber);
+                       }
                }
                        // Init basic-file-functions object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');