Feature #16323 » 6039.patch

Administrator Admin, 2008-02-27 01:48

View differences:

t3lib/class.t3lib_tceforms.php (working copy)
2032 2032

  
2033 2033
				if(!$disabled && !(isset($config['disable_controls']) && t3lib_div::inList($config['disable_controls'], 'upload'))) {
2034 2034
						// Adding the upload field:
2035
					if ($this->edit_docModuleUpload)	$item.='<input type="file" name="'.$PA['itemFormElName_file'].'"'.$this->formWidth().' size="60" />';
2035
					if ($this->edit_docModuleUpload && $config['uploadfolder']!="")	$item.='<input type="file" name="'.$PA['itemFormElName_file'].'"'.$this->formWidth().' size="60" />';
2036 2036
				}
2037 2037
			break;
2038 2038
			case 'db':	// If the element is of the internal type "db":
......
3310 3310
					while(list(,$pp)=each($itemArray))	{
3311 3311
						$pParts = explode('|',$pp);
3312 3312
						$uidList[]=$pUid=$pTitle = $pParts[0];
3313
						$opt[]='<option value="'.htmlspecialchars(rawurldecode($pParts[0])).'">'.htmlspecialchars(rawurldecode($pParts[0])).'</option>';
3313
						$opt[]='<option value="'.htmlspecialchars(rawurldecode($pParts[0])).'">'.htmlspecialchars(basename(rawurldecode($pParts[0]))).'</option>';
3314 3314
					}
3315 3315
				break;
3316 3316
				default:
t3lib/class.t3lib_tcemain.php (working copy)
1696 1696
				}
1697 1697
				$valueArray = $dbAnalysis->countItems();
1698 1698
			}
1699
		//return path relative to fileadmin Folder (if uploadfolder is not set)
1700
		} else {
1701
			if (count($valueArray)){
1702
				foreach($valueArray as $key => $theFile){
1703
					$valueArray[$key] = substr($theFile, strpos($theFile, "fileadmin/"));
1704
				}
1705
			}
1699 1706
		}
1700 1707

  
1701 1708
		return $valueArray;
(1-1/15)