Commit 6fd6f25d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Extract description in 'summary' entry when Leap import. Bug 1428266"

parents 5fe3eb52 7ef5f6b0
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment