[TYPO3-dam-devel] RFC Bugfix: 6630: xclass ux_t3lib_extFileFunctions->func_upload has wrong default parameters

Michiel Roos michiel at netcreators.com
Thu Dec 27 12:57:43 CET 2007


Andreas Balzer wrote:
> adding my +1 ;)
>
> On Dec 26, 2007 10:18 PM, Michiel Roos <michiel at netcreators.com 
> <mailto:michiel at netcreators.com>> wrote:
>
>     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 <http://www.netcreators.com>
>
>     Interesse in werken bij Netcreators?
>     http://www.netcreators.com/bedrijf/vacatures/
>     <http://www.netcreators.com/bedrijf/vacatures/>
>
>
>     _______________________________________________
>     TYPO3-team-dam mailing list
>     TYPO3-team-dam at lists.netfielders.de
>     <mailto:TYPO3-team-dam at lists.netfielders.de>
>     http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
Fixed in svn trunk. Also present in 1.0.11 . . . needs to be fixed there 
too.

-- 
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/20071227/57750fac/attachment.vcf 


More information about the TYPO3-team-dam mailing list