mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
Merge pull request #369 from wasja1982/master
Приведение к единому виду рассылки о новом топике и подписке на комментарии
This commit is contained in:
commit
ee73bd47d2
|
@ -327,10 +327,15 @@ class ActionLink extends Action {
|
|||
/**
|
||||
* Добавляем автора топика в подписчики на новые комментарии к этому топику
|
||||
*/
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$this->oUserCurrent->getMail(),$this->oUserCurrent->getId());
|
||||
//Делаем рассылку спама всем, кто состоит в этом блоге
|
||||
$oUser=$oTopic->getUser();
|
||||
if ($oUser) {
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$oUser->getMail(),$oUser->getId());
|
||||
}
|
||||
/**
|
||||
* Делаем рассылку спама всем, кто состоит в этом блоге
|
||||
*/
|
||||
if ($oTopic->getPublish()==1 and $oBlog->getType()!='personal') {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oUser);
|
||||
}
|
||||
/**
|
||||
* Добавляем событие в ленту
|
||||
|
@ -464,7 +469,7 @@ class ActionLink extends Action {
|
|||
* Рассылаем о новом топике подписчикам блога
|
||||
*/
|
||||
if ($bSendNotify) {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oTopic->getUser());
|
||||
}
|
||||
if (!$oTopic->getPublish() and !$this->oUserCurrent->isAdministrator() and $this->oUserCurrent->getId()!=$oTopic->getUserId()) {
|
||||
Router::Location($oBlog->getUrlFull());
|
||||
|
|
|
@ -270,7 +270,7 @@ class ActionPhotoset extends Action {
|
|||
/**
|
||||
* Максимальный размер фото
|
||||
*/
|
||||
if (filesize($_FILES['Filedata']['tmp_name']) > Config::Get('module.topic.photoset.photo_max_size')*1024) {
|
||||
if ($_FILES['Filedata']['size'] > Config::Get('module.topic.photoset.photo_max_size')*1024) {
|
||||
$this->Message_AddError($this->Lang_Get('topic_photoset_error_bad_filesize', array('MAX' => Config::Get('module.topic.photoset.photo_max_size'))), $this->Lang_Get('error'));
|
||||
return false;
|
||||
}
|
||||
|
@ -549,12 +549,15 @@ class ActionPhotoset extends Action {
|
|||
/**
|
||||
* Добавляем автора топика в подписчики на новые комментарии к этому топику
|
||||
*/
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$this->oUserCurrent->getMail(),$this->oUserCurrent->getId());
|
||||
$oUser=$oTopic->getUser();
|
||||
if ($oUser) {
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$oUser->getMail(),$oUser->getId());
|
||||
}
|
||||
/**
|
||||
* Делаем рассылку спама всем, кто состоит в этом блоге
|
||||
*/
|
||||
if ($oTopic->getPublish()==1 and $oBlog->getType()!='personal') {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oUser);
|
||||
}
|
||||
/**
|
||||
* Привязываем фото к id топика
|
||||
|
@ -714,7 +717,7 @@ class ActionPhotoset extends Action {
|
|||
* Рассылаем о новом топике подписчикам блога
|
||||
*/
|
||||
if ($bSendNotify) {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oTopic->getUser());
|
||||
}
|
||||
if (!$oTopic->getPublish() and !$this->oUserCurrent->isAdministrator() and $this->oUserCurrent->getId()!=$oTopic->getUserId()) {
|
||||
Router::Location($oBlog->getUrlFull());
|
||||
|
|
|
@ -304,10 +304,15 @@ class ActionQuestion extends Action {
|
|||
/**
|
||||
* Добавляем автора топика в подписчики на новые комментарии к этому топику
|
||||
*/
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$this->oUserCurrent->getMail(),$this->oUserCurrent->getId());
|
||||
//Делаем рассылку спама всем, кто состоит в этом блоге
|
||||
$oUser=$oTopic->getUser();
|
||||
if ($oUser) {
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$oUser->getMail(),$oUser->getId());
|
||||
}
|
||||
/**
|
||||
* Делаем рассылку спама всем, кто состоит в этом блоге
|
||||
*/
|
||||
if ($oTopic->getPublish()==1 and $oBlog->getType()!='personal') {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oUser);
|
||||
}
|
||||
/**
|
||||
* Добавляем событие в ленту
|
||||
|
@ -452,7 +457,7 @@ class ActionQuestion extends Action {
|
|||
* Рассылаем о новом топике подписчикам блога
|
||||
*/
|
||||
if ($bSendNotify) {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oTopic->getUser());
|
||||
}
|
||||
if (!$oTopic->getPublish() and !$this->oUserCurrent->isAdministrator() and $this->oUserCurrent->getId()!=$oTopic->getUserId()) {
|
||||
Router::Location($oBlog->getUrlFull());
|
||||
|
|
|
@ -351,12 +351,15 @@ class ActionTopic extends Action {
|
|||
/**
|
||||
* Добавляем автора топика в подписчики на новые комментарии к этому топику
|
||||
*/
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$this->oUserCurrent->getMail(),$this->oUserCurrent->getId());
|
||||
$oUser=$oTopic->getUser();
|
||||
if ($oUser) {
|
||||
$this->Subscribe_AddSubscribeSimple('topic_new_comment',$oTopic->getId(),$oUser->getMail(),$oUser->getId());
|
||||
}
|
||||
/**
|
||||
* Делаем рассылку спама всем, кто состоит в этом блоге
|
||||
*/
|
||||
if ($oTopic->getPublish()==1 and $oBlog->getType()!='personal') {
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$this->oUserCurrent);
|
||||
$this->Topic_SendNotifyTopicNew($oBlog,$oTopic,$oUser);
|
||||
}
|
||||
/**
|
||||
* Добавляем событие в ленту
|
||||
|
|
Loading…
Reference in a new issue