Code Duplication    Length = 14-14 lines in 2 locations

Sources/Subs-Db-postgresql.php 2 locations

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