From f3521c8ba414277c6fc6750943a835433913cfe0 Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Tue, 9 Aug 2022 12:58:47 +0700 Subject: [PATCH] Combine classes from one category into single line ... kinda --- Web/Presenters/AuthPresenter.php | 10 ++-------- Web/Presenters/BlobPresenter.php | 20 +++++++++---------- Web/Presenters/NotesPresenter.php | 3 +-- Web/Presenters/PhotosPresenter.php | 9 ++------- Web/Presenters/SearchPresenter.php | 6 ++---- Web/Presenters/SupportPresenter.php | 6 ++---- .../UnknownTextRouteStrategyPresenter.php | 3 +-- Web/Presenters/UserPresenter.php | 14 +++---------- Web/Presenters/VideosPresenter.php | 3 +-- 9 files changed, 24 insertions(+), 50 deletions(-) diff --git a/Web/Presenters/AuthPresenter.php b/Web/Presenters/AuthPresenter.php index 599efe8f..ac5a30c2 100644 --- a/Web/Presenters/AuthPresenter.php +++ b/Web/Presenters/AuthPresenter.php @@ -1,14 +1,8 @@ notFound(); if(isset($_SERVER["HTTP_IF_NONE_MATCH"])) - exit(header("HTTP/1.1 304 Not Modified")); - - header("Content-Type: " . mime_content_type($path)); - header("Content-Size: " . filesize($path)); - header("Cache-Control: public, max-age=1210000"); - header("X-Accel-Expires: 1210000"); - header("ETag: W/\"" . hash_file("snefru", $path) . "\""); - - readfile($path); - exit; + exit(header("HTTP/1.1 304 Not Modified")); + + header("Content-Type: " . mime_content_type($path)); + header("Content-Size: " . filesize($path)); + header("Cache-Control: public, max-age=1210000"); + header("X-Accel-Expires: 1210000"); + header("ETag: W/\"" . hash_file("snefru", $path) . "\""); + + readfile($path); + exit; } } diff --git a/Web/Presenters/NotesPresenter.php b/Web/Presenters/NotesPresenter.php index d88c6365..2eb75f91 100644 --- a/Web/Presenters/NotesPresenter.php +++ b/Web/Presenters/NotesPresenter.php @@ -1,7 +1,6 @@