Go to the source code of this file.
Functions | |
| _mail_addUserToGroup ($user, $group) | |
| _mail_baseEdit ($ldapArr, $postArr) | |
| display normal edit | |
| _mail_baseGroupEdit ($ldapArr, $postArr) | |
| (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com (c) 2007-2008 Mandriva, http://www.mandriva.com/ | |
| _mail_changeGroup ($postArr) | |
| function called when you submit while editing a group | |
| _mail_changeUserPrimaryGroup ($user, $newgroup, $oldgroup) | |
| _mail_delGroup ($group) | |
| _mail_delUserFromGroup ($user, $group) | |
| _mail_addUserToGroup | ( | $ | user, | |
| $ | group | |||
| ) |
Definition at line 111 of file publicFunc.php.
References $group, $user, and syncMailGroupAliases().
00111 { 00112 syncMailGroupAliases($group, $user); 00113 }

| _mail_baseEdit | ( | $ | ldapArr, | |
| $ | postArr | |||
| ) |
display normal edit
| $postArr | $_POST array of the page | |
| $ldapArr | ldap array return by getDetailedUser xmlrpc function |
Definition at line 132 of file publicFunc.php.
References $f, hasMailObjectClass(), and hasVDomainSupport().

| _mail_baseGroupEdit | ( | $ | ldapArr, | |
| $ | postArr | |||
| ) |
(c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com (c) 2007-2008 Mandriva, http://www.mandriva.com/
This file is part of Mandriva Management Console (MMC).
MMC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
MMC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with MMC; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 29 of file publicFunc.php.
References $param, $test, computeMailGroupAlias(), getVDomains(), hasGroupMailObjectClass(), hasVDomainSupport(), and print.
00029 { 00030 if (!isset($ldapArr["cn"][0])) return; 00031 00032 print "<div class=\"formblock\" style=\"background-color: #FFD;\">"; 00033 print "<h3>"._T("Mail plugin","mail")."</h3>\n"; 00034 $mail = ""; 00035 $maildomain = ""; 00036 if (hasGroupMailObjectClass($ldapArr['cn'][0])) { 00037 $hasMail = "checked"; 00038 if (isset($ldapArr["mail"])) $mail = $ldapArr["mail"][0]; 00039 if (hasVDomainSupport()) { 00040 $tmparr = explode("@", $mail); 00041 $mail = $tmparr[0]; 00042 $maildomain = $tmparr[1]; 00043 } 00044 } else { 00045 $mail = computeMailGroupAlias($ldapArr['cn'][0]); 00046 $hasMail = ""; 00047 if (hasVDomainSupport()) { 00048 $vdomains = getVDomains(""); 00049 if (count($vdomains) == 1) $maildomain = $vdomains[0][1]["virtualdomain"][0]; 00050 } 00051 } 00052 00053 if (($hasMail == "") && ($mail == "")) { 00054 print _T("No mail alias can be set for this group", "mail"); 00055 } else { 00056 print '<table cellspacing="0">'; 00057 $test = new TrFormElement(_T("Enable mail alias for users of this group ","mail"), new CheckboxTpl("mailgroupaccess")); 00058 $param = array("value" => $hasMail, 00059 "extraArg" => 'onclick="toggleVisibility(\'maildiv\');"'); 00060 $test->display($param); 00061 print "</table>"; 00062 if (!$hasMail) { 00063 $style = 'style =" display: none;"'; 00064 } 00065 00066 print '<div id="maildiv" '.$style.'>'; 00067 print '<table cellspacing="0">'; 00068 if (!hasVDomainSupport()) { 00069 $m = new TrFormElement(_T("Mail alias", "mail"), new InputTpl("mailgroupalias")); 00070 $m->displayRo(array("value" => $mail)); 00071 } else { 00072 print '<tr><td width="40%" style="text-align: right;">' . _T("Mail alias", "mail") . '</td><td>' . $mail . '<input type="hidden" value="' . $mail . '" name="mailgroupalias"> @ '; 00073 print '<input type="text" id="autocomplete" name="maildomain" value="' . $maildomain . '" /><div id="autocomplete_choices" class="autocomplete"></div>'; 00074 print '<script type="text/javascript">new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "modules/mail/mail/ajaxMailDomainFilter.php", {paramName: "value"});</script>'; 00075 print '</td></tr>'; 00076 } 00077 print "</table>"; 00078 print "</div>"; 00079 } 00080 00081 print "</div>"; 00082 }

| _mail_changeGroup | ( | $ | postArr | ) |
function called when you submit while editing a group
| $postArr | $_POST array of the page |
Definition at line 88 of file publicFunc.php.
References $group, addMailGroup(), deleteMailGroupAliases(), hasGroupMailObjectClass(), hasVDomainSupport(), removeMailGroup(), and syncMailGroupAliases().
00088 { 00089 $group = $postArr["groupname"]; 00090 if (!empty($postArr["mailgroupaccess"])) { 00091 $mail = $postArr["mailgroupalias"]; 00092 if (hasVDomainSupport()) { 00093 $vdomain = $postArr["maildomain"]; 00094 $mail .= "@" . $vdomain; 00095 } 00096 addMailGroup($group, $mail); 00097 syncMailGroupAliases($group); 00098 } else { // mail group access is not checked 00099 if (hasGroupMailObjectClass($group)) { 00100 deleteMailGroupAliases($group); 00101 removeMailGroup($group); 00102 } 00103 } 00104 }

| _mail_changeUserPrimaryGroup | ( | $ | user, | |
| $ | newgroup, | |||
| $ | oldgroup | |||
| ) |
Definition at line 106 of file publicFunc.php.
References $user, and syncMailGroupAliases().
00106 { 00107 syncMailGroupAliases($oldgroup, $user); 00108 syncMailGroupAliases($newgroup, $user); 00109 }

| _mail_delGroup | ( | $ | group | ) |
When deleting a user group, also delete all mail aliases associated to this group
Definition at line 119 of file publicFunc.php.
References $group, and deleteMailGroupAliases().
00119 { 00123 deleteMailGroupAliases($group); 00124 }

| _mail_delUserFromGroup | ( | $ | user, | |
| $ | group | |||
| ) |
Definition at line 115 of file publicFunc.php.
References $group, $user, and syncMailGroupAliases().
00115 { 00116 syncMailGroupAliases($group, $user); 00117 }

1.5.8