Merge branch '3.5' into 3

This commit is contained in:
Damian Mooyman 2017-02-08 10:15:09 +13:00
commit 971fd5fcbb
3 changed files with 3 additions and 7 deletions

View File

@ -1013,7 +1013,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() . '</li>';
$data[$id] = array(
'html' => $html,

View File

@ -3,4 +3,3 @@
<a href="$Link" title="$Title.ATT"><ins class="jstree-icon">&nbsp;</ins>
<span class="text">$TreeTitle</span>
</a>
</li>

View File

@ -127,7 +127,7 @@ class Hierarchy extends DataExtension {
*
* @return string
*/
public function getChildrenAsUL($attributes = "", $titleEval = '"<li>" . $child->Title . "</li>"', $extraArg = null,
public function getChildrenAsUL($attributes = "", $titleEval = '"<li>" . $child->Title', $extraArg = null,
$limitToMarked = false, $childrenMethod = "AllChildrenIncludingDeleted",
$numChildrenMethod = "numChildren", $rootCall = true,
$nodeCountThreshold = null, $nodeCountCallback = null) {
@ -170,10 +170,6 @@ class Hierarchy extends DataExtension {
} else {
$output .= eval("return $titleEval;");
}
$output = trim($output);
if (substr($output, -5) == '</li>') {
$output = trim(substr($output, 0, -5));
}
$output .= "\n";
$numChildren = $child->$numChildrenMethod();