Code Duplication    Length = 6-6 lines in 4 locations

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

@@ 354-359 (lines=6) @@
351
					$ph['node_toggle'] = 1;
352
					$ph['subMenuState'] = ' open';
353
354
					if($ph['donthit'] == 1) {
355
						$ph['tree_page_click'] = 3;
356
						$ph['icon_node_toggle'] = '';
357
						$ph['icon'] = $ph['icon_folder_close'];
358
						$ph['showChildren'] = 0;
359
					}
360
361
					// invoke OnManagerNodePrerender event
362
					$prenode = $modx->invokeEvent("OnManagerNodePrerender", array(
@@ 379-384 (lines=6) @@
376
						}
377
					}
378
379
					if($ph['showChildren'] == 0) {
380
						$ph['icon_node_toggle'] = '';
381
						$ph['donthit'] = 1;
382
						$ph['icon'] = $ph['icon_folder_close'];
383
						$tpl = getTplFolderNodeNotChildren();
384
					}
385
386
					if($ph['contextmenu']) {
387
						$ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"';
@@ 401-406 (lines=6) @@
398
					$ph['icon_node_toggle'] = $ph['tree_plusnode'];
399
					$ph['node_toggle'] = 0;
400
401
					if($ph['donthit'] == 1) {
402
						$ph['tree_page_click'] = 3;
403
						$ph['icon_node_toggle'] = '';
404
						$ph['icon'] = $ph['icon_folder_close'];
405
						$ph['showChildren'] = 0;
406
					}
407
408
					// invoke OnManagerNodePrerender event
409
					$prenode = $modx->invokeEvent("OnManagerNodePrerender", array(
@@ 421-426 (lines=6) @@
418
						$ph = (count($phnew) > 0) ? $phnew : $ph;
419
					}
420
421
					if($ph['showChildren'] == 0) {
422
						$ph['icon_node_toggle'] = '';
423
						$ph['donthit'] = 1;
424
						$ph['icon'] = $ph['icon_folder_close'];
425
						$tpl = getTplFolderNodeNotChildren();
426
					}
427
428
					if($ph['contextmenu']) {
429
						$ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"';