Skip to content

Commit f3150a1

Browse files
committed
v.1.0.16
1 parent 16ee13e commit f3150a1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

ip_blocking.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ package = Spam control
44
backdrop = 1.x
55
type = module
66
configure = admin/config/people/ip-blocking
7-
version = 1.0.15
7+
version = 1.0.16

ip_blocking.module

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,14 @@ function ip_blocking_preprocess_block(&$variables) {
193193

194194
if (in_array($type, $types)) {
195195
$link = ip_blocking_build_operations_links($ip, urlencode($message));
196-
$variables['content']['dblog_table']['#rows'][8][1] .= $link;
196+
$ops = $variables['content']['dblog_table']['#rows'][8][1];
197+
198+
if (empty($ops)) {
199+
$variables['content']['dblog_table']['#rows'][8][1] .= $link;
200+
}
201+
else {
202+
$variables['content']['dblog_table']['#rows'][8][1] .= ' | '. $link;
203+
}
197204
}
198205
}
199206
}
@@ -214,7 +221,7 @@ function ip_blocking_build_operations_links($ip, $message) {
214221
$abuse_ipdb_link = l('AbuseIPDB', 'https://www.abuseipdb.com/check/' . $ip,
215222
array('attributes' => array('target' => '_blank')));
216223

217-
return $action_link . ' - ' . t('Check status of this IP in') . ' ' . $abuse_ipdb_link;
224+
return $action_link . ' | ' . t('Check status of this IP in') . ' ' . $abuse_ipdb_link;
218225
}
219226
}
220227
}
@@ -224,7 +231,7 @@ function ip_blocking_get_action_link($ip, $message) {
224231
$action_link = '';
225232
// If the IP is already blocked, display an unblock link or vice versa.
226233
if (ip_is_denied($ip)) {
227-
$action_link .= '<b>' . t('IP @ip blocked', array('@ip' => $ip)) . '</b> - ';
234+
$action_link .= '<b>' . t('IP @ip blocked', array('@ip' => $ip)) . '</b> | ';
228235
$action = 'unblock';
229236
}
230237
else {

0 commit comments

Comments
 (0)