浏览代码

Update PM\PMEdit page

Visman 4 年之前
父节点
当前提交
931e51efee
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      app/Models/Pages/PM/PMEdit.php

+ 4 - 5
app/Models/Pages/PM/PMEdit.php

@@ -125,14 +125,14 @@ class PMEdit extends AbstractPM
         $now       = \time();
         $now       = \time();
         $topic     = $post->parent;
         $topic     = $post->parent;
         $firstPost = $post->id === $topic->first_post_id;
         $firstPost = $post->id === $topic->first_post_id;
-        $calcPost  = false;
+        $calcUser  = false;
         $calcTopic = false;
         $calcTopic = false;
 
 
         // текст сообщения
         // текст сообщения
         if ($post->message !== $v->message) {
         if ($post->message !== $v->message) {
             $post->message       = $v->message;
             $post->message       = $v->message;
             $post->edited        = $now;
             $post->edited        = $now;
-            $calcPost            = true;
+            $calcUser            = true;
 
 
             if ($post->id === $topic->last_post_id) {
             if ($post->id === $topic->last_post_id) {
                 $calcTopic       = true;
                 $calcTopic       = true;
@@ -154,10 +154,9 @@ class PMEdit extends AbstractPM
             }
             }
         }
         }
 
 
-        // обновление сообщения
         $this->pms->update(Cnst::PPOST, $post);
         $this->pms->update(Cnst::PPOST, $post);
 
 
-        // обновление темы
+        // пересчет темы
         if ($calcTopic) {
         if ($calcTopic) {
             $topic->calcStat();
             $topic->calcStat();
         }
         }
@@ -165,7 +164,7 @@ class PMEdit extends AbstractPM
         $this->pms->update(Cnst::PTOPIC, $topic);
         $this->pms->update(Cnst::PTOPIC, $topic);
 
 
         // антифлуд
         // антифлуд
-        if ($calcPost) {
+        if ($calcUser) {
             $this->user->u_pm_last_post = $now;
             $this->user->u_pm_last_post = $now;
 
 
             $this->c->users->update($this->user);
             $this->c->users->update($this->user);