Images.php
authorChris <chris@roojs.com>
Fri, 12 Oct 2012 11:56:20 +0000 (19:56 +0800)
committerChris <chris@roojs.com>
Fri, 12 Oct 2012 11:56:20 +0000 (19:56 +0800)
Images.php

index 0778244..6c6d70b 100644 (file)
@@ -79,10 +79,10 @@ class Pman_Core_Images extends Pman
             
         } else if (!empty($bits[0]) && $bits[0] == 'events') {
             $popts = PEAR::getStaticProperty('Pman','options');
-            $file = "{$popts['event_log_dir']}/{$bits[1]}";
+            $file = "{$popts['event_log_dir']}/{$bits[1]}.jpg";
             header ('Content-Type: image/jpeg');
             if(!empty($bits[2]) && $bits[2] == 'download'){
-                header("Content-Disposition: attachment; filename=\"".basename($file)."\";" );
+                header("Content-Disposition: attachment; filename=\"".basename($file).".jpg\";" );
                 ob_clean();
                 flush();
                 readfile($file);