Changeset 42e328a in github


Ignore:
Timestamp:
Sep 19, 2008 3:42:11 PM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
cc80c55
Parents:
29111be
Message:

Indent with spaces not tabs. Please respect our code-style when creating patches!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r20a2519 r42e328a  
    12031203        // TODO: fetch only Content-Type/Content-Disposition header 
    12041204        $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 
    1205         $filename_mime = ''; 
    1206         $i = 0; 
    1207         while (preg_match('/filename\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
    1208           $filename_mime .= $matches[1]; 
    1209           $i++; 
    1210           } 
    1211         }        
    1212       } 
     1205        $filename_mime = ''; 
     1206        $i = 0; 
     1207        while (preg_match('/filename\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
     1208          $filename_mime .= $matches[1]; 
     1209          $i++; 
     1210        } 
     1211      } 
     1212    } 
    12131213    else if (!empty($part->d_parameters['filename*0*'])) { 
    12141214      $i = 0; 
    12151215      while (isset($part->d_parameters['filename*'.$i.'*'])) { 
    12161216        $i++; 
    1217         $filename_encoded .= $part->d_parameters['filename*'.$i.'*']; 
    1218         } 
     1217        $filename_encoded .= $part->d_parameters['filename*'.$i.'*']; 
     1218      } 
    12191219      if ($i<2) { 
    12201220        $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 
    1221         $filename_encoded = ''; 
    1222         $i = 0; $matches = array(); 
    1223         while (preg_match('/filename\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
    1224           $filename_encoded .= $matches[1]; 
    1225           $i++; 
    1226           } 
    1227         }        
    1228       } 
     1221        $filename_encoded = ''; 
     1222        $i = 0; $matches = array(); 
     1223        while (preg_match('/filename\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
     1224          $filename_encoded .= $matches[1]; 
     1225          $i++; 
     1226        } 
     1227      } 
     1228    } 
    12291229    else if (!empty($part->ctype_parameters['name*0'])) { 
    12301230      $i = 0; 
     
    12321232        $i++; 
    12331233        $filename_mime .= $part->ctype_parameters['name*'.$i]; 
    1234         } 
     1234      } 
    12351235      if ($i<2) { 
    12361236        $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 
    1237         $filename_mime = ''; 
    1238         $i = 0; $matches = array(); 
    1239         while (preg_match('/\s+name\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
    1240           $filename_mime .= $matches[1]; 
    1241           $i++; 
    1242           } 
    1243         }        
    1244       } 
     1237        $filename_mime = ''; 
     1238        $i = 0; $matches = array(); 
     1239        while (preg_match('/\s+name\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
     1240          $filename_mime .= $matches[1]; 
     1241          $i++; 
     1242        } 
     1243      } 
     1244    } 
    12451245    else if (!empty($part->ctype_parameters['name*0*'])) { 
    12461246      $i = 0; 
     
    12481248        $i++; 
    12491249        $filename_encoded .= $part->ctype_parameters['name*'.$i.'*']; 
    1250         } 
     1250      } 
    12511251      if ($i<2) { 
    12521252        $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 
    1253         $filename_encoded = ''; 
    1254         $i = 0; $matches = array(); 
    1255         while (preg_match('/\s+name\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
    1256           $filename_encoded .= $matches[1]; 
    1257           $i++; 
    1258           } 
    1259         }        
    1260       } 
     1253        $filename_encoded = ''; 
     1254        $i = 0; $matches = array(); 
     1255        while (preg_match('/\s+name\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 
     1256          $filename_encoded .= $matches[1]; 
     1257          $i++; 
     1258        } 
     1259      } 
     1260    } 
    12611261    // Content-Disposition 
    12621262    else if (!empty($part->headers['content-description'])) 
     
    12681268    if (!empty($filename_mime)) { 
    12691269      $part->filename = rcube_imap::decode_mime_string($filename_mime,  
    1270             $part->charset ? $part->charset : rc_detect_encoding($filename_mime, $this->default_charset)); 
     1270        $part->charset ? $part->charset : rc_detect_encoding($filename_mime, $this->default_charset)); 
    12711271      }  
    12721272    else if (!empty($filename_encoded)) { 
     
    13431343        { 
    13441344        fwrite($fp, $body); 
    1345         return true; 
     1345        return true; 
    13461346        } 
    13471347      } 
Note: See TracChangeset for help on using the changeset viewer.