@@ -132,6 +132,7 @@ function_entry imap_functions[] = {
132
132
#if defined(HAVE_IMAP2000 ) || defined (HAVE_IMAP2001 )
133
133
PHP_FE (imap_get_quota , NULL )
134
134
PHP_FE (imap_set_quota , NULL )
135
+ PHP_FE (imap_setacl , NULL )
135
136
#endif
136
137
137
138
#ifndef PHP_WIN32
@@ -1058,6 +1059,36 @@ PHP_FUNCTION(imap_set_quota)
1058
1059
RETURN_LONG (imap_setquota (imap_le_struct -> imap_stream , Z_STRVAL_PP (qroot ), & limits ));
1059
1060
}
1060
1061
/* }}} */
1062
+
1063
+
1064
+ /* {{{ proto int imap_setacl(int stream_id, string mailbox, string id, string rights)
1065
+ Sets the ACL for a giving mailbox */
1066
+ PHP_FUNCTION (imap_setacl )
1067
+ {
1068
+ zval * * streamind , * * mailbox , * * id , * * rights ;
1069
+ int ind , ind_type ;
1070
+ pils * imap_le_struct ;
1071
+
1072
+ if (ZEND_NUM_ARGS () != 4 || zend_get_parameters_ex (4 , & streamind , & mailbox , & id , & rights ) == FAILURE ) {
1073
+ ZEND_WRONG_PARAM_COUNT ();
1074
+ }
1075
+
1076
+ convert_to_long_ex (streamind );
1077
+ convert_to_string_ex (mailbox );
1078
+ convert_to_string_ex (id );
1079
+ convert_to_string_ex (rights );
1080
+
1081
+ ind = Z_LVAL_PP (streamind );
1082
+ imap_le_struct = (pils * ) zend_list_find (ind , & ind_type );
1083
+ if (!imap_le_struct || !IS_STREAM (ind_type )) {
1084
+ php_error (E_WARNING , "Unable to find stream pointer" );
1085
+ RETURN_FALSE ;
1086
+ }
1087
+
1088
+ RETURN_LONG (imap_setacl (imap_le_struct -> imap_stream , Z_STRVAL_PP (mailbox ), Z_STRVAL_PP (id ), Z_STRVAL_PP (rights )));
1089
+ }
1090
+ /* }}} */
1091
+
1061
1092
#endif
1062
1093
1063
1094
0 commit comments