Commit 48560325 authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon
Browse files

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



Change-Id: I643a825a3ff878cb8573e96cb2741c0dee0cb29f
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent d56f1ff5
......@@ -1282,13 +1282,33 @@ 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),
'numrows' => $rowcount,
'numrows' => $rowcount,
'owner' => $this->get('usr'),
'ownerformat' => $ownerformat,
);
......
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