X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fplimage.php;h=6769f4de9c8455d1422bc3d325256fb2a13d9a2e;hb=e92ecb8c24421ca1dd4f87ad7478d0d8277e1f60;hp=c4b3e05056bd3d342d69d47d50cb1d08c3346864;hpb=2ab75571bf840471fa9559292b75852bfce004d3;p=platal.git diff --git a/classes/plimage.php b/classes/plimage.php index c4b3e05..6769f4d 100644 --- a/classes/plimage.php +++ b/classes/plimage.php @@ -1,6 +1,6 @@ ts)) { + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->ts) . ' GMT'); + } pl_cached_dynamic_content_headers($this->mime); if (empty($this->data)) { readfile($this->file); @@ -68,23 +72,25 @@ class PlImage { return $this->mime; } - public static function fromData($data, $mime, $x = null, $y = null) + public static function fromData($data, $mime, $x = null, $y = null, $ts = null) { $image = new PlImage(); $image->data = $data; $image->mime = $mime; $image->x = $x; $image->y = $y; + $image->ts = $ts; return $image; } - public static function fromFile($path, $mime, $x = null, $y = null) + public static function fromFile($path, $mime, $x = null, $y = null, $ts = null) { $image = new PlImage(); $image->file = $path; $image->mime = $mime; $image->x = $x; $image->y = $y; + $image->ts = $ts; return $image; } }