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
75205f36
Commit
75205f36
authored
Mar 30, 2016
by
Robert Lyon
Committed by
Gerrit Code Review
Mar 30, 2016
Browse files
Merge "Bug 1558246: Reset default group page shared settings"
parents
ba6db6a4
c4416368
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/blocktype/groupviews/db/upgrade.php
View file @
75205f36
...
...
@@ -50,5 +50,26 @@ function xmldb_blocktype_groupviews_upgrade($oldversion=0) {
}
}
if
(
$oldversion
<
2016032300
)
{
// Get the group view block from the default group home page view.
$sql
=
"SELECT bi.id, bi.configdata
FROM
{
block_instance
}
bi
INNER JOIN
{
view
}
v ON v.id = bi.view
WHERE bi.blocktype = 'groupviews'
AND v.type = 'grouphomepage'
AND v.owner = 0"
;
$defaultgrouppage
=
get_record_sql
(
$sql
,
array
());
if
(
$defaultgrouppage
)
{
log_debug
(
"Processing default 'Group page' block to set the right shared pages/collections configurations"
);
$configdata
=
unserialize
(
$defaultgrouppage
->
configdata
);
$configdata
[
'showsharedviews'
]
=
1
;
$configdata
[
'showsharedcollections'
]
=
1
;
set_field
(
'block_instance'
,
'configdata'
,
serialize
(
$configdata
),
'id'
,
$defaultgrouppage
->
id
);
}
}
return
true
;
}
htdocs/blocktype/groupviews/version.php
View file @
75205f36
...
...
@@ -13,5 +13,5 @@
defined
(
'INTERNAL'
)
||
die
();
$config
=
new
StdClass
;
$config
->
version
=
201
5090
300
;
$config
->
release
=
'1.0.
2
'
;
$config
->
version
=
201
6032
300
;
$config
->
release
=
'1.0.
3
'
;
Write
Preview
Supports
Markdown
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