Code Duplication    Length = 6-6 lines in 4 locations

manager/frames/nodes.functions.inc.php 4 locations

@@ 344-349 (lines=6) @@
341
                    $ph['node_toggle'] = 1;
342
                    $ph['subMenuState'] = ' open';
343
344
                    if ($ph['donthit'] == 1) {
345
                        $ph['tree_page_click'] = 3;
346
                        $ph['icon_node_toggle'] = '';
347
                        $ph['icon'] = $ph['icon_folder_close'];
348
                        $ph['showChildren'] = 0;
349
                    }
350
351
                    // invoke OnManagerNodePrerender event
352
                    $prenode = $modx->invokeEvent("OnManagerNodePrerender", array(
@@ 369-374 (lines=6) @@
366
                        }
367
                    }
368
369
                    if ($ph['showChildren'] == 0) {
370
                        $ph['icon_node_toggle'] = '';
371
                        $ph['donthit'] = 1;
372
                        $ph['icon'] = $ph['icon_folder_close'];
373
                        $tpl = getTplFolderNodeNotChildren();
374
                    }
375
376
                    if ($ph['contextmenu']) {
377
                        $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"';
@@ 391-396 (lines=6) @@
388
                    $ph['icon_node_toggle'] = $ph['tree_plusnode'];
389
                    $ph['node_toggle'] = 0;
390
391
                    if ($ph['donthit'] == 1) {
392
                        $ph['tree_page_click'] = 3;
393
                        $ph['icon_node_toggle'] = '';
394
                        $ph['icon'] = $ph['icon_folder_close'];
395
                        $ph['showChildren'] = 0;
396
                    }
397
398
                    // invoke OnManagerNodePrerender event
399
                    $prenode = $modx->invokeEvent("OnManagerNodePrerender", array(
@@ 411-416 (lines=6) @@
408
                        $ph = (count($phnew) > 0) ? $phnew : $ph;
409
                    }
410
411
                    if ($ph['showChildren'] == 0) {
412
                        $ph['icon_node_toggle'] = '';
413
                        $ph['donthit'] = 1;
414
                        $ph['icon'] = $ph['icon_folder_close'];
415
                        $tpl = getTplFolderNodeNotChildren();
416
                    }
417
418
                    if ($ph['contextmenu']) {
419
                        $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"';