summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-06-21 18:21:08 +0000
committerDries Buytaert <dries@buytaert.net>2005-06-21 18:21:08 +0000
commit4c77761efb355f52f0bc5502cf8d846f175f408b (patch)
tree18380da37183e8f36df670f55afa3f8fa951e0b1 /includes
parente550f8416210489aedd88a73cdc3c5b614edc574 (diff)
downloadbrdo-4c77761efb355f52f0bc5502cf8d846f175f408b.tar.gz
brdo-4c77761efb355f52f0bc5502cf8d846f175f408b.tar.bz2
- Patch #3962 by deekayen: improved error message when a blocked user attempts to login.
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index e2e322269..0fde1d259 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -781,9 +781,8 @@ function drupal_get_messages() {
/**
* Perform an access check for a given mask and rule type. Rules are usually created via admin/access/rules page.
- *
*/
-function drupal_deny($type, $mask) {
+function drupal_is_denied($type, $mask) {
$allow = db_fetch_object(db_query("SELECT * FROM {access} WHERE status = 1 AND type = '%s' AND LOWER('%s') LIKE LOWER(mask)", $type, $mask));
$deny = db_fetch_object(db_query("SELECT * FROM {access} WHERE status = 0 AND type = '%s' AND LOWER('%s') LIKE LOWER(mask)", $type, $mask));
@@ -801,7 +800,7 @@ include_once "$config/settings.php";
include_once 'includes/database.inc';
// deny access to hosts which were banned. t() is not yet available.
-if (drupal_deny('host', $_SERVER['REMOTE_ADDR'])) {
+if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) {
header('HTTP/1.0 403 Forbidden');
print "Sorry, ". $_SERVER['REMOTE_ADDR']. " has been banned.";
exit();