SMF Development > Fixed or Bogus Bugs
2.0.2, useless permission title
Doctor Deejay:
G'day :) So I'm back again ;D When you disable the calendar or just don't enable it, the "select a permission" dropdown doesn't display the permissions of the calendar, but it does display "[Calendar]", which doesn't make sense when there are no permissions for it (as the calendar has been disabled). So far I've got no idea how to fix it, though. Using SMF 2.0.2, no mods installed :)
Yoshi:
What "select a permission" dropdown are you talking about?
Doctor Deejay:
When you go to the manage permissions page, you see a list of groups and below that, you'll see some other things, like remove permissions and add permissions. I mean that one :)
Yoshi:
Oh, that thing. Let me seek the code for it in a minute.
emanuele:
mmm...
ManagePermissions.php
--- Code: (find) --- ksort($context['permissions'][$permissionType]['columns']);
}
// Check we don't leave any empty groups - and mark hidden ones as such.
foreach ($context['permissions'][$permissionType]['columns'] as $column => $groups)
foreach ($groups as $id => $group)
{
if (empty($group['permissions']))
unset($context['permissions'][$permissionType]['columns'][$column][$id]);
else
{
$foundNonHidden = false;
foreach ($group['permissions'] as $permission)
if (empty($permission['hidden']))
$foundNonHidden = true;
if (!$foundNonHidden)
$context['permissions'][$permissionType]['columns'][$column][$id]['hidden'] = true;
}
}
--- End code ---
--- Code: (replace with) --- ksort($context['permissions'][$permissionType]['columns']);
// Check we don't leave any empty groups - and mark hidden ones as such.
foreach ($context['permissions'][$permissionType]['columns'] as $column => $groups)
foreach ($groups as $id => $group)
{
if (empty($group['permissions']))
unset($context['permissions'][$permissionType]['columns'][$column][$id]);
else
{
$foundNonHidden = false;
foreach ($group['permissions'] as $permission)
if (empty($permission['hidden']))
$foundNonHidden = true;
if (!$foundNonHidden)
$context['permissions'][$permissionType]['columns'][$column][$id]['hidden'] = true;
}
}
}
--- End code ---
* emanuele hopes this doesn't break anything else...
* emanuele waits a bit before apply it. ::)
Navigation
[0] Message Index
[#] Next page
Go to full version