Changeset 2283 for branches/2.0
- Timestamp:
- 03/17/10 14:20:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/expressoMail1_2/inc/gotodownload.php
r2133 r2283 1 <? 1 <?php 2 2 if(!isset($GLOBALS['phpgw_info'])){ 3 3 $GLOBALS['phpgw_info']['flags'] = array( … … 152 152 if ($strFileType == ".ndl") 153 153 $ContentType = "application/vnd.lotus-notes"; 154 if ($strFileType == ".eml") 155 $ContentType = "text/plain"; 154 156 155 157 header ("Content-Type: $ContentType"); … … 169 171 if (preg_match("#^".ini_get('session.save_path')."/(".$GLOBALS['phpgw']->session->sessionid."/)*[A-z]+_".$GLOBALS['phpgw']->session->sessionid."[A-z0-9]*(\.[A-z]{3,4})?$#",$strFileName)) 170 172 { 171 readfile($strFileName); 173 //avoid stuck request 174 session_write_close(); 175 176 //reset time limit for big files 177 set_time_limit(0); 178 179 if ($fp = fopen ($strFileName, 'rb')) 180 { 181 $bufferSize=1024; 182 for ($i=$bufferSize; $i<=filesize($strFileName); $i+=$bufferSize) 183 { 184 echo fread($fp, $i); 185 flush(); 186 ob_end_flush(); 187 } 188 fclose ($fp); 189 } 190 //readfile($strFileName); 172 191 exec("rm -f ".escapeshellcmd(escapeshellarg($strFileName))); 173 192 } 193 else 194 if (preg_match("#^".dirname( __FILE__ ) . '/../tmpLclAtt'."/source_#",$strFileName)) { 195 readfile($strFileName); 196 } 174 197 } 175 198 ?>
Note: See TracChangeset
for help on using the changeset viewer.