On gère la lettre @ differement, car elle represente le mail catch all

Closes: #694
This commit is contained in:
Nahuel Angelinetti 2006-06-28 23:16:33 +00:00
parent 30587b8345
commit 735a4b82f3
1 changed files with 5 additions and 1 deletions

View File

@ -105,7 +105,11 @@ class m_mail {
function enum_doms_mails($dom,$sort=0,$letter="") {
global $err,$cuid,$db;
$err->log("mail","enum_doms_mails",$dom);
$db->query("SELECT mail,pop,alias FROM mail_domain WHERE mail LIKE '".addslashes($letter)."%@".addslashes($dom)."' AND uid='$cuid' AND type=0;");
if($letter == "@")
$letter = "";
else
$letter = "%$letter";
$db->query("SELECT mail,pop,alias FROM mail_domain WHERE mail LIKE '".addslashes($letter)."@".addslashes($dom)."' AND uid='$cuid' AND type=0;");
$res=array(); $i=0;
while ($db->next_record()) {
if ($db->f("pop")) {