Closed (fixed)
Project:
Shoutbox
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2008 at 23:33 UTC
Updated:
4 May 2008 at 08:11 UTC
This may have been intentional or an error. When a user has 'administer shoutbox' rights I expected they would have the ability to edit all shouts. Currently when such a user edits a shout none of the extended shout information is displayed: status, created/modified time, etc. When the user (perms: administer shoutbox) submits the edited shout its status is set to 0 and the shout is no longer displayed.
I believe the correct perms in the following snippet should be 'administer shoutbox'.
function shoutbox_edit_form_submit($form_id, $form_values) {
global $user;
if ($_POST['op'] == t('Update')) {
// get existing shout object
...
if (user_access('administer shouts')) { // should be 'administer shoutbox'?
db_query("UPDATE {shoutbox} SET
uid='%d',
nick='%s',
...
Alternatively you could simply add the 'administer shouts' permission to the perms list. Though that would be kind of redundant.
Comments
Comment #1
disterics commentedComment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.