diff --git a/include/class.email.php b/include/class.email.php index 79b307dca3edaebedfcbdb8d63e68c31ed90e7b8..b03fbb6f07d5abb6aaa09d12cadc1fe884bd1042 100644 --- a/include/class.email.php +++ b/include/class.email.php @@ -292,10 +292,6 @@ class Email { $errors['mail_fetchfreq']='Fetch interval required'; if(!$vars['mail_fetchmax'] || !is_numeric($vars['mail_fetchmax'])) $errors['mail_fetchmax']='Maximum emails required'; - if(!$vars['dept_id'] || !is_numeric($vars['dept_id'])) - $errors['dept_id']='You must select a Dept.'; - if(!$vars['priority_id']) - $errors['priority_id']='You must select a priority'; if(!isset($vars['postfetch'])) $errors['postfetch']='Indicate what to do with fetched emails'; diff --git a/include/staff/emails.inc.php b/include/staff/emails.inc.php index 25d0660d024ebefe67591c6627f5af77595d9578..af919a762f4d9db08a1caa967d5b0b75df0e0323 100644 --- a/include/staff/emails.inc.php +++ b/include/staff/emails.inc.php @@ -41,6 +41,10 @@ if($res && ($num=db_num_rows($res))) else $showing='No emails found!'; +$def_dept_id = $cfg->getDefaultDeptId(); +$def_dept_name = $cfg->getDefaultDept()->getName(); +$def_priority = $cfg->getDefaultPriority()->getDesc(); + ?> <div style="width:700px;padding-top:5px; float:left;"> <h2>Email Addresses</h2> @@ -81,12 +85,13 @@ else ?> <tr id="<?php echo $row['email_id']; ?>"> <td width=7px> - <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['email_id']; ?>" + <input type="checkbox" class="ckb" name="ids[]" value="<?php echo $row['email_id']; ?>" <?php echo $sel?'checked="checked"':''; ?> <?php echo $default?'disabled="disabled"':''; ?>> </td> <td><a href="emails.php?id=<?php echo $row['email_id']; ?>"><?php echo Format::htmlchars($email); ?></a> </td> - <td><?php echo $row['priority']; ?></td> - <td><a href="departments.php?id=<?php echo $row['dept_id']; ?>"><?php echo $row['department']; ?></a></td> + <td><?php echo $row['priority'] ?: $def_priority; ?></td> + <td><a href="departments.php?id=<?php $row['dept_id'] ?: $def_dept_id; ?>"><?php + echo $row['department'] ?: $def_dept_name; ?></a></td> <td> <?php echo Format::db_date($row['created']); ?></td> <td> <?php echo Format::db_datetime($row['updated']); ?></td> </tr>