diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index 51d2fa1035..6ea8381a8b 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -75,6 +75,21 @@ class bo_resources { $readonlys["buyable[$resource[id]]"] = true; } + $readonlys["view_acc[$resource[id]]"] = true; + $links = $this->link->get_links('resources',$resource['id']); + if(count($links) != 0) + { + foreach ($links as $link_num => $link) + { + if($link['app'] == 'resources') + { + if($this->so->get_value('accessory_of',$link['id']) != -1) + { + $readonlys["view_acc[$resource[id]]"] = false; + } + } + } + } $rows[$num]['picture_thumb'] = $this->get_picture($resource['id']); $rows[$num]['admin'] = $this->acl->get_cat_admin($resource['cat_id']); } diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index 0571f601ca..0aca32d0d4 100644 --- a/resources/setup/etemplates.inc.php +++ b/resources/setup/etemplates.inc.php @@ -1,5 +1,5 @@