1
0

BxTimelinePrivacy.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Timeline Timeline
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxTimelinePrivacy extends BxBaseModNotificationsPrivacy
  12. {
  13. protected $_oModule;
  14. public function __construct ($aOptions, $oTemplate = false)
  15. {
  16. parent::__construct ($aOptions, $oTemplate);
  17. $this->_oModule = BxDolModule::getInstance('bx_timeline');
  18. }
  19. public function addSpaces($aValues, $iOwnerId, $aParams)
  20. {
  21. if(!empty($aParams['display']) && $aParams['display'] != $this->_oModule->_oConfig->getObject('form_display_post_add'))
  22. return $aValues;
  23. return parent::addSpaces($aValues, $iOwnerId, $aParams);
  24. }
  25. public function getContentByGroupAsSQLPart($mixedGroupId)
  26. {
  27. $aResult = parent::getContentByGroupAsSQLPart($mixedGroupId);
  28. if($this->_oModule->_oDb->isTableAlias()) {
  29. $sTable = $this->_oModule->_oDb->getTable();
  30. $sTableAlias = $this->_oModule->_oDb->getTableAlias();
  31. foreach($aResult as $sKey => $sValue)
  32. $aResult[$sKey] = str_replace($sTable, $sTableAlias, $sValue);
  33. }
  34. return $aResult;
  35. }
  36. }
  37. /** @} */