1
0

Modify access to actually use the admin setting.

This commit is contained in:
rWatcher 2010-11-07 13:43:09 +08:00 committed by Bharat Mediratta
parent 9f981b56c3
commit 26a2d9c0f9
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ class access extends access_Core {
// Begin rWatcher modifications.
// This section adds an additional condition onto the view permission that throws a 404
// error if the album has a password assigned.
} elseif ($perm_name == "view") {
} elseif (($perm_name == "view") && (module::get_var("albumpassword", "hideonly") == false)) {
$album_item = "";
do {
if ($album_item == "") {
@ -43,7 +43,7 @@ class access extends access_Core {
} else {
$album_item = $album_item->parent();
}
$existing_password = ORM::factory("items_albumpassword")->where("album_id", "=", $album_item->id)->find();
if ($existing_password->loaded()) {
if ((cookie::get("g3_albumpassword") != $existing_password->password) &&

View File

@ -31,7 +31,7 @@ class access extends access_Core {
// Begin rWatcher modifications.
// This section adds an additional condition onto the view permission that throws a 404
// error if the album has a password assigned.
} elseif ($perm_name == "view") {
} elseif (($perm_name == "view") && (module::get_var("albumpassword", "hideonly") == false)) {
$album_item = "";
do {
if ($album_item == "") {
@ -43,7 +43,7 @@ class access extends access_Core {
} else {
$album_item = $album_item->parent();
}
$existing_password = ORM::factory("items_albumpassword")->where("album_id", "=", $album_item->id)->find();
if ($existing_password->loaded()) {
if ((cookie::get("g3_albumpassword") != $existing_password->password) &&