Changeset 12779 for extensions
- Timestamp:
- Dec 22, 2011, 6:25:44 AM (13 years ago)
- Location:
- extensions/derivatives
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/derivatives/i.php
r12778 r12779 125 125 $pos!== false || ierror('Missing .', 400); 126 126 $ext = substr($req, $pos); 127 $page['derivative_ext'] = $ext; 127 128 $req = substr($req, 0, $pos); 128 129 … … 278 279 header('Connection: close'); 279 280 280 // todo send the right headers 281 header("Content-Type: image/jpeg"); 281 $ctype="application/octet-stream"; 282 switch (strtolower($page['derivative_ext'])) 283 { 284 case "jpe": case "jpeg": 285 case "jpg": $ctype="image/jpeg"; break; 286 case "png": $ctype="image/png"; break; 287 case "gif": $ctype="image/gif"; break; 288 } 289 header("Content-Type: $ctype"); 282 290 283 291 fpassthru($fp); -
extensions/derivatives/include/derivative.inc.php
r12778 r12779 183 183 $rel_url = 'i'; 184 184 if ($conf['php_extension_in_urls']) $rel_url .= '.php'; 185 if ( !$conf['question_mark_in_urls']) $rel_url.= '?';186 $rel_url .= $loc;185 if ($conf['question_mark_in_urls']) $rel_url .= '?'; 186 $rel_url .= '/'.$loc; 187 187 } 188 188 else
Note: See TracChangeset
for help on using the changeset viewer.