diff options
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 5 |
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(); |