Code Duplication    Length = 11-11 lines in 2 locations

Sources/Subs-Db-postgresql.php 1 location

@@ 381-391 (lines=11) @@
378
	if (empty($modSettings['disableQueryCheck']) && strpos($db_string, '\'') !== false && empty($db_values['security_override']))
379
		smf_db_error_backtrace('Hacking attempt...', 'Illegal character (\') used in query...', true, __FILE__, __LINE__);
380
381
	if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false))
382
	{
383
		// Pass some values to the global space for use in the callback function.
384
		$db_callback = array($db_values, $connection);
385
386
		// Inject the values passed to this function.
387
		$db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string);
388
389
		// This shouldn't be residing in global space any longer.
390
		$db_callback = array();
391
	}
392
393
	// First, we clean strings out of the query, reduce whitespace, lowercase, and trim - so we can check it over.
394
	if (empty($modSettings['disableQueryCheck']))

Sources/Subs-Db-mysql.php 1 location

@@ 390-400 (lines=11) @@
387
			$db_string .= "\n\t\t\tORDER BY null";
388
	}
389
390
	if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false))
391
	{
392
		// Pass some values to the global space for use in the callback function.
393
		$db_callback = array($db_values, $connection);
394
395
		// Inject the values passed to this function.
396
		$db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string);
397
398
		// This shouldn't be residing in global space any longer.
399
		$db_callback = array();
400
	}
401
402
	// First, we clean strings out of the query, reduce whitespace, lowercase, and trim - so we can check it over.
403
	if (empty($modSettings['disableQueryCheck']))