Code Duplication    Length = 6-6 lines in 4 locations

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

@@ 347-352 (lines=6) @@
344
                    $ph['node_toggle'] = 1;
345
                    $ph['subMenuState'] = ' open';
346
347
                    if ($ph['donthit'] == 1) {
348
                        $ph['tree_page_click'] = 3;
349
                        $ph['icon_node_toggle'] = '';
350
                        $ph['icon'] = $ph['icon_folder_close'];
351
                        $ph['showChildren'] = 0;
352
                    }
353
354
                    // invoke OnManagerNodePrerender event
355
                    $prenode = $modx->invokeEvent("OnManagerNodePrerender", array(
@@ 372-377 (lines=6) @@
369
                        }
370
                    }
371
372
                    if ($ph['showChildren'] == 0) {
373
                        $ph['icon_node_toggle'] = '';
374
                        $ph['donthit'] = 1;
375
                        $ph['icon'] = $ph['icon_folder_close'];
376
                        $tpl = getTplFolderNodeNotChildren();
377
                    }
378
379
                    if ($ph['contextmenu']) {
380
                        $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"';
@@ 394-399 (lines=6) @@
391
                    $ph['icon_node_toggle'] = $ph['tree_plusnode'];
392
                    $ph['node_toggle'] = 0;
393
394
                    if ($ph['donthit'] == 1) {
395
                        $ph['tree_page_click'] = 3;
396
                        $ph['icon_node_toggle'] = '';
397
                        $ph['icon'] = $ph['icon_folder_close'];
398
                        $ph['showChildren'] = 0;
399
                    }
400
401
                    // invoke OnManagerNodePrerender event
402
                    $prenode = $modx->invokeEvent("OnManagerNodePrerender", array(
@@ 415-420 (lines=6) @@
412
                        $ph = (count($phnew) > 0) ? $phnew : $ph;
413
                    }
414
415
                    if ($ph['showChildren'] == 0) {
416
                        $ph['icon_node_toggle'] = '';
417
                        $ph['donthit'] = 1;
418
                        $ph['icon'] = $ph['icon_folder_close'];
419
                        $tpl = getTplFolderNodeNotChildren();
420
                    }
421
422
                    if ($ph['contextmenu']) {
423
                        $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"';