Code Duplication    Length = 13-14 lines in 2 locations

engine/lib/deprecated-1.8.php 1 location

@@ 809-822 (lines=14) @@
806
807
	// Add access controls
808
	$query .= _elgg_get_access_where_sql();
809
	if (!$count) {
810
		$query .= " order by $order_by";
811
812
		// Add order and limit
813
		if ($limit) {
814
			$query .= " limit $offset, $limit";
815
		}
816
817
		$dt = get_data($query, "entity_row_to_elggstar");
818
		return $dt;
819
	} else {
820
		$total = get_data_row($query);
821
		return $total->total;
822
	}
823
}
824
825
/**

engine/lib/deprecated-1.9.php 1 location

@@ 1518-1530 (lines=13) @@
1515
1516
	$query .= _elgg_get_access_where_sql();
1517
1518
	if (!$count) {
1519
		$query .= " order by n.calendar_start $order_by";
1520
		// Add order and limit
1521
		if ($limit) {
1522
			$query .= " limit $offset, $limit";
1523
		}
1524
		$dt = get_data($query, "entity_row_to_elggstar");
1525
1526
		return $dt;
1527
	} else {
1528
		$total = get_data_row($query);
1529
		return $total->total;
1530
	}
1531
}
1532
1533
/**