jmyeom

auto lock instead of autosage boards.php

Aug 11th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. // And if the number of replies already in the thread are less than the maximum thread replies before perma-sage...
  2. if ($thread_replies =< $board_class->board['maxreplies']) {
  3.  
  4. // Bump the thread
  5. $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "posts` SET `bumped` = '" . time() . "' WHERE `boardid` = " . $board_class->board['id'] . " AND `id` = '" . $thread_replyto . "'");
  6. }
  7. if ($thread_replies >= $board_class->board['maxreplies']) {
  8. // Lock the thread
  9. $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "posts` SET `locked` = 1 WHERE `id` = ".$thread_replyto." AND `boardid` = " . $board_class->board['id'] . "");
  10. }
Advertisement
Add Comment
Please, Sign In to add comment