Hier noch ein Bugfix, damit sich ein User nicht in einem gesperrten Thema bedanken kann.
Bugfix - Block the thanks button when a topic is locked.
Open thanks.php
Find
Code: Alles auswählen
//redirect guest to login box
if (!$user->data['is_registered'])
{
login_box();
}
Code: Alles auswählen
//Begin NEW Query If the topic is locked, thanks is not allowed
$sql = 'SELECT topic_status
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
$topic_locked = $db->sql_fetchfield('topic_status');
$db->sql_freeresult($result);
//END NEW Query If the topic is locked, thanks is not allowed
Code: Alles auswählen
if($thanked_post)
{
trigger_error('THANKS_CANT_ADD');
}
Code: Alles auswählen
//Begin NEW If the topic is locked, thanks is not allowed
if($topic_locked)
{
trigger_error('THANKS_DISALLOW');
}
//End NEW If the topic is locked, thanks is not allowed
Find
Code: Alles auswählen
<!-- IF THANKS_ENABLE -->
Code: Alles auswählen
<!-- IF THANKS_ENABLE and not S_IS_LOCKED -->
Grüße: Mahony