Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
c59a17c2
Commit
c59a17c2
authored
Oct 09, 2009
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix earlier upgrade to avoid use of view->set_access() (bug #3399)
parent
d89f2fcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
htdocs/lib/db/upgrade.php
htdocs/lib/db/upgrade.php
+3
-4
No files found.
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