Skip to content

Commit

Permalink
Merge pull request #10391 from mrclay/10378_member
Browse files Browse the repository at this point in the history
chore(http): add known forward status codes to redirect
  • Loading branch information
mrclay committed Oct 10, 2016
2 parents 273db1d + 0452bff commit 32611e0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions engine/classes/Elgg/Http/ResponseFactory.php
Expand Up @@ -407,15 +407,14 @@ public function redirect($forward_url = REFERRER, $status_code = ELGG_HTTP_FOUND
$forward_url = elgg_normalize_url($forward_url);

switch ($status_code) {
case 'walled_garden':
case 'admin' :
case 'login' :
$status_code = ELGG_HTTP_SEE_OTHER;
break;
case 'system' :
case 'csrf' :
case 'system':
case 'csrf':
$status_code = ELGG_HTTP_OK;
break;
case 'admin':
case 'login':
case 'member':
case 'walled_garden':
default :
$status_code = (int) $status_code;
if (!$status_code || $status_code < 100 || $status_code > 599) {
Expand Down

0 comments on commit 32611e0

Please sign in to comment.