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
eb8fcedf
Commit
eb8fcedf
authored
Oct 20, 2016
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 20, 2016
Browse files
Merge "Bug 1629105: Update the option 'Multiple journals' in session"
parents
47f038fb
ff3db865
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/import/leap/lib.php
View file @
eb8fcedf
...
...
@@ -428,6 +428,7 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
* Deletes the default blog that is created for all users
*/
public
static
function
cleanup
(
PluginImportLeap
$importer
)
{
global
$USER
;
if
(
self
::
$importedablog
&&
self
::
$firstblogid
)
{
$blog
=
artefact_instance_from_id
(
self
::
$firstblogid
);
if
(
!
$blog
->
has_children
())
{
// TODO see #544160
...
...
@@ -437,6 +438,9 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
$userid
=
$importer
->
get
(
'usr'
);
if
(
count_records
(
'artefact'
,
'artefacttype'
,
'blog'
,
'owner'
,
$userid
)
!=
1
)
{
set_account_preference
(
$userid
,
'multipleblogs'
,
1
);
if
(
$userid
==
$USER
->
get
(
'id'
))
{
$USER
->
set_account_preference
(
'multipleblogs'
,
1
);
}
}
}
...
...
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