Changeset 3147 for alternc/trunk/bureau/class/m_mail_localbox.php
- Timestamp:
- 05/09/12 18:31:58 (13 months ago)
- File:
-
- 1 edited
-
alternc/trunk/bureau/class/m_mail_localbox.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alternc/trunk/bureau/class/m_mail_localbox.php
r3144 r3147 60 60 */ 61 61 function set_localbox($mail_id){ 62 global $db, $err ;63 $err->log("localbox","set_localbox ");62 global $db, $err, $hooks; 63 $err->log("localbox","set_localbox!!!!!!!!"); 64 64 $path="mail/"; 65 65 if(!$db->query("select distinct left(ad.address,1) as letter,ad.address ,d.domaine from address ad, domaines d where ad.domain_id = d.id and ad.id = $mail_id order by letter;")); … … 68 68 return null; 69 69 } 70 //FIXME passer par un hooks pour squirel 71 $hooks->invoke('hooks_squirrelmail_init',(array($db->f('address'),$db->f('domaine') ))); 70 72 $path="/var/alternc/mail/".$db->f('letter')."/".$db->f('address')."_".$db->f('domaine'); 71 //FIXME faire un touch de la maildir si dovecot ne sait pas le faire.72 73 if(!$db->query("INSERT into mailbox (address_id,path,quota) values ($mail_id,'$path',50);")); 73 74 74 75 } 75 76 76 77 /* 77 * Set a localbox78 * Unset a localbox 78 79 * @param integer $mail_id 79 80 */ 80 81 function unset_localbox($mail_id){ 81 global $db, $err; 82 $err->log("localbox","set_localbox"); 82 global $db, $err,$hooks; 83 $err->log("localbox","unset_localbox"); 84 if(!$db->query("select address,domaine from address,domaines where address.domain_id=domaines.id and address.id=$mail_id ;")); 85 86 if(! $db->next_record()){ 87 return null; 88 } 89 $hooks->invoke('hooks_squirrelmail_delete',(array($db->f('address'),$db->f('domaine') ))); 83 90 if(!$db->query("DELETE from mailbox where address_id=$mail_id;")); 84 91
Note: See TracChangeset
for help on using the changeset viewer.
