From 0fe4ec4537899fa90870647233772551204ff2a5 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 7 Feb 2017 15:33:20 +0000 Subject: [PATCH] Partial revert of c6c6c13fc265aeedf5de7226b3cde39d185ba49d --- admin/code/LeftAndMain.php | 3 ++- admin/templates/Includes/LeftAndMain_TreeNode.ss | 1 - model/Hierarchy.php | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 4e4b03b25..df7882be0 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -1005,7 +1005,8 @@ class LeftAndMain extends Controller implements PermissionProvider { } $link = Controller::join_links($recordController->Link("show"), $record->ID); - $html = LeftAndMain_TreeNode::create($record, $link, $this->isCurrentPage($record))->forTemplate(); + $html = LeftAndMain_TreeNode::create($record, $link, $this->isCurrentPage($record)) + ->forTemplate() . ''; $data[$id] = array( 'html' => $html, diff --git a/admin/templates/Includes/LeftAndMain_TreeNode.ss b/admin/templates/Includes/LeftAndMain_TreeNode.ss index 7e4c8ebf8..c3617f1dd 100644 --- a/admin/templates/Includes/LeftAndMain_TreeNode.ss +++ b/admin/templates/Includes/LeftAndMain_TreeNode.ss @@ -3,4 +3,3 @@   $TreeTitle - diff --git a/model/Hierarchy.php b/model/Hierarchy.php index 13dedd7f4..51f510bcc 100644 --- a/model/Hierarchy.php +++ b/model/Hierarchy.php @@ -101,7 +101,7 @@ class Hierarchy extends DataExtension { * * @return string */ - public function getChildrenAsUL($attributes = "", $titleEval = '"
  • " . $child->Title . "
  • "', $extraArg = null, + public function getChildrenAsUL($attributes = "", $titleEval = '"
  • " . $child->Title', $extraArg = null, $limitToMarked = false, $childrenMethod = "AllChildrenIncludingDeleted", $numChildrenMethod = "numChildren", $rootCall = true, $nodeCountThreshold = null, $nodeCountCallback = null) { @@ -144,10 +144,6 @@ class Hierarchy extends DataExtension { } else { $output .= eval("return $titleEval;"); } - $output = trim($output); - if (substr($output, -5) == '
  • ') { - $output = trim(substr($output, 0, -5)); - } $output .= "\n"; $numChildren = $child->$numChildrenMethod();