Feature #16323 » 6039_v2.patch

Administrator Admin, 2008-02-27 22:46

View differences:

class.t3lib_refindex.php (working copy)
564 564
					$realFile = $dest.'/'.trim($file);
565 565
#					if (@is_file($realFile))	{		// Now, the refernece index should NOT look if files exist - just faithfully include them if they are in the records!
566 566
						$newValueFiles[] = array(
567
							'filename' => $file,
567
							'filename' => basename($file),
568 568
							'ID' => md5($realFile),
569 569
							'ID_absFile' => $realFile
570 570
						);	// the order should be preserved here because.. (?)
......
974 974
	 * @return	string		Input folder prefixed with PATH_site. No checking for existence is done. Output must be a folder without trailing slash.
975 975
	 */
976 976
	function destPathFromUploadFolder($folder)	{
977
		if (!$folder)
978
			return substr(PATH_site, 0, -1);
979
		
977 980
		return PATH_site.$folder;
978 981
	}
979 982

  
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:
class.t3lib_tcemain.php (working copy)
1696 1696
				}
1697 1697
				$valueArray = $dbAnalysis->countItems();
1698 1698
			}
1699
		//store path relative to site root (if uploadfolder is not set)
1700
		} else {
1701
			if (count($valueArray)){
1702
				foreach($valueArray as $key => $theFile){
1703
					if (t3lib_div::isFirstPartOfStr($theFile,PATH_site))	{
1704
						$valueArray[$key] = substr($theFile,strlen(PATH_site));
1705
					}
1706
				}
1707
			}
1699 1708
		}
1700 1709

  
1701 1710
		return $valueArray;
(2-2/15)