|
28 | 28 | $search_atype=$_SESSION['alias_type'];
|
29 | 29 |
|
30 | 30 | $implicit_domain = get_settings_value("implicit_domain");
|
31 |
| -$show_one_option = get_settings_value("show_one_option"); |
32 |
| - |
33 |
| -require_once("../../../tools/system/domains/lib/functions.inc.php"); |
34 |
| -$domains = get_domains("user_management", false); |
35 | 31 |
|
| 32 | +$suppress_alias_type = get_settings_value("suppress_alias_type"); |
36 | 33 | $alias_types = get_alias_types();
|
37 | 34 | ?>
|
38 | 35 |
|
|
46 | 43 | value="<?=$search_ausername?>" maxlength="16" class="searchInput"></td>
|
47 | 44 | </tr>
|
48 | 45 |
|
49 |
| -<?php if ($show_one_option || count($domains) != 1) { ?> |
50 | 46 | <tr>
|
51 | 47 | <td class="searchRecord" align="left">Domain</td>
|
52 | 48 | <td class="searchRecord" width="200"><?php print_domains("domain",$search_domain,TRUE);?></td>
|
53 | 49 | </tr>
|
54 |
| -<?php } ?> |
55 | 50 |
|
56 | 51 | <tr>
|
57 | 52 | <td class="searchRecord" align="left">Alias Username</td>
|
58 | 53 | <td class="searchRecord" width="200"><input type="text" name="alias_username"
|
59 | 54 | value="<?=$search_aaliasusername?>" maxlength="16" class="searchInput"></td>
|
60 | 55 | </tr>
|
61 | 56 |
|
62 |
| -<?php if (!$implicit_domain && ($show_one_option || count($domains) != 1)) { ?> |
| 57 | +<?php if (!$implicit_domain) { ?> |
63 | 58 | <tr>
|
64 | 59 | <td class="searchRecord" align="left">Alias Domain</td>
|
65 | 60 | <td class="searchRecord" width="200"><?php print_domains("alias_domain",$search_adomain,TRUE);?></td>
|
66 | 61 | </tr>
|
67 | 62 | <?php } ?>
|
68 | 63 |
|
69 |
| -<?php |
70 |
| -if (!$show_one_option && count($domains) == 1) { |
71 |
| - $search_domain = $domains[0]; |
72 |
| - $search_adomain = $domains[0]; |
73 |
| -} |
74 |
| -?> |
75 |
| - |
76 |
| -<?php if ($show_one_option || count($alias_types) != 1) { ?> |
| 64 | +<?php if (!$suppress_alias_type || count($alias_types) != 1) { ?> |
77 | 65 | <tr>
|
78 | 66 | <td class="searchRecord" align="left">Alias Type</td>
|
79 | 67 | <td class="searchRecord" width="200"><?php print_aliasType($search_atype,TRUE)?></td>
|
80 | 68 | </tr>
|
81 | 69 | <?php } ?>
|
82 | 70 |
|
83 | 71 | <?php
|
84 |
| -if (!$show_one_option && count($alias_types) == 1) { |
| 72 | +if ($suppress_alias_type && count($alias_types) == 1) { |
85 | 73 | $search_atype = $alias_types[0]['label'];
|
86 | 74 | }
|
87 | 75 | ?>
|
|
109 | 97 | <?php
|
110 | 98 | if (!$implicit_domain)
|
111 | 99 | echo('<th class="listTitle">Alias Domain</th>');
|
| 100 | +if (!$suppress_alias_type || count($alias_types) != 1) |
| 101 | + echo('<th class="listTitle">Alias Type</th>'); |
112 | 102 | ?>
|
113 |
| -<th class="listTitle">Alias Type</th> |
114 | 103 | <th class="listTitle">Username</th>
|
115 | 104 | <th class="listTitle">Domain</th>
|
116 | 105 | <?php
|
|
155 | 144 | $labels[$options[$k]['value']] = $options[$k]['label'];
|
156 | 145 |
|
157 | 146 | if(!$_SESSION['read_only']){
|
158 |
| - $colspan = $implicit_domain ? 6 : 7; |
| 147 | + $colspan = 7; |
| 148 | + if ($implicit_domain) |
| 149 | + $colspan--; |
| 150 | + if ($suppress_alias_type && count($alias_types) == 1) |
| 151 | + $colspan--; |
159 | 152 | }else{
|
160 | 153 | $colspan = 5;
|
161 | 154 | }
|
|
309 | 302 | <?php
|
310 | 303 | if (!$implicit_domain)
|
311 | 304 | echo('<td class="'.$row_style.'"> '.$resultset[$i]['alias_domain'].'</td>');
|
| 305 | + if (!$suppress_alias_type || count($alias_types) != 1) |
| 306 | + echo('<td class="'.$row_style.'"> '.(isset($labels[$table])?$labels[$table]:$table).'</td>'); |
312 | 307 | ?>
|
313 |
| - <td class="<?=$row_style?>"> <?=(isset($labels[$table])?$labels[$table]:$table)?></td> |
314 | 308 | <td class="<?=$row_style?>"> <?=$resultset[$i]['username']?></td>
|
315 | 309 | <td class="<?=$row_style?>"> <?=$resultset[$i]['domain']?></td>
|
316 | 310 | <?php
|
|
0 commit comments