Fix: Merge all retrieved nodes, rather than only retrieving the first one.
This commit is contained in:
parent
35f3caf774
commit
fd8f50f178
1 changed files with 3 additions and 1 deletions
|
|
@ -118,7 +118,9 @@ class replaceEntryUrlExtension extends Minz_Extension {
|
||||||
$nodes = $xpath->query($my_xpath);
|
$nodes = $xpath->query($my_xpath);
|
||||||
$mainContent = "";
|
$mainContent = "";
|
||||||
if ($nodes instanceof DOMNodeList && $nodes->length > 0) {
|
if ($nodes instanceof DOMNodeList && $nodes->length > 0) {
|
||||||
$mainContent = $doc->saveHTML($nodes->item(0));
|
foreach ($nodes as $node) {
|
||||||
|
$mainContent .= $doc->saveHTML($node); // Concatenate all node contents
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif($use_default_if_empty)
|
elseif($use_default_if_empty)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue