| @@ 683-696 (lines=14) @@ | ||
| 680 | } |
|
| 681 | $smcFunc['db_free_result']($request); |
|
| 682 | ||
| 683 | if ($context['is_marked_notify'] && !empty($board_sent)) |
|
| 684 | { |
|
| 685 | $smcFunc['db_query']('', ' |
|
| 686 | UPDATE {db_prefix}log_notify |
|
| 687 | SET sent = {int:is_sent} |
|
| 688 | WHERE id_member = {int:current_member} |
|
| 689 | AND id_board = {int:current_board}', |
|
| 690 | array( |
|
| 691 | 'current_board' => $board, |
|
| 692 | 'current_member' => $user_info['id'], |
|
| 693 | 'is_sent' => 0, |
|
| 694 | ) |
|
| 695 | ); |
|
| 696 | } |
|
| 697 | ||
| 698 | require_once($sourcedir . '/Subs-Notify.php'); |
|
| 699 | $pref = getNotifyPrefs($user_info['id'], array('board_notify', 'board_notify_' . $board), true); |
|
| @@ 2142-2156 (lines=15) @@ | ||
| 2139 | logAction(empty($_POST['sticky']) ? 'unsticky' : 'sticky', array('topic' => $topicOptions['id'], 'board' => $topicOptions['board'])); |
|
| 2140 | ||
| 2141 | // Returning to the topic? |
|
| 2142 | if (!empty($_REQUEST['goback'])) |
|
| 2143 | { |
|
| 2144 | // Mark the board as read.... because it might get confusing otherwise. |
|
| 2145 | $smcFunc['db_query']('', ' |
|
| 2146 | UPDATE {db_prefix}log_boards |
|
| 2147 | SET id_msg = {int:maxMsgID} |
|
| 2148 | WHERE id_member = {int:current_member} |
|
| 2149 | AND id_board = {int:current_board}', |
|
| 2150 | array( |
|
| 2151 | 'current_board' => $board, |
|
| 2152 | 'current_member' => $user_info['id'], |
|
| 2153 | 'maxMsgID' => $modSettings['maxMsgID'], |
|
| 2154 | ) |
|
| 2155 | ); |
|
| 2156 | } |
|
| 2157 | ||
| 2158 | if ($board_info['num_topics'] == 0) |
|
| 2159 | cache_put_data('board-' . $board, null, 120); |
|
| @@ 896-911 (lines=16) @@ | ||
| 893 | $context['is_marked_notify'] = true; |
|
| 894 | ||
| 895 | // Only do this once, but mark the notifications as "not sent yet" for next time. |
|
| 896 | if (!empty($row['sent']) && $do_once) |
|
| 897 | { |
|
| 898 | $smcFunc['db_query']('', ' |
|
| 899 | UPDATE {db_prefix}log_notify |
|
| 900 | SET sent = {int:is_not_sent} |
|
| 901 | WHERE (id_topic = {int:current_topic} OR id_board = {int:current_board}) |
|
| 902 | AND id_member = {int:current_member}', |
|
| 903 | array( |
|
| 904 | 'current_board' => $board, |
|
| 905 | 'current_member' => $user_info['id'], |
|
| 906 | 'current_topic' => $topic, |
|
| 907 | 'is_not_sent' => 0, |
|
| 908 | ) |
|
| 909 | ); |
|
| 910 | $do_once = false; |
|
| 911 | } |
|
| 912 | } |
|
| 913 | ||
| 914 | // Have we recently cached the number of new topics in this board, and it's still a lot? |
|