Code Duplication    Length = 8-8 lines in 2 locations

Sources/DbPackages-mysql.php 1 location

@@ 116-123 (lines=8) @@
113
114
	// Slightly easier on MySQL than the others...
115
	$tables = $smcFunc['db_list_tables']();
116
	if (in_array($full_table_name, $tables))
117
	{
118
		// This is a sad day... drop the table? If not, return false (error) by default.
119
		if ($if_exists == 'overwrite')
120
			$smcFunc['db_drop_table']($table_name);
121
		else
122
			return $if_exists == 'ignore';
123
	}
124
125
	// Righty - let's do the damn thing!
126
	$table_query = 'CREATE TABLE ' . $table_name . "\n" . '(';

Sources/DbPackages-postgresql.php 1 location

@@ 113-120 (lines=8) @@
110
111
	// This... my friends... is a function in a half - let's start by checking if the table exists!
112
	$tables = $smcFunc['db_list_tables']();
113
	if (in_array($full_table_name, $tables))
114
	{
115
		// This is a sad day... drop the table? If not, return false (error) by default.
116
		if ($if_exists == 'overwrite')
117
			$smcFunc['db_drop_table']($table_name);
118
		else
119
			return $if_exists == 'ignore';
120
	}
121
122
	// If we've got this far - good news - no table exists. We can build our own!
123
	$smcFunc['db_transaction']('begin');