BxAntispamGridBlockLog.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup Antispam Antispam
  7. * @ingroup DolphinModules
  8. *
  9. * @{
  10. */
  11. require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  12. bx_import('BxDolProfile');
  13. bx_import('BxTemplGrid');
  14. class BxAntispamGridBlockLog extends BxTemplGrid
  15. {
  16. public function __construct ($aOptions, $oTemplate = false)
  17. {
  18. parent::__construct ($aOptions, $oTemplate);
  19. }
  20. protected function _getCellIp ($mixedValue, $sKey, $aField, $aRow)
  21. {
  22. return parent::_getCellDefault (long2ip($mixedValue), $sKey, $aField, $aRow);
  23. }
  24. protected function _getCellProfileId ($mixedValue, $sKey, $aField, $aRow)
  25. {
  26. $s = '<span class="bx-def-font-grayed">' . _t('_undefined') . '</span>';
  27. if ($mixedValue && ($oProfile = BxDolProfile::getInstance((int)$mixedValue)))
  28. $s = '<a href="' . $oProfile->getUrl() . '">' . $oProfile->getDisplayName() . '</span>';
  29. return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
  30. }
  31. protected function _getCellType ($mixedValue, $sKey, $aField, $aRow)
  32. {
  33. return parent::_getCellDefault (_t('_bx_antispam_type_' . $mixedValue), $sKey, $aField, $aRow);
  34. }
  35. protected function _getCellAdded ($mixedValue, $sKey, $aField, $aRow)
  36. {
  37. return parent::_getCellDefault (bx_time_js($mixedValue, BX_FORMAT_DATE), $sKey, $aField, $aRow);
  38. }
  39. }
  40. /** @} */