Skip to content
GitLab
Menu
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
c59a17c2
Commit
c59a17c2
authored
Oct 09, 2009
by
Richard Mansfield
Browse files
Fix earlier upgrade to avoid use of view->set_access() (bug #3399)
parent
d89f2fcb
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/db/upgrade.php
View file @
c59a17c2
...
...
@@ -742,10 +742,9 @@ function xmldb_core_upgrade($oldversion=0) {
// allowed to be copied by everyone
require_once
(
'view.php'
);
execute_sql
(
"UPDATE
{
view
}
SET template = 1 WHERE owner = 0 AND type = 'profile'"
);
$view
=
new
View
(
get_field
(
'view'
,
'id'
,
'owner'
,
0
,
'type'
,
'profile'
));
$view
->
set_access
(
array
(
array
(
'type'
=>
'loggedin'
)));
$viewid
=
get_field
(
'view'
,
'id'
,
'owner'
,
0
,
'type'
,
'profile'
);
delete_records
(
'view_access'
,
'view'
,
$viewid
);
insert_record
(
'view_access'
,
(
object
)
array
(
'view'
=>
$viewid
,
'accesstype'
=>
'loggedin'
));
}
if
(
$oldversion
<
2008122300
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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