Commit 6a3070cb authored by Penny Leach's avatar Penny Leach
Browse files

changed can_view_view to include community owners (regardless of tutoronly

flag or not)
parent 07c38718
......@@ -1203,12 +1203,12 @@ function can_view_view($view_id, $user_id=null) {
INNER JOIN ' . $prefix . 'community c ON a.community = c.id
INNER JOIN ' . $prefix . 'community_member m ON c.id=m.community
WHERE
a.view=? AND m.member=?
a.view = ?
AND ( a.startdate < ? OR a.startdate IS NULL )
AND ( a.stopdate > ? OR a.stopdate IS NULL )
AND ( a.tutoronly = 0 OR m.tutor = 1 )
AND ( ( m.member = ? AND (a.tutoronly = 0 OR m.tutor = 1 ) ) OR c.owner = ?)
LIMIT 1',
array( $view_id, $user_id, $dbnow, $dbnow )
array( $view_id, $dbnow, $dbnow, $user_id, $user_id )
)
) {
//log_debug('Yes - View is available to a specific community');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment