Show "edited by admin" only when editing someone elses message

Started by MobileCS, May 13, 2015, 12:59:20 PM

Previous topic - Next topic

MobileCS

I'm using SMF 1.1.21 and I was wondering ... is it possible to only show "edited by admin" when editing someone else's message - but keep your own "edited by" name when editing your own post?

This is as far as I have got, and don't know where to go from here.

Sources/Post.php
// Have admins allowed people to hide their screwups?
if (time() - $row['posterTime'] > $modSettings['edit_wait_time'] || $ID_MEMBER != $row['ID_MEMBER'])
{
$msgOptions['modify_time'] = time();
if (allowedTo('moderate_forum'))
{
$msgOptions['modify_name'] = 'admin';
}
else
{
$msgOptions['modify_name'] = addslashes($user_info['name']);
}
}

MobileCS

This code appears to working - let me know if I'm handling it wrong.


                // Have admins allowed people to hide their screwups?
                if (time() - $row['posterTime'] > $modSettings['edit_wait_time'] || $ID_MEMBER != $row['ID_MEMBER'])
{
$msgOptions['modify_time'] = time();
if (allowedTo('moderate_forum'))
{
if ($row['posterName'] == $user_info['name'])
{
$msgOptions['modify_name'] = addslashes($user_info['name']);
}
else
{
$msgOptions['modify_name'] = 'admin';
}
}
else
{
$msgOptions['modify_name'] = addslashes($user_info['name']);
}
}

Advertisement: