function _autoban_short_referer in Automatic IP ban (Autoban) 7
Short referer
Parameters
string $referer: Referrer string.
int $limit_width: Limit of the referrer width.
Return value
string Short referrer string.
1 call to _autoban_short_referer()
- autoban_analyze in ./
autoban.admin.inc - Menu callback. Analize watchdog.
File
- ./
autoban.module, line 980 - Main file for autoban module.
Code
function _autoban_short_referer($referer, $limit_width = 150) {
$item_referer = filter_xss($referer);
if (drupal_strlen($item_referer) > $limit_width) {
$item_referer = drupal_substr($item_referer, 0, $limit_width) . '...';
}
return $item_referer;
}