Code Duplication    Length = 7-8 lines in 2 locations

engine/lib/deprecated-1.7.php 1 location

@@ 331-337 (lines=7) @@
328
		}
329
	}
330
331
	if ($subtype) {
332
		if (is_array($subtype)) {
333
			$options['subtypes'] = $subtype;
334
		} else {
335
			$options['subtype'] = $subtype;
336
		}
337
	}
338
339
	if ($owner_guid) {
340
		if (is_array($owner_guid)) {

mod/elgg_solr/lib/functions.php 1 location

@@ 90-97 (lines=8) @@
87
			$options['wheres'][1] = "e.time_created <= {$time['endtime']}";
88
		}
89
90
		if ($subtypes) {
91
			if (!is_array($subtypes)) {
92
				$options['subtypes'] = array($subtypes);
93
			}
94
			else {
95
				$options['subtypes'] = $subtypes;
96
			}
97
		}
98
99
		// this iteration fixes a bug https://github.com/Elgg/Elgg/issues/7561
100
		// uses a custom getter which only fetches the guids in a single large-batch query