@@ -11,7 +11,8 @@ discard block |
||
| 11 | 11 | * @param string $hereid |
| 12 | 12 | * @return string |
| 13 | 13 | */ |
| 14 | -function makeHTML($indent, $parent, $expandAll, $theme, $hereid = '') { |
|
| 14 | +function makeHTML($indent, $parent, $expandAll, $theme, $hereid = '') |
|
| 15 | +{ |
|
| 15 | 16 | global $modx; |
| 16 | 17 | global $icons, $iconsPrivate, $_style; |
| 17 | 18 | global $_lang, $opened, $opened2, $closed2; //added global vars |
@@ -455,7 +456,8 @@ discard block |
||
| 455 | 456 | * @param array $_style |
| 456 | 457 | * @return array |
| 457 | 458 | */ |
| 458 | -function getIconInfo($_style) { |
|
| 459 | +function getIconInfo($_style) |
|
| 460 | +{ |
|
| 459 | 461 | if(!isset($_style['tree_page_gif'])) { |
| 460 | 462 | $_style['tree_page_gif'] = $_style['tree_page']; |
| 461 | 463 | } |
@@ -486,7 +488,8 @@ discard block |
||
| 486 | 488 | * @param array $_style |
| 487 | 489 | * @return array |
| 488 | 490 | */ |
| 489 | -function getPrivateIconInfo($_style) { |
|
| 491 | +function getPrivateIconInfo($_style) |
|
| 492 | +{ |
|
| 490 | 493 | if(!isset($_style['tree_page_gif_secure'])) { |
| 491 | 494 | $_style['tree_page_gif_secure'] = $_style['tree_page_secure']; |
| 492 | 495 | } |
@@ -518,7 +521,8 @@ discard block |
||
| 518 | 521 | * @param array $row |
| 519 | 522 | * @return string |
| 520 | 523 | */ |
| 521 | -function getNodeTitle($nodeNameSource, $row) { |
|
| 524 | +function getNodeTitle($nodeNameSource, $row) |
|
| 525 | +{ |
|
| 522 | 526 | global $modx; |
| 523 | 527 | |
| 524 | 528 | switch($nodeNameSource) { |
@@ -568,7 +572,8 @@ discard block |
||
| 568 | 572 | * @param string $nodeNameSource |
| 569 | 573 | * @return bool |
| 570 | 574 | */ |
| 571 | -function isDateNode($nodeNameSource) { |
|
| 575 | +function isDateNode($nodeNameSource) |
|
| 576 | +{ |
|
| 572 | 577 | switch($nodeNameSource) { |
| 573 | 578 | case 'createdon': |
| 574 | 579 | case 'editedon': |
@@ -586,7 +591,8 @@ discard block |
||
| 586 | 591 | * @param int $isfolder |
| 587 | 592 | * @return int |
| 588 | 593 | */ |
| 589 | -function checkIsFolder($parent = 0, $isfolder = 1) { |
|
| 594 | +function checkIsFolder($parent = 0, $isfolder = 1) |
|
| 595 | +{ |
|
| 590 | 596 | global $modx; |
| 591 | 597 | |
| 592 | 598 | return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM ' . $modx->getFullTableName('site_content') . ' WHERE parent=' . $parent . ' AND isfolder=' . $isfolder . ' ')); |
@@ -596,7 +602,8 @@ discard block |
||
| 596 | 602 | * @param mixed $array |
| 597 | 603 | * @return string |
| 598 | 604 | */ |
| 599 | -function _htmlentities($array) { |
|
| 605 | +function _htmlentities($array) |
|
| 606 | +{ |
|
| 600 | 607 | global $modx; |
| 601 | 608 | |
| 602 | 609 | $array = json_encode($array, JSON_UNESCAPED_UNICODE); |
@@ -608,7 +615,8 @@ discard block |
||
| 608 | 615 | /** |
| 609 | 616 | * @return string |
| 610 | 617 | */ |
| 611 | -function getTplSingleNode() { |
|
| 618 | +function getTplSingleNode() |
|
| 619 | +{ |
|
| 612 | 620 | return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
| 613 | 621 | onclick="modx.tree.treeAction(event,[+id+]);" |
| 614 | 622 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
@@ -635,7 +643,8 @@ discard block |
||
| 635 | 643 | /** |
| 636 | 644 | * @return string |
| 637 | 645 | */ |
| 638 | -function getTplFolderNode() { |
|
| 646 | +function getTplFolderNode() |
|
| 647 | +{ |
|
| 639 | 648 | return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
| 640 | 649 | onclick="modx.tree.treeAction(event,[+id+]);" |
| 641 | 650 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
@@ -674,7 +683,8 @@ discard block |
||
| 674 | 683 | /** |
| 675 | 684 | * @return string |
| 676 | 685 | */ |
| 677 | -function getTplFolderNodeNotChildren() { |
|
| 686 | +function getTplFolderNodeNotChildren() |
|
| 687 | +{ |
|
| 678 | 688 | return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
| 679 | 689 | onclick="modx.tree.treeAction(event,[+id+]);" |
| 680 | 690 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
@@ -710,7 +720,8 @@ discard block |
||
| 710 | 720 | * @param int|string|array $str |
| 711 | 721 | * @param bool $flag |
| 712 | 722 | */ |
| 713 | -function dbug($str, $flag = false) { |
|
| 723 | +function dbug($str, $flag = false) |
|
| 724 | +{ |
|
| 714 | 725 | print('<pre>'); |
| 715 | 726 | print_r($str); |
| 716 | 727 | print('</pre>'); |