[TYPO3-dam-devel] RFC Bugfix: 6630: xclass ux_t3lib_extFileFunctions->func_upload has wrong default parameters
Michiel Roos
michiel at netcreators.com
Wed Dec 26 22:18:57 CET 2007
Andreas Balzer wrote:
> +1
> although I don't know whether this patch might get in conflict with an
> other feature of dam. Is it possible to find these things out?
>
Ok, first the function read:
function func_upload($cmds, $id) {
if (!$this->isInit) return FALSE;
if (!$_FILES['upload_'.$id]['name']) {
return;
}
With the proposed patch it reads:
function func_upload($cmds, $id=false) {
if ($id===false) $id=$cmds['data'];
if (!$this->isInit) return FALSE;
if (!$_FILES['upload_'.$id]['name']) {
return;
}
Furthermore the comment reads:
* @param array $cmds['data'] is the ID-number (points to the global
var that holds the filename-ref
($GLOBALS['HTTP_POST_FILES']['upload_'.$id]['name']). $cmds['target'] is
the target directory
* @param string $id: $_FILES['upload_'.$id]
So the $cmds['data'] does hold the needed id to lookup the name in:
$GLOBALS['HTTP_POST_FILES']['upload_'.$id]['name']
or shorter: $_FILES['upload_'.$id]['name']
I wonder why the parameter was added in the first place, maybe to
override an id if neede. This still works. If no id is given it behaves
as it should. So extensions like rs_userimp behave as expected.
I don't think I am overlooking something. Anyone?
So still a +1 from me.
Kind regards,
Michiel Roos
--
Netcreators BV :: creation and innovation
www.netcreators.com
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: michiel.vcf
Type: text/x-vcard
Size: 292 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20071226/d3f4dc7a/attachment.vcf
More information about the TYPO3-team-dam
mailing list