1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 18:24:29 +01:00

the prefix work: fix it to be dependent on a board_regex config value

This commit is contained in:
czaks 2013-08-01 01:43:33 -04:00 committed by Michael Foster
parent bc76d934fe
commit e109d8179f

View File

@ -87,7 +87,7 @@ function mysql_version() {
function prepare($query) {
global $pdo, $debug, $config;
$query = preg_replace('/``([0-9a-zA-Z$_\x{0080}-\x{FFFF}]+)``/u', '`' . $config['db']['prefix'] . '$1`', $query);
$query = preg_replace('/``('.$config['board_regex'].')``/u', '`' . $config['db']['prefix'] . '$1`', $query);
sql_open();
@ -100,7 +100,7 @@ function prepare($query) {
function query($query) {
global $pdo, $debug, $config;
$query = preg_replace('/``([0-9a-zA-Z$_\x{0080}-\x{FFFF}]+)``/u', '`' . $config['db']['prefix'] . '$1`', $query);
$query = preg_replace('/``('.$config['board_regex'].')``/u', '`' . $config['db']['prefix'] . '$1`', $query);
sql_open();