Code Duplication    Length = 11-11 lines in 2 locations

Sources/Subs-Db-postgresql.php 1 location

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

Sources/Subs-Db-mysql.php 1 location

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