| @@ 368-378 (lines=11) @@ | ||
| 365 | if (empty($modSettings['disableQueryCheck']) && strpos($db_string, '\'') !== false && empty($db_values['security_override'])) |
|
| 366 | smf_db_error_backtrace('Hacking attempt...', 'Illegal character (\') used in query...', true, __FILE__, __LINE__); |
|
| 367 | ||
| 368 | if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false)) |
|
| 369 | { |
|
| 370 | // Pass some values to the global space for use in the callback function. |
|
| 371 | $db_callback = array($db_values, $connection); |
|
| 372 | ||
| 373 | // Inject the values passed to this function. |
|
| 374 | $db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string); |
|
| 375 | ||
| 376 | // This shouldn't be residing in global space any longer. |
|
| 377 | $db_callback = array(); |
|
| 378 | } |
|
| 379 | ||
| 380 | // Debugging. |
|
| 381 | if (isset($db_show_debug) && $db_show_debug === true) |
|
| @@ 410-420 (lines=11) @@ | ||
| 407 | $db_string .= "\n\t\t\tORDER BY null"; |
|
| 408 | } |
|
| 409 | ||
| 410 | if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false)) |
|
| 411 | { |
|
| 412 | // Pass some values to the global space for use in the callback function. |
|
| 413 | $db_callback = array($db_values, $connection); |
|
| 414 | ||
| 415 | // Inject the values passed to this function. |
|
| 416 | $db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string); |
|
| 417 | ||
| 418 | // This shouldn't be residing in global space any longer. |
|
| 419 | $db_callback = array(); |
|
| 420 | } |
|
| 421 | ||
| 422 | // Debugging. |
|
| 423 | if (isset($db_show_debug) && $db_show_debug === true) |
|