summaryrefslogtreecommitdiff
path: root/includes/model/Post.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/Post.php')
-rwxr-xr-xincludes/model/Post.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/model/Post.php b/includes/model/Post.php
index 46a0af0..f251773 100755
--- a/includes/model/Post.php
+++ b/includes/model/Post.php
@@ -141,7 +141,7 @@ class Post
Database::get()->query("DELETE FROM posts WHERE post_id = ?", "i", $this->id);
// Decrement the post count of the category
- Database::get()->query("UPDATE categories SET `cat_post_count` = `cat_post_count` - '1' WHERE cat_id = ?", "i", $this->thread->category->id);
+ Database::get()->query("UPDATE categories SET `category_post_count` = `category_post_count` - '1' WHERE category_id = ?", "i", $this->thread->category->id);
}
public static function create($post_content, $post_thread, $post_category)
@@ -159,11 +159,11 @@ class Post
Database::get()->query($sql, "sii", $post_content, $post_thread, $user->id);
// Increment the category's post count
- $sql = "UPDATE categories SET `cat_post_count` = `cat_post_count` + '1' WHERE cat_id = ?;";
+ $sql = "UPDATE categories SET `category_post_count` = `category_post_count` + '1' WHERE category_id = ?;";
Database::get()->query($sql, "i", $post_category);
// Set the last post date of the parent thread
- $sql = "UPDATE threads SET thread_date_lastpost = CONVERT_TZ(NOW(), 'SYSTEM', '+00:00') WHERE thread_id = ?;";
+ $sql = "UPDATE threads SET thread_last_post_date = CONVERT_TZ(NOW(), 'SYSTEM', '+00:00') WHERE thread_id = ?;";
Database::get()->query($sql, "i", $post_thread);
}