Skip to content
Snippets Groups Projects
Commit 78947705 authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-105] Merging from testing into staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@615 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 4724fd9c
Branches
Tags
No related merge requests found
......@@ -564,7 +564,12 @@ class Unl_Migration_Tool
}
if (!$maincontentarea) {
$this->_log('The file at ' . $fullPath . ' has no valid maincontentarea. Ignoring.');
$this->_log('The file at ' . $fullPath . ' has no valid maincontentarea. Using entire body.');
$maincontentarea = $this->_get_text_between_tokens($html, '<body>', '</body>');
}
if (!$maincontentarea) {
$this->_log('The file at ' . $fullPath . ' has no valid body. Ignoring.');
return;
}
......@@ -597,6 +602,9 @@ class Unl_Migration_Tool
if (count($titleParts) > 2) {
$pageTitle = trim(array_pop($titleParts));
}
else {
$pageTitle = $titleText;
}
}
if (!$pageTitle) {
......@@ -606,8 +614,13 @@ class Unl_Migration_Tool
$maincontentNode = $dom->getElementById('maincontent');
if (!$maincontentNode) {
$this->_log('The file at ' . $fullPath . ' has no valid maincontentarea. Ignoring.');
return;
$this->_log('The file at ' . $fullPath . ' has no valid maincontentarea. Using entire body.');
$bodyNodes = $dom->getElementsByTagName('body');
if ($bodyNodes->length == 0) {
$this->_log('The file at ' . $fullPath . ' has no valid body. Ignoring.');
return;
}
$maincontentNode = $bodyNodes->item(0);
}
$linkNodes = $maincontentNode->getElementsByTagName('a');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment