| @@ 211-223 (lines=13) @@ | ||
| 208 | if (empty($modSettings['disableQueryCheck']) && strpos($db_string, '\'') !== false && empty($db_values['security_override'])) |
|
| 209 | $this->error_backtrace('Hacking attempt...', 'Illegal character (\') used in query...', true, __FILE__, __LINE__); |
|
| 210 | ||
| 211 | if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false)) |
|
| 212 | { |
|
| 213 | // Store these values for use in the callback function. |
|
| 214 | $this->_db_callback_values = $db_values; |
|
| 215 | $this->_db_callback_connection = $connection; |
|
| 216 | ||
| 217 | // Inject the values passed to this function. |
|
| 218 | $db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', array($this, 'replacement__callback'), $db_string); |
|
| 219 | ||
| 220 | // No need for them any longer. |
|
| 221 | $this->_db_callback_values = array(); |
|
| 222 | $this->_db_callback_connection = null; |
|
| 223 | } |
|
| 224 | ||
| 225 | // Debugging. |
|
| 226 | if ($db_show_debug === true) |
|
| @@ 161-173 (lines=13) @@ | ||
| 158 | $db_string .= "\n\t\t\tORDER BY null"; |
|
| 159 | } |
|
| 160 | ||
| 161 | if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false)) |
|
| 162 | { |
|
| 163 | // Store these values for use in the callback function. |
|
| 164 | $this->_db_callback_values = $db_values; |
|
| 165 | $this->_db_callback_connection = $connection; |
|
| 166 | ||
| 167 | // Inject the values passed to this function. |
|
| 168 | $db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', array($this, 'replacement__callback'), $db_string); |
|
| 169 | ||
| 170 | // No need for them any longer. |
|
| 171 | $this->_db_callback_values = array(); |
|
| 172 | $this->_db_callback_connection = null; |
|
| 173 | } |
|
| 174 | ||
| 175 | // Debugging. |
|
| 176 | if ($db_show_debug === true) |
|