projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7edc9be
)
Fix empty delimiter in isSpider()
author
Roland Häder
<roland@mxchange.org>
Sat, 21 Nov 2009 17:15:13 +0000
(17:15 +0000)
committer
Roland Häder
<roland@mxchange.org>
Sat, 21 Nov 2009 17:15:13 +0000
(17:15 +0000)
inc/functions.php
patch
|
blob
|
history
diff --git
a/inc/functions.php
b/inc/functions.php
index 8bb05f320e0b26e2c8b97af2e63faa6bce27159b..6b7a1b6138e3948d5e5de7e2721e38052c768f8f 100644
(file)
--- a/
inc/functions.php
+++ b/
inc/functions.php
@@
-3846,6
+3846,9
@@
function encodeUrl ($url, $outputMode = '0') {
// Simple check for spider
function isSpider () {
+ // It should not be empty, if so it is better a spider/bot
+ if (detectUserAgent(true) == '') return true;
+
// Is it a spider?
return ((strpos('spider', strtolower(detectUserAgent(true))) !== false) || (strpos('bot', strtolower(detectUserAgent(true))) !== false));
}