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