BxAntispamGridBlockLog.php 1.5 KB

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