[dev] update to cyrsql

Ilya mail at krel.org
Thu Feb 13 22:32:12 PST 2003


sorry, forgot that subfolder creation changes with virtual domains.
this takes care of delete. if anyone created users with previouse driver they
need to delete the mess it created manually. instead of
user.name.folder at domain.com i was creating user.name at doman.com.folder


On Thu, Feb 13, 2003 at 02:05:20PM -0500, Chuck Hagenbuch wrote:
> Quoting Ilya <mail at krel.org>:
> 
> > The attached diff introduces virtual domain support for cyrus (2.2a).
> > It is backwards compatible. Only if 'domain' is set the new code kicks in.
> > This is not finished yet, user rename is not supported now. User creation in
> > defaultdomain (without @fqdn.com part) is not supported.
> > If 'domain' is set users can only be created as user at virtualdomain.com.
> > There also seems to be a bug in deleting virtual users (subfolders are
> > left over).
> 
> Committed, thanks.
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck at horde.org>
> must ... find ... acorns ... *thud*
> 
> -- 
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
-------------- next part --------------
--- cyrsql.php.new	Thu Feb 13 21:56:12 2003
+++ cyrsql.php	Thu Feb 13 22:25:43 2003
@@ -258,10 +258,19 @@
      */
     function _createSubFolders($value, $key, $userName)
     {
-        @imap_createmailbox($this->_imapStream, 
-                            imap_utf7_encode($this->_params['imap_dsn'] .
-                            'user' . $this->_separator . $userName . 
-                                     $this->_separator . $value));
+        if (array_key_exists('domain_field', $this->_params) &&
+                            ($this->_params['domain_field'] != 'none')){
+             list($name,$domain)=explode('@',$userName);
+             @imap_createmailbox($this->_imapStream, 
+                           	    imap_utf7_encode($this->_params['imap_dsn'] .
+                                'user' . $this->_separator . $name . 
+                                         $this->_separator . $value . '@' . $domain));
+        } else {
+             @imap_createmailbox($this->_imapStream,
+                                imap_utf7_encode($this->_params['imap_dsn'] .
+                                'user' . $this->_separator . $userName .
+                                         $this->_separator . $value));
+        }
     }
 
     /**


More information about the dev mailing list