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

Make the unl migration tool support sites that use TemplateBeginEditable...

Make the unl migration tool support sites that use TemplateBeginEditable instead of InstanceBeginEditable.

git-svn-id: file:///tmp/wdn_thm_drupal/trunk@280 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 6a0cb981
No related branches found
No related tags found
No related merge requests found
......@@ -748,10 +748,24 @@ class Unl_Migration_Tool
$content_start + strlen($start_token),
$content_end - $content_start - strlen($start_token));
$content = trim($content);
if (!$content || $content_start === FALSE || $content_end === FALSE) {
return FALSE;
if ($content && $content_start !== FALSE && $content_end !== FALSE) {
return $content;
}
return $content;
$start_token = '<!-- TemplateBeginEditable name="' . $name . '" -->';
$end_token = '<!-- TemplateEndEditable -->';
$content_start = strpos($html, $start_token);
$content_end = strpos($html, $end_token, $content_start);
$content = substr($html,
$content_start + strlen($start_token),
$content_end - $content_start - strlen($start_token));
$content = trim($content);
if ($content && $content_start !== FALSE && $content_end !== FALSE) {
return $content;
}
return FALSE;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment