|
@@ -11,15 +11,19 @@ define('BX_DOL_MANAGE_TOOLS_ADMINISTRATION', 'administration');
|
|
|
|
|
|
|
|
class BxDolCmtsGridAdministration extends BxTemplGrid
|
|
class BxDolCmtsGridAdministration extends BxTemplGrid
|
|
|
{
|
|
{
|
|
|
|
|
+ protected $_oCmts;
|
|
|
|
|
+
|
|
|
protected $_sManageType;
|
|
protected $_sManageType;
|
|
|
protected $_sParamsDivider;
|
|
protected $_sParamsDivider;
|
|
|
|
|
|
|
|
protected $_sFilter1Name;
|
|
protected $_sFilter1Name;
|
|
|
protected $_sFilter1Value;
|
|
protected $_sFilter1Value;
|
|
|
protected $_aFilter1Values;
|
|
protected $_aFilter1Values;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
public function __construct ($aOptions, $oTemplate = false)
|
|
public function __construct ($aOptions, $oTemplate = false)
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->_oCmts = null;
|
|
|
|
|
+
|
|
|
$this->_sFilter1Name = 'filter1';
|
|
$this->_sFilter1Name = 'filter1';
|
|
|
$this->_aFilter1Values = ['' => _t('_adm_txt_select_module')];
|
|
$this->_aFilter1Values = ['' => _t('_adm_txt_select_module')];
|
|
|
|
|
|
|
@@ -61,11 +65,11 @@ class BxDolCmtsGridAdministration extends BxTemplGrid
|
|
|
if(!$oModule)
|
|
if(!$oModule)
|
|
|
return '';
|
|
return '';
|
|
|
|
|
|
|
|
- $oCmts = BxDolCmts::getObjectInstance($oModule->_oConfig->CNF['OBJECT_COMMENTS'], 0, false);
|
|
|
|
|
- if(!$oCmts || !$oCmts->isEnabled())
|
|
|
|
|
|
|
+ $this->_oCmts = BxDolCmts::getObjectInstance($oModule->_oConfig->CNF['OBJECT_COMMENTS'], 0, false);
|
|
|
|
|
+ if(!$this->_oCmts || !$this->_oCmts->isEnabled())
|
|
|
return '';
|
|
return '';
|
|
|
|
|
|
|
|
- $this->_aOptions['source'] = $oModule->_oDb->prepareAsString("SELECT `sys_cmts_ids`.`id`, `sys_cmts_ids`.`cmt_id`, `sys_cmts_ids`.`reports`, `cmts`.*, `sys_accounts`.`email` FROM `sys_cmts_ids` INNER JOIN " . $oCmts->getCommentsTableName() . " AS `cmts` ON `cmts`.`cmt_id`=`sys_cmts_ids`.`cmt_id` INNER JOIN `sys_profiles` ON `cmts`.`cmt_author_id`=`sys_profiles`.`id` INNER JOIN `sys_accounts` ON `sys_profiles`.`account_id`=`sys_accounts`.`id` WHERE `sys_cmts_ids`.`system_id`=?", $oCmts->getSystemId());
|
|
|
|
|
|
|
+ $this->_aOptions['source'] = $oModule->_oDb->prepareAsString("SELECT `sys_cmts_ids`.`id`, `sys_cmts_ids`.`cmt_id`, `sys_cmts_ids`.`reports`, `cmts`.*, `sys_accounts`.`email` FROM `sys_cmts_ids` INNER JOIN " . $this->_oCmts->getCommentsTableName() . " AS `cmts` ON `cmts`.`cmt_id`=`sys_cmts_ids`.`cmt_id` INNER JOIN `sys_profiles` ON `cmts`.`cmt_author_id`=`sys_profiles`.`id` INNER JOIN `sys_accounts` ON `sys_profiles`.`account_id`=`sys_accounts`.`id` WHERE `sys_cmts_ids`.`system_id`=?", $this->_oCmts->getSystemId());
|
|
|
|
|
|
|
|
return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
|
|
return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
|
|
|
}
|
|
}
|