Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40092 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85257 invoked from network); 26 Aug 2008 14:13:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2008 14:13:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.178 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.178 mho-01-bos.mailhop.org Received: from [63.208.196.178] ([63.208.196.178:65305] helo=mho-01-bos.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/04-03121-78F04B84 for ; Tue, 26 Aug 2008 10:13:28 -0400 Received: from a88-112-30-186.elisa-laajakaista.fi ([88.112.30.186] helo=localhost.localdomain) by mho-01-bos.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KXzIS-000Bwb-9I; Tue, 26 Aug 2008 14:13:24 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 88.112.30.186 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+DjpeSiS29wXiQ4HTgPHQkqdVzTLgzB6Y= Message-ID: <48B40F50.20008@sci.fi> Date: Tue, 26 Aug 2008 17:12:32 +0300 Reply-To: jani.taskinen@iki.fi User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Diego Woitasen CC: internals@lists.php.net References: <20080821005220.GA23091@motherbox.xtech.com.ar> <48ACCB1E.8030607@sci.fi> <54207.190.190.22.29.1219756536.squirrel@webmail.xtech.com.ar> In-Reply-To: <54207.190.190.22.29.1219756536.squirrel@webmail.xtech.com.ar> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] add imap_myrights From: jani.taskinen@sci.fi (Jani Taskinen) Diego Woitasen wrote: > On Wed, August 20, 2008 10:55 pm, Jani Taskinen wrote: >> Diego Woitasen kirjoitti: >>> Hi, >>> I attach the patch that adds imap_myrights function to IMAP module. >>> MYRIGHTS is a standard IMAP command defined in RFC 2086. >>> >>> diff -u -r php-5.2.6/ext/imap/php_imap.c >>> php-myrights/ext/imap/php_imap.c >>> --- php-5.2.6/ext/imap/php_imap.c Thu Apr 17 13:04:49 2008 >>> +++ php-myrights/ext/imap/php_imap.c Tue Jun 3 18:06:37 2008 >>> @@ -154,6 +154,7 @@ >>> PHP_FE(imap_set_quota, NULL) >>> PHP_FE(imap_setacl, NULL) >>> PHP_FE(imap_getacl, NULL) >>> + PHP_FE(imap_myrights, NULL) >>> #endif >>> >>> PHP_FE(imap_mail, NULL) >>> @@ -413,6 +414,20 @@ >>> } >>> /* }}} */ >>> >>> +/* {{{ mail_myrights >>> + * >>> + * Mail MYRIGHTS callback >>> + * Called via the mail_parameter function in >>> c-client:src/c-client/mail.c >>> + */ >>> +void mail_myrights(MAILSTREAM *stream, char *mailbox, char *rights) >>> +{ >>> + TSRMLS_FETCH(); >>> + >>> + ZVAL_STRING(IMAPG(imap_acl_list), rights, 1) >>> + >>> +} >>> +/* }}} */ >>> + >>> #endif >> Does this really work? You're blindly overwriting the acl global, >> AFAICT..? >> Or is that intentional? > > Yes, it works. I use the imap_getacl() function as example to write > imap_myrights(). What's the problem with overwriting acl global? So you don't use imap_setacl/imap_getacl ?? Or care if someone else does? I'm not sure how this really works, but it doesn't sound quite right.. --Jani