Changeset 1879

Show
Ignore:
Timestamp:
08/23/07 10:18:41 (1 year ago)
Author:
benjamin
Message:

we copy the default squirrelmail prefs in new accounts. Fixes #1015

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/trunk/bureau/class/m_mail.php

    r1821 r1879  
    535535 
    536536    $f=fopen("/var/lib/squirrelmail/data/".$mail."_".$dom.".pref","wb"); 
     537    $g=0; $g=@fopen("/etc/squirrelmail/default_pref","rb"); 
    537538    fputs($f,"email_address=$mail@$dom\nchosen_theme=default_theme.php\n"); 
     539    if ($g) { 
     540      while ($s=fgets($g,1024)) { 
     541        if (substr($s,0,14)!="email_address=" && substr($s,0,13)!="chosen_theme=") { 
     542          fputs($f,$s); 
     543        } 
     544      } 
     545      fclose($g); 
     546    } 
    538547    fclose($f); 
    539     $f=fopen("/var/lib/squirrelmail/data/".$mail."@".$dom.".pref","wb"); 
    540     fputs($f,"email_address=$mail@$dom\nchosen_theme=default_theme.php\n"); 
    541     fclose($f); 
     548    @copy("/var/lib/squirrelmail/data/".$mail."_".$dom.".pref","/var/lib/squirrelmail/data/".$mail."@".$dom.".pref"); 
    542549    exec("/usr/lib/alternc/mail_add ".$mail."_".$dom." ".$cuid); 
    543550    return true; 
  • alternc/trunk/debian/changelog

    r1878 r1879  
    11alternc (0.9.6.4) stable; urgency=low 
    22 
     3  * We copy /etc/squirrelmail/default_pref content for new accounts in _createpop (#1015) 
    34  * we configure postfix even if main.cf don't currently exist (#1009) 
    45  * Fixed the 'view' link issues (no urlencode) (#690)