diff --git a/templates/admin_search.tpl b/templates/admin_search.tpl
index d5a63339..6081410b 100644
--- a/templates/admin_search.tpl
+++ b/templates/admin_search.tpl
@@ -1,3 +1,9 @@
+
+
@@ -46,12 +63,16 @@ if (sizeof ($tAlias) > 0)
print " " . $tAlias[$i]['address'] . " | \n";
print " " . ereg_replace (",", " ", $tAlias[$i]['goto']) . " | \n";
print " " . $tAlias[$i]['modified'] . " | \n";
- if ($CONF['special_alias_control'] == 'YES')
+ if ($CONF['special_alias_control'] == 'YES' || check_admin($SESSID_USERNAME))
{
$active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
print " " . $active . " | \n";
print " " . $PALANG['edit'] . " | \n";
- print " " . $PALANG['del'] . " | \n";
+ print " " . $PALANG['del'] . " | \n";
}
else
{
@@ -91,6 +112,10 @@ if (sizeof ($tMailbox) > 0)
$colspan=2;
if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1;
if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1;
+
+ if (check_admin($SESSID_USERNAME) && $CONF['alias_control'] == 'YES') {
+ $colspan = 3;
+ }
print " | \n";
print " \n";
@@ -105,20 +130,33 @@ if (sizeof ($tMailbox) > 0)
print " " . $tMailbox[$i]['modified'] . " | \n";
$active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
print " " . $active . " | \n";
- if ($CONF['vacation_control_admin'] == 'YES')
- {
- $v_active = ($tMailbox[$i]['v_active'] == 1) ? $PALANG['pOverview_vacation_edit'] : '';
- print " " . $v_active . " | \n";
+
+$has_alias_control = 0; # temporary variable to simplify admin vs. superadmin code
+ if (check_admin($SESSID_USERNAME)) {
+ if ($CONF['alias_control'] == 'YES') $has_alias_control = 1;
+ } else {
+ if ($CONF['alias_control_admin'] == 'YES') $has_alias_control = 1;
+ if ($CONF['vacation_control_admin'] == 'YES')
+ {
+ $v_active = ($tMailbox[$i]['v_active'] == 1) ? $PALANG['pOverview_vacation_edit'] : '';
+ print " " . $v_active . " | \n";
+ }
}
- if ($CONF['alias_control_admin'] == 'YES')
+ if ($has_alias_control == 1)
{
print " " . $PALANG['pOverview_alias_edit'] . " | \n";
}
+
print " " . $PALANG['edit'] . " | \n";
- print " " . $PALANG['del'] . " | \n";
+ print " " . $PALANG['del'] . " | \n";
print " \n";
}
}
print "\n";
}
+# vim: ts=3 expandtab ft=php
?>