ResponseMarkReadTrait
Page of the "mark as read" button in the new-response e-mail. It is opened by a guest, so `requireLoggedUser()` is intentionally absent (the page has `logged = 0` in the DB).
The response is marked as read on opening (GET), without a confirmation button. A client that CrawlerDetector recognizes as a robot (link previews, crawlers) writes nothing.
IMPORTANT: the page shows no response or advert data, only a message. The Front does not
verify the key: id and key from the URL go unchanged to the Api, which alone decides
(ResponseMarkReadTrait). An invalid key, a missing
key and a nonexistent or deleted response give the same message and HTTP 200.
NOTE: mail clients and security scanners sometimes open e-mail links themselves (without a
robot User-Agent), so a response can be marked as read without a human. This is the accepted
consequence of "GET without confirmation"; the only damage is a switched read flag.
Table of Contents
Methods
- actionMarkRead() : void
- renderMarkRead() : void
- resolveMarkReadState() : "read"|"invalid"|"crawler"
Methods
actionMarkRead()
public
actionMarkRead(string|int|null $slug[, string $id = '' ][, string $key = '' ]) : void
Parameters
- $slug : string|int|null
- $id : string = ''
- $key : string = ''
renderMarkRead()
public
renderMarkRead(string|int|null $slug[, string $id = '' ][, string $key = '' ]) : void
Parameters
- $slug : string|int|null
- $id : string = ''
- $key : string = ''
resolveMarkReadState()
private
resolveMarkReadState(string $id, string $key) : "read"|"invalid"|"crawler"
Parameters
- $id : string
- $key : string