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
6fd6f25d
Commit
6fd6f25d
authored
Mar 30, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Mar 30, 2015
Browse files
Merge "Extract description in 'summary' entry when Leap import. Bug 1428266"
parents
5fe3eb52
7ef5f6b0
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/import/leap/lib.php
View file @
6fd6f25d
...
...
@@ -1279,9 +1279,29 @@ class PluginImportLeap extends PluginImport {
}
}
// Extract the view description in the entry 'summary'
// A description may be wrapped in XHTML div
// See more PluginExportLeap::parse_xhtmlish_content()
$description
=
''
;
if
((
string
)
$entry
->
summary
[
'type'
]
===
'xhtml'
||
(
string
)
$entry
->
summary
[
'type'
]
===
'html'
)
{
$summaryelements
=
((
string
)
$entry
->
summary
[
'type'
]
===
'xhtml'
&&
$entry
->
summary
->
div
->
div
)
?
$entry
->
summary
->
div
->
div
:
$entry
->
summary
;
$summarychildren
=
$summaryelements
->
children
();
foreach
(
$summarychildren
as
$c
)
{
$description
.
=
$c
->
asXML
();
}
}
else
{
$description
=
(
string
)
$entry
->
summary
;
}
$config
=
array
(
'title'
=>
(
string
)
$entry
->
title
,
'description'
=>
(
string
)
$entry
->
summary
,
'description'
=>
$description
,
'type'
=>
$type
,
'layout'
=>
$layout
->
id
,
'tags'
=>
self
::
get_entry_tags
(
$entry
),
...
...
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