Code Duplication    Length = 11-11 lines in 2 locations

Sources/Subs-Db-mysql.php 1 location

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

Sources/Subs-Db-postgresql.php 1 location

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