- b2evolution CMS Support Forums
- b2evolution Development
- Bug reports
- Fixed
- [fixed] Referer stats page anti-spam links missing crumbs
1 stjeanp Oct 26, 2010 21:57
Here's a context diff to add the crumbs to get the anti-spam links on the referer page to work.
[root@notanut views]# diff -c _stats_referers.view.php.old _stats_referers.view.php
*** _stats_referers.view.php.old 2010-10-26 14:55:06.000000000 -0500
--- _stats_referers.view.php 2010-10-26 14:55:03.000000000 -0500
***************
*** 92,98 ****
function referer_ban_link( $uri )
{
return '<a href="?ctrl=antispam&action=ban&keyword='.rawurlencode( get_ban_domain( $uri ) )
! .'" title="'.T_('Ban this domain!').'">'.get_icon('ban').'</a>';
}
$Results->cols[] = array(
'th' => /* TRANS: Abbrev. for Spam */ T_('S'),
--- 92,98 ----
function referer_ban_link( $uri )
{
return '<a href="?ctrl=antispam&action=ban&keyword='.rawurlencode( get_ban_domain( $uri ) )
! .'&'.url_crumb('antispam').'" title="'.T_('Ban this domain!').'">'.get_icon('ban').'</a>';
}
$Results->cols[] = array(
'th' => /* TRANS: Abbrev. for Spam */ T_('S'),
***************
*** 183,189 ****
<?php
if( $current_User->check_perm( 'spamblacklist', 'edit' ) )
{ // user can ban:
! echo '<td class="center">'.action_icon( T_('Ban this domain!'), 'ban', regenerate_url( 'ctrl,action,keyword', 'ctrl=antispam&action=ban&keyword='.rawurlencode( get_ban_domain($row_stats['hit_referer']) ) ) ).'</td>'; // we use hit_referer, because unlike dom_name it includes subdomains (especially 'www.')
}
?>
<td class="right"<?php
--- 183,189 ----
<?php
if( $current_User->check_perm( 'spamblacklist', 'edit' ) )
{ // user can ban:
! echo '<td class="center">'.action_icon( T_('Ban this domain!'), 'ban', regenerate_url( 'ctrl,action,keyword', 'ctrl=antispam&action=ban&keyword='.rawurlencode( get_ban_domain($row_stats['hit_referer']) ).'&'.url_crumb('antispam') ) ).'</td>'; // we use hit_referer, because unlike dom_name it includes subdomains (especially 'www.')
}
?>
<td class="right"<?php
Fixed in CVS, thanks