Changeset 203:7d4b71c7c72f
- Timestamp:
- 05/07/11 16:35:27 (14 years ago)
- Branch:
- default
- Children:
- 206:ccf48ff350d5, 207:19dcc79dc756
- Location:
- plugins/antispam
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/_admin.php
r74 r203 25 25 26 26 $core->addBehavior('adminDashboardFavs','antispamDashboardFavs'); 27 $core->addBehavior('adminDashboardFavsIcon','antispamDashboardFavsIcon'); 27 28 28 29 function antispamDashboardFavs($core,$favs) … … 31 32 'index.php?pf=antispam/icon.png','index.php?pf=antispam/icon-big.png', 32 33 'admin',null,null)); 34 } 35 36 function antispamDashboardFavsIcon($core,$name,$icon) 37 { 38 // Check if it is comments favs 39 if ($name == 'comments') { 40 // Hack comments title if there is at least one spam 41 $str = dcAntispam::dashboardIconTitle($core); 42 if ($str != '') { 43 $icon[0] .= $str; 44 } 45 } 33 46 } 34 47 -
plugins/antispam/inc/lib.dc.antispam.php
r0 r203 79 79 } 80 80 81 public static function dashboardIconTitle($core) 82 { 83 if (($count = self::countSpam($core)) > 0) { 84 $str = ($count > 1) ? __('(including %d spam comments)') : __('(including %d spam comment)'); 85 return '</a> <br /><a href="comments.php?status=-2">'.sprintf($str,$count); 86 } else { 87 return ''; 88 } 89 } 90 81 91 public static function countSpam($core) 82 92 {
Note: See TracChangeset
for help on using the changeset viewer.