Code Duplication    Length = 14-14 lines in 2 locations

Sources/Subs-Db-postgresql.php 2 locations

@@ 593-606 (lines=14) @@
590
 * @param int $counter The row number in the result to fetch (false to fetch the next one)
591
 * @return array The contents of the row that was fetched
592
 */
593
function smf_db_fetch_row($request, $counter = false)
594
{
595
	global $db_row_count;
596
597
	if ($counter !== false)
598
		return pg_fetch_row($request, $counter);
599
600
	// Reset the row counter...
601
	if (!isset($db_row_count[(int) $request]))
602
		$db_row_count[(int) $request] = 0;
603
604
	// Return the right row.
605
	return @pg_fetch_row($request, $db_row_count[(int) $request]++);
606
}
607
608
/**
609
 * Get an associative array
@@ 615-628 (lines=14) @@
612
 * @param int $counter The row to get. If false, returns the next row.
613
 * @return array An associative array of row contents
614
 */
615
function smf_db_fetch_assoc($request, $counter = false)
616
{
617
	global $db_row_count;
618
619
	if ($counter !== false)
620
		return pg_fetch_assoc($request, $counter);
621
622
	// Reset the row counter...
623
	if (!isset($db_row_count[(int) $request]))
624
		$db_row_count[(int) $request] = 0;
625
626
	// Return the right row.
627
	return @pg_fetch_assoc($request, $db_row_count[(int) $request]++);
628
}
629
630
/**
631
 * Reset the pointer...