BxBaseModGroupsUploaderCoverCrop.php 918 B

1234567891011121314151617181920212223242526272829
  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 BaseGroups Base classes for groups modules
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxBaseModGroupsUploaderCoverCrop extends BxBaseModProfileUploaderCoverCrop
  12. {
  13. public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
  14. {
  15. parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate ? $oTemplate : $this->_oModule->_oTemplate);
  16. }
  17. protected function isAdmin ($iContentId = 0)
  18. {
  19. if (parent::isAdmin($iContentId))
  20. return true;
  21. if (!$iContentId || !($aDataEntry = $this->_oModule->_oDb->getContentInfoById((int)$iContentId)))
  22. return false;
  23. return CHECK_ACTION_RESULT_ALLOWED == $this->_oModule->checkAllowedEdit ($aDataEntry);
  24. }
  25. }
  26. /** @} */