Code Duplication    Length = 4-4 lines in 5 locations

engine/lib/river.php 1 location

@@ 526-529 (lines=4) @@
523
524
	$options = array_merge($defaults, $options);
525
526
	if (!$options["limit"] && !$options["offset"]) {
527
		// no need for pagination if listing is unlimited
528
		$options["pagination"] = false;
529
	}
530
531
	$options['count'] = true;
532
	$count = elgg_get_river($options);

engine/lib/views.php 2 locations

@@ 1024-1027 (lines=4) @@
1021
		);
1022
	}
1023
1024
	if (!$vars["limit"] && !$vars["offset"]) {
1025
		// no need for pagination if listing is unlimited
1026
		$vars["pagination"] = false;
1027
	}
1028
1029
	if ($vars['list_type'] != 'list') {
1030
		return elgg_view('page/components/gallery', $vars);
@@ 1066-1069 (lines=4) @@
1063
	
1064
	$vars = array_merge($defaults, $vars);
1065
	
1066
	if (!$vars["limit"] && !$vars["offset"]) {
1067
		// no need for pagination if listing is unlimited
1068
		$vars["pagination"] = false;
1069
	}
1070
1071
	return elgg_view('page/components/list', $vars);
1072
}

mod/wet4/lib/custom_core.php 2 locations

@@ 26-29 (lines=4) @@
23
24
	$options = array_merge($defaults, $options);
25
26
	if (!$options["limit"] && !$options["offset"]) {
27
		// no need for pagination if listing is unlimited
28
		$options["pagination"] = false;
29
	}
30
31
	// get the river items
32
	$options['count'] = false;
@@ 211-214 (lines=4) @@
208
209
	$options = array_merge($defaults, $options);
210
211
	if (!$options["limit"] && !$options["offset"]) {
212
		// no need for pagination if listing is unlimited
213
		$options["pagination"] = false;
214
	}
215
216
	if ( $options["pagination"] || $options['count'] ){
217
		$options['count'] = true;