From 066302acc2535a30668e802758697e4118649509 Mon Sep 17 00:00:00 2001 From: Dave Tosh Date: Tue, 18 May 2010 11:40:30 +0000 Subject: access level tweak git-svn-id: http://code.elgg.org@6078 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/forms/add.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/forms/add.php b/views/default/forms/add.php index cb83406ed..765bb9c09 100644 --- a/views/default/forms/add.php +++ b/views/default/forms/add.php @@ -24,7 +24,12 @@ set_page_owner($container_guid); $confirm_action = get_input('video_action'); $guid = get_input('guid'); -$access_id = get_input('access_id'); +if(page_owner_entity() instanceof ElggGroup){ + //if in a group, set the access level to default to the group + $access_id = page_owner_entity()->group_acl; +}else{ + $access_id = get_default_access(get_loggedin_user()); +} $title_videourl = get_input('title_videourl'); $Pagecontainer = get_input('page'); $get_addvideourl = get_input('add_videourl'); -- cgit v1.2.3