summaryrefslogtreecommitdiff
path: root/includes/session_spider.php
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-06-01 22:45:00 +0000
committerfisharebest <fisharebest@gmail.com>2010-06-01 22:45:00 +0000
commit2be689de86622a917b2bbe48294424f72e19d527 (patch)
treeef49177d0b2ddacdf9726476f4305af5a14c5c79 /includes/session_spider.php
parent3c211ff6d2625cbb6047586521b3306fdf9507af (diff)
downloadwebtrees-2be689de86622a917b2bbe48294424f72e19d527.tar.gz
webtrees-2be689de86622a917b2bbe48294424f72e19d527.tar.bz2
webtrees-2be689de86622a917b2bbe48294424f72e19d527.zip
Quote table names - to allow for "bad" choices of TBLPREFIX
Diffstat (limited to 'includes/session_spider.php')
-rw-r--r--includes/session_spider.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/session_spider.php b/includes/session_spider.php
index 17a5f74c7c..7ae6deeae2 100644
--- a/includes/session_spider.php
+++ b/includes/session_spider.php
@@ -80,7 +80,7 @@ function gen_spider_session_name($bot_name, $bot_language) {
// Note: you may need to blcok IPv6 addresses as well as IPv4 ones.
try {
$banned_ip=WT_DB::prepareLimit(
- "SELECT ip_address, comment FROM ##ip_address".
+ "SELECT ip_address, comment FROM `##ip_address`".
" WHERE category='banned' AND ? LIKE REPLACE(ip_address, '*', '%')",
1
)->execute(array($_SERVER['REMOTE_ADDR']))->fetchOneRow();
@@ -336,7 +336,7 @@ if ($SEARCH_SPIDER && in_array(WT_SCRIPT_NAME, $bots_not_allowed)) {
// mode or update the table pgv_ip_address directly.
try {
$search_engine=WT_DB::prepareLimit(
- "SELECT ip_address, comment FROM ##ip_address".
+ "SELECT ip_address, comment FROM `##ip_address`".
" WHERE category='search-engine' AND ? LIKE REPLACE(ip_address, '*', '%')",
1
)->execute(array($_SERVER['REMOTE_ADDR']))->fetchOneRow();