F19034 HTTP redirection from QFQ
- Extended the functionality of _link column to generate HTTP redirections.
- Modified `Link::getRenderingMode()` to return a pair of numbers
[$mode, $submode]
instead of a string:- more than 10 rendering modes will be available in future,
- the long switch statement in
Link::renderLink()
is simplified withif ... elseif ... else switch($mode) ...
where the if-else part takes care of special cases and the switch statement has less cases.
HTTP redirection syntax
`SELECT 'p:/path-to-resource|r:9|h:<code-or-aliast>' AS _link`
where h:
is an optional parameter with the default value 303
; the supported status codes are explained in the ticket.
Test page: http://webwork20:46339/redirect