diff --git a/include/staff/departments.inc.php b/include/staff/departments.inc.php index 6e5f35c2bc6a9a82adb5e571722e462a1af108ef..6e3076fc9564eaa7e71e8206dd10f39804872a61 100644 --- a/include/staff/departments.inc.php +++ b/include/staff/departments.inc.php @@ -91,7 +91,7 @@ $showing = $pageNav->showing().' '._N('department', 'departments', $count); ->limit($pageNav->getLimit()) ->offset($pageNav->getStart()); $defaultId=$cfg->getDefaultDeptId(); - $defaultEmailId = $cfg->getDefaultEmail()->getId(); + $defaultEmailId = $cfg->getDefaultEmailId(); $defaultEmailAddress = (string) $cfg->getDefaultEmail(); foreach ($depts as $dept) { $id = $dept->getId(); diff --git a/include/staff/emails.inc.php b/include/staff/emails.inc.php index a64186b5fadb26be460b8964c2b0330c6582afd2..cad6b890a84ae01b65a453c1de9a15287c6b2f1d 100644 --- a/include/staff/emails.inc.php +++ b/include/staff/emails.inc.php @@ -89,7 +89,7 @@ $def_priority = $cfg->getDefaultPriority()->getDesc(); foreach ($emails as $email) { $id = $email->getId(); $sel=false; - if ($ids && in_array($email, $ids)) + if ($ids && in_array($id, $ids)) $sel=true; $default=($id==$defaultId); ?> @@ -97,11 +97,13 @@ $def_priority = $cfg->getDefaultPriority()->getDesc(); <td width=7px> <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $id; ?>" - <?php echo $sel ? 'checked="checked"' : ''; ?> - <?php echo $default?'disabled="disabled"':''; ?>> + <?php echo $sel ? 'checked="checked" ' : ''; ?> + <?php echo $default?'disabled="disabled" ':''; ?>> </td> <td><span class="ltr"><a href="emails.php?id=<?php echo $id; ?>"><?php - echo Format::htmlchars((string) $email); ?></a></span></td> + echo Format::htmlchars((string) $email); ?></a></span> + <?php echo ($default) ?' <small>'.__('(Default)').'</small>' : ''; ?> + </td> <td><?php echo $email->priority ?: $def_priority; ?></td> <td><a href="departments.php?id=<?php $email->dept_id ?: $def_dept_id; ?>"><?php echo $email->dept ?: $def_dept_name; ?></a></td>