2.7.6 - Locked Thread Displays Action Buttons for Original Poster and Moderators [message #35675] |
Tue, 30 January 2007 22:21 |
Bubba
Messages: 5 Registered: December 2006
Karma: 0
|
Junior Member |
|
|
Classification: Usability / UI
Disclaimer: Not sure if application was designed this way for extensibility or an oversight. Code owner should evaluate all possible group & user permission combinations before accepting change.
Description: When moderator locks a thread, all action buttons (edit, reply, quote, etc) should be disabled/hidden for all users.
Issue: Locked threads display "Edit" to original poster and "Edit", "Reply" and "Quote" for Moderators/Admins. Clicking on any results in error page.
Expected: All actionable items are hidden for all users.
File: src/drawmsg.inc.t
Code:
if (_uid && ($perms & 16 || (_uid == $obj->poster_id && (!$GLOBALS['EDIT_TIME_LIMIT'] || __request_timestamp__ - $obj->post_stamp < $GLOBALS['EDIT_TIME_LIMIT'] * 60)))) {
$edit_link = '{TEMPLATE: dmsg_edit_link}';
} else {
$edit_link = '';
}
if (!($obj->thread_opt & 1) || $perms & 4096) {
$reply_link = '{TEMPLATE: dmsg_reply_link}';
$quote_link = '{TEMPLATE: dmsg_quote_link}';
} else {
/* thread is locked, hide reply and quote controls */
$reply_link = $quote_link = '';
}
Possible Fix:
if (_uid && !($obj->thread_opt & 1) && ($perms & 16 || (_uid == $obj->poster_id && (!$GLOBALS['EDIT_TIME_LIMIT'] || __request_timestamp__ - $obj->post_stamp < $GLOBALS['EDIT_TIME_LIMIT'] * 60)))) {
$edit_link = '{TEMPLATE: dmsg_edit_link}';
} else {
$edit_link = '';
}
if (!($obj->thread_opt & 1)) {
$reply_link = '{TEMPLATE: dmsg_reply_link}';
$quote_link = '{TEMPLATE: dmsg_quote_link}';
} else {
/* thread is locked, hide reply and quote controls */
$reply_link = $quote_link = '';
}
|
|
|
|