Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

switched from using header() to http_response_code()

  • Loading branch information...
commit de504c9ad6fd58b2e58353d43c34ee011a556d1c 1 parent ad64f3e
@mryand mryand authored natepixel committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 reason_4.0/lib/core/classes/assets/asset_access.php
View
7 reason_4.0/lib/core/classes/assets/asset_access.php
@@ -100,7 +100,7 @@ function run()
}
elseif ($this->asset->get_value('state') == 'Deleted')
{
- //header('HTTP/1.0 404 Not Found');
+ http_response_code(404);
if(defined('ERROR_404_PATH') && file_exists(WEB_PATH.ERROR_404_PATH) && is_readable(WEB_PATH.ERROR_404_PATH))
{
include(WEB_PATH.ERROR_404_PATH);
@@ -120,7 +120,7 @@ function run()
}
else
{
- header('HTTP/1.0 403 Forbidden');
+ http_response_code(403);
if(defined('ERROR_403_PATH') && file_exists(WEB_PATH.ERROR_403_PATH) && is_readable(WEB_PATH.ERROR_403_PATH))
{
include(WEB_PATH.ERROR_403_PATH);
@@ -158,6 +158,7 @@ function access_allowed()
return true;
}
+
$group = current($groups);
$gh = new group_helper();
$gh->set_group_by_entity($group);
@@ -166,6 +167,8 @@ function access_allowed()
? true // if so return true
: $gh->is_username_member_of_group( $this->get_username()); // else discover and check username
+
+
if($access === NULL) // unknown due to non-logged-in-user
{
reason_require_authentication('login_to_access_file');
Please sign in to comment.
Something went wrong with that request. Please try again.