Code Duplication    Length = 14-14 lines in 2 locations

Sources/Subs-Db-postgresql.php 2 locations

@@ 619-632 (lines=14) @@
616
 * @param bool|int $counter The row number in the result to fetch (false to fetch the next one)
617
 * @return array The contents of the row that was fetched
618
 */
619
function smf_db_fetch_row($request, $counter = false)
620
{
621
	global $db_row_count;
622
623
	if ($counter !== false)
624
		return pg_fetch_row($request, $counter);
625
626
	// Reset the row counter...
627
	if (!isset($db_row_count[(int) $request]))
628
		$db_row_count[(int) $request] = 0;
629
630
	// Return the right row.
631
	return @pg_fetch_row($request, $db_row_count[(int) $request]++);
632
}
633
634
/**
635
 * Get an associative array
@@ 641-654 (lines=14) @@
638
 * @param int|bool $counter The row to get. If false, returns the next row.
639
 * @return array An associative array of row contents
640
 */
641
function smf_db_fetch_assoc($request, $counter = false)
642
{
643
	global $db_row_count;
644
645
	if ($counter !== false)
646
		return pg_fetch_assoc($request, $counter);
647
648
	// Reset the row counter...
649
	if (!isset($db_row_count[(int) $request]))
650
		$db_row_count[(int) $request] = 0;
651
652
	// Return the right row.
653
	return @pg_fetch_assoc($request, $db_row_count[(int) $request]++);
654
}
655
656
/**
657
 * Reset the pointer...