Changeset 747 for trunk/lib/App.inc.php
- Timestamp:
- Aug 27, 2021 2:27:14 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r746 r747 1494 1494 * -false <-- To not carry any queries. If URL already has queries those will be retained. 1495 1495 * @param bool $always_include_sid Force session id to be added to Location header. 1496 */ 1497 public function dieURL($url, $carry_args=null, $always_include_sid=false) 1496 * @param int $http_response_code The HTTP response code to include with the Location header. Use 303 when the redirect should be GET, or 1497 * use 307 when the redirect should use the same method as the original request. 1498 */ 1499 public function dieURL($url, $carry_args=null, $always_include_sid=false, $http_response_code=303) 1498 1500 { 1499 1501 if (!$this->running) { … … 1509 1511 $url = $this->url($url, $carry_args, $always_include_sid); 1510 1512 1511 // Should we send a "303 See Other" header here instead of relying on the 302 sent automatically by PHP?1512 1513 if (!headers_sent($h_file, $h_line)) { 1513 header(sprintf('Location: %s', $url) );1514 header(sprintf('Location: %s', $url), true, $http_response_code); 1514 1515 $this->logMsg(sprintf('dieURL: %s', $url), LOG_DEBUG, __FILE__, __LINE__); 1515 1516 } else {
Note: See TracChangeset
for help on using the changeset viewer.