Removed topic watch useless code (#1137)

* Removed topic watch useless code

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-11-20 18:41:21 +07:00 committed by GitHub
commit 70988814c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 6 deletions

View file

@ -5,6 +5,7 @@
**Merged pull requests:**
- Removed topic watch useless code [\#1137](https://github.com/torrentpier/torrentpier/pull/1137) ([belomaxorka](https://github.com/belomaxorka))
- Fixed topic_watch array key name [\#1136](https://github.com/torrentpier/torrentpier/pull/1136) ([belomaxorka](https://github.com/belomaxorka))
- Fixed announce-list indexes ordering [\#1135](https://github.com/torrentpier/torrentpier/pull/1135) ([belomaxorka](https://github.com/belomaxorka))
- Fixed $bb_cfg['file_id_ext'] ordering [\#1134](https://github.com/torrentpier/torrentpier/pull/1134) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -96,8 +96,6 @@ $images['pm_new_msg'] = '';
$images['pm_no_new_msg'] = '';
// topic_mod_icons will be replaced with SELECT later...
$images['topic_watch'] = '';
$images['topic_un_watch'] = '';
$images['topic_mod_lock'] = $_main . 'topic_lock.gif';
$images['topic_mod_unlock'] = $_main . 'topic_unlock.gif';
$images['topic_mod_split'] = $_main . 'topic_split.gif';

View file

@ -420,14 +420,12 @@ if ($is_auth['auth_mod']) {
}
// Topic watch information
$s_watching_topic = $s_watching_topic_img = '';
$s_watching_topic = '';
if ($can_watch_topic) {
if ($is_watching_topic) {
$s_watching_topic = "<a href=\"" . TOPIC_URL . $topic_id . "&amp;unwatch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '">' . $lang['STOP_WATCHING_TOPIC'] . '</a>';
$s_watching_topic_img = isset($images['topic_un_watch']) ? "<a href=\"" . TOPIC_URL . "$topic_id&amp;unwatch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_un_watch'] . '" alt="' . $lang['STOP_WATCHING_TOPIC'] . '" title="' . $lang['STOP_WATCHING_TOPIC'] . '" border="0"></a>' : '';
} else {
$s_watching_topic = "<a href=\"" . TOPIC_URL . $topic_id . "&amp;watch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '">' . $lang['START_WATCHING_TOPIC'] . '</a>';
$s_watching_topic_img = isset($images['topic_watch']) ? "<a href=\"" . TOPIC_URL . "$topic_id&amp;watch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_watch'] . '" alt="' . $lang['START_WATCHING_TOPIC'] . '" title="' . $lang['START_WATCHING_TOPIC'] . '" border="0"></a>' : '';
}
}
@ -508,7 +506,6 @@ $template->assign_vars([
'S_AUTH_LIST' => $s_auth_can,
'S_TOPIC_ADMIN' => $topic_mod,
'S_WATCH_TOPIC' => $s_watching_topic,
'S_WATCH_TOPIC_IMG' => $s_watching_topic_img,
'U_VIEW_TOPIC' => TOPIC_URL . $topic_id,
'U_VIEW_FORUM' => $view_forum_url,
'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url,