| @@ 384-394 (lines=11) @@ | ||
| 381 | if (empty($modSettings['disableQueryCheck']) && strpos($db_string, '\'') !== false && empty($db_values['security_override'])) |
|
| 382 | smf_db_error_backtrace('Hacking attempt...', 'Illegal character (\') used in query...', true, __FILE__, __LINE__); |
|
| 383 | ||
| 384 | if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false)) |
|
| 385 | { |
|
| 386 | // Pass some values to the global space for use in the callback function. |
|
| 387 | $db_callback = array($db_values, $connection); |
|
| 388 | ||
| 389 | // Inject the values passed to this function. |
|
| 390 | $db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string); |
|
| 391 | ||
| 392 | // This shouldn't be residing in global space any longer. |
|
| 393 | $db_callback = array(); |
|
| 394 | } |
|
| 395 | ||
| 396 | // Debugging. |
|
| 397 | if (isset($db_show_debug) && $db_show_debug === true) |
|
| @@ 417-427 (lines=11) @@ | ||
| 414 | $db_string .= "\n\t\t\tORDER BY null"; |
|
| 415 | } |
|
| 416 | ||
| 417 | if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false)) |
|
| 418 | { |
|
| 419 | // Pass some values to the global space for use in the callback function. |
|
| 420 | $db_callback = array($db_values, $connection); |
|
| 421 | ||
| 422 | // Inject the values passed to this function. |
|
| 423 | $db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string); |
|
| 424 | ||
| 425 | // This shouldn't be residing in global space any longer. |
|
| 426 | $db_callback = array(); |
|
| 427 | } |
|
| 428 | ||
| 429 | // Debugging. |
|
| 430 | if (isset($db_show_debug) && $db_show_debug === true) |
|