);
}
-// Checks whether given URL is blacklisted
-function isUrlBlacklisted ($url) {
- // Mark it as not listed by default
- $listed = FALSE;
-
- // Is black-listing enbaled?
- if (!isUrlBlacklistEnabled()) {
- // No, then all URLs are not in this list
- return FALSE;
- } elseif (!isset($GLOBALS['blacklist_data'][$url])) {
- // Check black-list for given URL
- $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS `blist_timestamp` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
- array($url), __FILE__, __LINE__);
-
- // Is there an entry?
- if (SQL_NUMROWS($result) == 1) {
- // Jupp, we got one listed
- $GLOBALS['blacklist_data'][$url] = SQL_FETCHARRAY($result);
-
- // Mark it as listed
- $listed = TRUE;
- } // END - if
-
- // Free result
- SQL_FREERESULT($result);
- } else {
- // Is found in cache -> black-listed
- $listed = TRUE;
- }
-
- // Return result
- return $listed;
-}
-
// Adds key/value pair to a working SQL string together
function addKeyValueSql ($key, $value) {
// Init SQL