mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
fix #189
This commit is contained in:
parent
c2a19e8187
commit
444ac54ca0
|
@ -1028,7 +1028,10 @@ class ActionAjax extends Action {
|
|||
$oTopicCommentVote->setValue($iVal);
|
||||
|
||||
$oComment->setCountVote($oComment->getCountVote()+1);
|
||||
$this->Hook_Run("vote_{$oTopicCommentVote->getTargetType()}_before",array('oTarget'=>$oComment,'oVote'=>$oTopicCommentVote,'iValue' => $iValue));
|
||||
if ($this->Vote_AddVote($oTopicCommentVote) and $this->Comment_UpdateComment($oComment)) {
|
||||
$this->Hook_Run("vote_{$oTopicCommentVote->getTargetType()}_after",array('oTarget'=>$oComment,'oVote'=>$oTopicCommentVote,'iValue' => $iValue));
|
||||
|
||||
$this->Message_AddNoticeSingle($this->Lang_Get('vote.notices.success'),$this->Lang_Get('attention'));
|
||||
$this->Viewer_AssignAjax('iRating',$oComment->getRating());
|
||||
/**
|
||||
|
@ -1114,7 +1117,9 @@ class ActionAjax extends Action {
|
|||
} elseif ($iValue==0) {
|
||||
$oTopic->setCountVoteAbstain($oTopic->getCountVoteAbstain()+1);
|
||||
}
|
||||
$this->Hook_Run("vote_{$oTopicVote->getTargetType()}_before",array('oTarget'=>$oTopic,'oVote'=>$oTopicVote,'iValue' => $iValue));
|
||||
if ($this->Vote_AddVote($oTopicVote) and $this->Topic_UpdateTopic($oTopic)) {
|
||||
$this->Hook_Run("vote_{$oTopicVote->getTargetType()}_after",array('oTarget'=>$oTopic,'oVote'=>$oTopicVote,'iValue' => $iValue));
|
||||
if ($iValue) {
|
||||
$this->Message_AddNoticeSingle($this->Lang_Get('vote.notices.success'),$this->Lang_Get('attention'));
|
||||
} else {
|
||||
|
@ -1178,7 +1183,11 @@ class ActionAjax extends Action {
|
|||
$iVal=(float)$this->Rating_VoteBlog($this->oUserCurrent,$oBlog,$iValue);
|
||||
$oBlogVote->setValue($iVal);
|
||||
$oBlog->setCountVote($oBlog->getCountVote()+1);
|
||||
|
||||
$this->Hook_Run("vote_{$oBlogVote->getTargetType()}_before",array('oTarget'=>$oBlog,'oVote'=>$oBlogVote,'iValue' => $iValue));
|
||||
if ($this->Vote_AddVote($oBlogVote) and $this->Blog_UpdateBlog($oBlog)) {
|
||||
$this->Hook_Run("vote_{$oBlogVote->getTargetType()}_after",array('oTarget'=>$oBlog,'oVote'=>$oBlogVote,'iValue' => $iValue));
|
||||
|
||||
$this->Viewer_AssignAjax('iCountVote',$oBlog->getCountVote());
|
||||
$this->Viewer_AssignAjax('iRating',$oBlog->getRating());
|
||||
$this->Message_AddNoticeSingle($this->Lang_Get('vote.notices.success'),$this->Lang_Get('attention'));
|
||||
|
@ -1265,7 +1274,11 @@ class ActionAjax extends Action {
|
|||
$oUserVote->setValue($iVal);
|
||||
//$oUser->setRating($oUser->getRating()+$iValue);
|
||||
$oUser->setCountVote($oUser->getCountVote()+1);
|
||||
|
||||
$this->Hook_Run("vote_{$oUserVote->getTargetType()}_before",array('oTarget'=>$oUser,'oVote'=>$oUserVote,'iValue' => $iValue));
|
||||
if ($this->Vote_AddVote($oUserVote) and $this->User_Update($oUser)) {
|
||||
$this->Hook_Run("vote_{$oUserVote->getTargetType()}_after",array('oTarget'=>$oUser,'oVote'=>$oUserVote,'iValue' => $iValue));
|
||||
|
||||
$this->Message_AddNoticeSingle($this->Lang_Get('vote.notices.success'),$this->Lang_Get('attention'));
|
||||
$this->Viewer_AssignAjax('iRating',$oUser->getRating());
|
||||
$this->Viewer_AssignAjax('iSkill',$oUser->getSkill());
|
||||
|
|
|
@ -100,10 +100,11 @@ class ActionIndex extends Action {
|
|||
* Вывод рейтинговых топиков
|
||||
*/
|
||||
protected function EventTop() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
$sPeriod=Config::Get('module.topic.default_period_top');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
if (!$sPeriod) $sPeriod=1;
|
||||
/**
|
||||
* Меню
|
||||
*/
|
||||
|
@ -151,10 +152,11 @@ class ActionIndex extends Action {
|
|||
* Вывод обсуждаемых топиков
|
||||
*/
|
||||
protected function EventDiscussed() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
$sPeriod=Config::Get('module.topic.default_period_discussed');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
if (!$sPeriod) $sPeriod=1;
|
||||
/**
|
||||
* Меню
|
||||
*/
|
||||
|
|
|
@ -125,6 +125,8 @@ $config['module']['topic']['max_length'] = 15000; // Максимальн
|
|||
$config['module']['topic']['link_max_length'] = 500; // Максимальное количество символов в одном топике-ссылке
|
||||
$config['module']['topic']['question_max_length'] = 500;// Максимальное количество символов в одном топике-опросе
|
||||
$config['module']['topic']['allow_empty_tags'] = false; // Разрешать или нет не заполнять теги
|
||||
$config['module']['topic']['default_period_top'] = 1; // Дефолтный период (количество дней) для отображения ТОП топиков. Значения: 1,7,30,'all'
|
||||
$config['module']['topic']['default_period_discussed'] = 1; // Дефолтный период (количество дней) для отображения обсуждаемых топиков. Значения: 1,7,30,'all'
|
||||
// Модуль User
|
||||
$config['module']['user']['per_page'] = 15; // Число юзеров на страницу на странице статистики и в профиле пользователя
|
||||
$config['module']['user']['friend_on_profile'] = 15; // Ограничение на вывод числа друзей пользователя на странице его профиля
|
||||
|
|
Loading…
Reference in a new issue