Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
95d15f89
Commit
95d15f89
authored
Sep 16, 2008
by
Richard Mansfield
Browse files
Check public access on profile views in can_view_view
parent
1f922f96
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
95d15f89
...
...
@@ -1305,16 +1305,15 @@ function can_view_view($view_id, $user_id=null) {
if
(
$publicviews
||
$publicprofiles
)
{
$public
=
get_record_sql
(
"
SELECT
v.id, v.type,
v
a.*
v.id, v.type, a.*
FROM
{
view
}
v
LEFT OUTER JOIN
{
view_access
}
a ON v.id = a.view
WHERE
v.id = ?
AND (a.accesstype = 'public' OR v.type = 'profile')
v.id = ? AND a.accesstype = 'public'
"
,
array
(
$view_id
));
return
$public
&&
(
(
$publicviews
&&
$public
->
accesstype
==
'public'
(
(
$publicviews
&&
(
$public
->
startdate
==
null
||
$public
->
startdate
<
$now
)
&&
(
$public
->
stopdate
==
null
||
$public
->
stopdate
>
$now
)
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment