openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 088d572257221efd6b0d3e0888e1f8bf1ef4d135
parent ddb17950ba3d141fde7b1dac3513bc15ad6c0817
Author: dankert <devnull@localhost>
Date:   Tue,  6 Oct 2009 23:57:39 +0200

Korrektur: Setzen \"Last-modified\"-Datum.

Diffstat:
actionClasses/FileAction.class.php | 9+++++----
actionClasses/FolderAction.class.php | 2+-
actionClasses/IndexAction.class.php | 1-
actionClasses/PageAction.class.php | 8+++++---
4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/actionClasses/FileAction.class.php b/actionClasses/FileAction.class.php @@ -46,8 +46,6 @@ class FileAction extends ObjectAction { $this->file = Session::getObject(); } - - $this->lastModified( $this->file->lastchangeDate ); } @@ -106,10 +104,13 @@ class FileAction extends ObjectAction */ function show() { + $this->lastModified( $this->file->lastchangeDate ); + // Angabe Content-Type header('Content-Type: '.$this->file->mimeType() ); - header('X-File-Id: '.$this->file->fileid ); - + header('X-File-Id: ' .$this->file->fileid ); + header('X-Id: ' .$this->file->id ); + // Angabe Content-Disposition // - Bild soll "inline" gezeigt werden // - Dateiname wird benutzt, wenn der Browser das Bild speichern moechte diff --git a/actionClasses/FolderAction.class.php b/actionClasses/FolderAction.class.php @@ -205,7 +205,7 @@ class FolderAction extends ObjectAction } // Datum letzte Aenderung an Browser uebertragen - $this->lastModified( $this->folder->lastchangeDate ); + //$this->lastModified( $this->folder->lastchangeDate ); } diff --git a/actionClasses/IndexAction.class.php b/actionClasses/IndexAction.class.php @@ -1003,7 +1003,6 @@ class IndexAction extends Action global $PHP_AUTH_PW; $user = Session::getUser(); - // Gast-Login if ( ! is_object($user) ) { diff --git a/actionClasses/PageAction.class.php b/actionClasses/PageAction.class.php @@ -46,9 +46,11 @@ class PageAction extends ObjectAction $this->page = Session::getObject(); } - // Auskommentiert, da Conditional-Get bei - // Seiten u.U. nicht sinnvoll ist - //$this->lastModified( $this->page->lastchangeDate ); + // Hier kann leider nicht das Datum der letzten Änderung verwendet werden, + // da sich die Seite auch danach ändern kann, z.B. durch Includes anderer + // Seiten oder Änderung einer Vorlage oder Änderung des Dateinamens einer + // verlinkten Datei. + $this->lastModified( time() ); }