uploads patch, bug 1337

Roger Keays <[email protected]> Fri, 03 Oct 2003 18:23:25 +1000
Newsgroups gmane.comp.cms.xaraya.patches
Organization Xaraya News Server
Message-ID <[email protected]>
Patch for bug 1337  http://bugs.xaraya.com/show_bug.cgi?id=1337

$$ html/modules/uploads$ bk diffs


===== xaruserapi.php 1.16 vs edited =====
95,106c95,100
<             // Ignore allowed types with only one extension
<             if ($allowed_ext_cnt < 2) {
<                 continue;
<             } else {
<                 // Try to match arrays
<                 $start = $file_ext_cnt - $allowed_ext_cnt;
<                 for ($idx = 0, $sdx = $start; $idx < $allowed_ext_cnt; 
$idx++, $sdx++) {
<                     if($allowed_ext[$idx] != $file_extension[$sdx]) {
<                         $allowfile = False;
<                         break;
<                     }
<                     $allowfile = True;
---
 >             // Try to match arrays
 >             $start = $file_ext_cnt - $allowed_ext_cnt;
 >             for ($idx = 0, $sdx = $start; $idx < $allowed_ext_cnt; 
$idx++, $sdx++) {
 >                 if($allowed_ext[$idx] != $file_extension[$sdx]) {
 >                     $allowfile = False;
 >                     break;
107a102,107
 >                 $allowfile = True;
 >             }
 >
 >           // stop checking when we find a match
 >           if ($allowfile == True) {
 >               break;


-- 
-------------------------------------------------------------
ninth ave (dot net)                        p: +61 7 3870 8494
       _       _       _                    m: +61 405 048 371
    __(@)<  __(@)>  __(@),          w: http://www.ninthave.net
    \___)   \___)   \___)              e: [email protected]
-------------------------------------------------------------