[PHP-CVS] cvs: CVSROOT / avail
rasmus Wed Jun 11 05:08:49 2003 EDT Modified files: /CVSROOTavail Log: 2 new phpdoc-es accounts. The first in the new effort to get the translation leads to contact potential new contributors and report back on whether they think the person is genuinely interested in helping and whether they would be useful or not. Index: CVSROOT/avail diff -u CVSROOT/avail:1.686 CVSROOT/avail:1.687 --- CVSROOT/avail:1.686 Tue Jun 10 15:26:02 2003 +++ CVSROOT/avail Wed Jun 11 05:08:48 2003 @@ -26,7 +26,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,spic,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,tony2001,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey|phpdoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-el
[PHP-CVS] cvs: php4 /ext/dom characterdata.c
rrichards Wed Jun 11 07:25:08 2003 EDT Modified files: /php4/ext/dom characterdata.c Log: add substringData, insertData, deleteData, replaceData fix reference links to specs Index: php4/ext/dom/characterdata.c diff -u php4/ext/dom/characterdata.c:1.3 php4/ext/dom/characterdata.c:1.4 --- php4/ext/dom/characterdata.c:1.3Tue Jun 10 16:03:27 2003 +++ php4/ext/dom/characterdata.cWed Jun 11 07:25:08 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: characterdata.c,v 1.3 2003/06/10 20:03:27 imajes Exp $ */ +/* $Id: characterdata.c,v 1.4 2003/06/11 11:25:08 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -30,7 +30,7 @@ /* * class domcharacterdata extends domnode * -* URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-FF21A306 +* URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-FF21A306 * Since: */ @@ -45,7 +45,7 @@ /* {{{ proto data string readonly=no -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-72AB8359 +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-72AB8359 Since: */ int dom_characterdata_data_read(dom_object *obj, zval **retval TSRMLS_DC) @@ -95,7 +95,7 @@ /* {{{ proto lengthunsigned long readonly=yes -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-7D61178C +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7D61178C Since: */ int dom_characterdata_length_read(dom_object *obj, zval **retval TSRMLS_DC) @@ -122,18 +122,57 @@ /* {{{ proto domstring dom_characterdata_substring_data(unsigned long offset, unsigned long count); -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-6531BCCF +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6531BCCF Since: */ PHP_FUNCTION(dom_characterdata_substring_data) { - DOM_NOT_IMPLEMENTED(); + xmlChar*cur; + xmlChar*substring; + xmlNodePtr node; + longoffset, count; + int length; + dom_object *intern; + + DOM_GET_THIS_OBJ(node, getThis(), xmlNodePtr, intern); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ll, offset, count) == FAILURE) { + return; + } + + cur = xmlNodeListGetString(node-doc, node, 1); + if (cur == NULL) { + RETURN_FALSE; + } + + length = xmlStrlen(cur); + + if (offset 0 || count 0 || offset length) { + xmlFree(cur); + php_dom_throw_error(INDEX_SIZE_ERR, return_value TSRMLS_CC); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Index Size Error); + RETURN_FALSE; + } + + if ((offset + count) length) { + count = length - offset; + } + + substring = xmlStrsub(cur, offset, count); + xmlFree(cur); + + if (substring) { + RETVAL_STRING(substring, 1); + xmlFree(substring); + } else { + RETVAL_EMPTY_STRING(); + } } /* }}} end dom_characterdata_substring_data */ /* {{{ proto dom_void dom_characterdata_append_data(string arg); -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-32791A2F +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-32791A2F Since: */ PHP_FUNCTION(dom_characterdata_append_data) @@ -159,33 +198,168 @@ /* {{{ proto dom_void dom_characterdata_insert_data(unsigned long offset, string arg); -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-3EDB695F +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3EDB695F Since: */ PHP_FUNCTION(dom_characterdata_insert_data) { - DOM_NOT_IMPLEMENTED(); + xmlChar *cur, *first, *second; + xmlNodePtr node; + char*arg; + longoffset; + int length, arg_len; + dom_object *intern; + + DOM_GET_THIS_OBJ(node, getThis(), xmlNodePtr, intern); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ls, offset, arg, arg_len) == FAILURE) { + return; + } + + cur = xmlNodeGetContent(node); + if (cur == NULL) { + RETURN_FALSE; + } + + length = xmlStrlen(cur); + + if (offset 0 || offset length) { + xmlFree(cur); + php_dom_throw_error(INDEX_SIZE_ERR, return_value TSRMLS_CC); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Index Size Error); + RETURN_FALSE; + } + + first = xmlStrndup(cur, offset); + second = xmlStrdup(cur + offset); + xmlFree(cur); + + xmlNodeSetContent(node, first); +
[PHP-CVS] cvs: php4 /ext/domxml config.m4
rrichards Wed Jun 11 15:25:32 2003 EDT Modified files: /php4/ext/domxmlconfig.m4 Log: update messages to require libxsl = 1.0.18 Index: php4/ext/domxml/config.m4 diff -u php4/ext/domxml/config.m4:1.46 php4/ext/domxml/config.m4:1.47 --- php4/ext/domxml/config.m4:1.46 Mon May 19 11:33:19 2003 +++ php4/ext/domxml/config.m4 Wed Jun 11 15:25:32 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.46 2003/05/19 15:33:19 sniper Exp $ +dnl $Id: config.m4,v 1.47 2003/06/11 19:25:32 rrichards Exp $ dnl AC_DEFUN(PHP_DOM_XSLT_CHECK_VERSION,[ @@ -29,9 +29,9 @@ yes #endif ],[ -AC_MSG_RESULT(= 1.0.3) +AC_MSG_RESULT(= 1.0.18) ],[ -AC_MSG_ERROR(libxslt version 1.0.3 or greater required.) +AC_MSG_ERROR(libxslt version 1.0.18 or greater required.) ]) CPPFLAGS=$old_CPPFLAGS ]) @@ -73,7 +73,7 @@ if test -z $DOMXSLT_DIR; then AC_MSG_RESULT(not found) -AC_MSG_ERROR(Please reinstall the libxslt = 1.0.3 distribution) +AC_MSG_ERROR(Please reinstall the libxslt = 1.0.18 distribution) fi PHP_DOM_XSLT_CHECK_VERSION @@ -113,7 +113,7 @@ if test -z $DOMEXSLT_DIR; then AC_MSG_RESULT(not found) -AC_MSG_ERROR(Please reinstall the libxslt = 1.0.3 distribution) +AC_MSG_ERROR(Please reinstall the libxslt = 1.0.18 distribution) fi PHP_DOM_EXSLT_CHECK_VERSION -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xsl config.m4
rrichards Wed Jun 11 15:27:01 2003 EDT Modified files: /php4/ext/xsl config.m4 Log: update messages to require libxsl = 1.0.18 Index: php4/ext/xsl/config.m4 diff -u php4/ext/xsl/config.m4:1.2 php4/ext/xsl/config.m4:1.3 --- php4/ext/xsl/config.m4:1.2 Fri Jun 6 02:32:16 2003 +++ php4/ext/xsl/config.m4 Wed Jun 11 15:27:01 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.2 2003/06/06 06:32:16 sniper Exp $ +dnl $Id: config.m4,v 1.3 2003/06/11 19:27:01 rrichards Exp $ dnl AC_DEFUN(PHP_XSL_CHECK_VERSION,[ @@ -20,7 +20,7 @@ ]) PHP_ARG_WITH(xsl, for XSL support, -[ --with-xsl[=DIR]Include new XSL support (requires libxslt = 1.0.3). +[ --with-xsl[=DIR]Include new XSL support (requires libxslt = 1.0.18). DIR is the libxslt install directory.]) if test $PHP_XSL != no; then @@ -35,7 +35,7 @@ if test -z $XSL_DIR; then AC_MSG_RESULT(not found) -AC_MSG_ERROR(Please reinstall the libxslt = 1.0.3 distribution) +AC_MSG_ERROR(Please reinstall the libxslt = 1.0.18 distribution) fi PHP_XSL_CHECK_VERSION -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dom text.c
rrichards Wed Jun 11 15:55:52 2003 EDT Modified files: /php4/ext/dom text.c Log: add isWhitespaceInElementContent() fix splitText for nodes not in tree correct links to specs Index: php4/ext/dom/text.c diff -u php4/ext/dom/text.c:1.6 php4/ext/dom/text.c:1.7 --- php4/ext/dom/text.c:1.6 Tue Jun 10 18:24:54 2003 +++ php4/ext/dom/text.c Wed Jun 11 15:55:52 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: text.c,v 1.6 2003/06/10 22:24:54 rrichards Exp $ */ +/* $Id: text.c,v 1.7 2003/06/11 19:55:52 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -76,7 +76,7 @@ /* {{{ proto wholeText string readonly=yes -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Text3-wholeText +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-wholeText Since: DOM Level 3 */ int dom_text_whole_text_read(dom_object *obj, zval **retval TSRMLS_DC) @@ -98,10 +98,8 @@ /* }}} */ - - /* {{{ proto domtext dom_text_split_text(unsigned long offset); -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-38853C1D +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since: */ PHP_FUNCTION(dom_text_split_text) @@ -148,9 +146,11 @@ xmlFree(first); xmlFree(second); - nnode-type = XML_ELEMENT_NODE; - xmlAddNextSibling(node, nnode); - nnode-type = XML_TEXT_NODE; + if (node-parent != NULL) { + nnode-type = XML_ELEMENT_NODE; + xmlAddNextSibling(node, nnode); + nnode-type = XML_TEXT_NODE; + } return_value = php_dom_create_object(nnode, ret, NULL, return_value, intern TSRMLS_CC); } @@ -158,18 +158,29 @@ /* {{{ proto boolean dom_text_is_whitespace_in_element_content(); -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Text3-isWhitespaceInElementContent +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3 */ PHP_FUNCTION(dom_text_is_whitespace_in_element_content) { - DOM_NOT_IMPLEMENTED(); + xmlNodePtr node; + dom_object *intern; + + DOM_GET_THIS_OBJ(node, getThis(), xmlNodePtr, intern); + + DOM_NO_ARGS(); + + if (xmlIsBlankNode(node)) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } } /* }}} end dom_text_is_whitespace_in_element_content */ /* {{{ proto domtext dom_text_replace_whole_text(string content); -URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Text3-replaceWholeText +URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3 */ PHP_FUNCTION(dom_text_replace_whole_text) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dom text.c
rrichards Wed Jun 11 16:06:03 2003 EDT Modified files: /php4/ext/dom text.c Log: forgot this: set doc for new text node as current may not be in tree Index: php4/ext/dom/text.c diff -u php4/ext/dom/text.c:1.7 php4/ext/dom/text.c:1.8 --- php4/ext/dom/text.c:1.7 Wed Jun 11 15:55:52 2003 +++ php4/ext/dom/text.c Wed Jun 11 16:06:03 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: text.c,v 1.7 2003/06/11 19:55:52 rrichards Exp $ */ +/* $Id: text.c,v 1.8 2003/06/11 20:06:03 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -141,7 +141,7 @@ xmlFree(cur); xmlNodeSetContentLen(node, first, offset); - nnode = xmlNewText(second); + nnode = xmlNewDocText(node-doc, second); xmlFree(first); xmlFree(second); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / php_spl.c php_spl.h spl_engine.c spl_foreach.c
helly Wed Jun 11 16:51:14 2003 EDT Modified files: /splphp_spl.c php_spl.h spl_engine.c spl_foreach.c Log: WS and removing unecessary things Index: spl/php_spl.c diff -u spl/php_spl.c:1.6 spl/php_spl.c:1.7 --- spl/php_spl.c:1.6 Wed Jun 4 16:54:13 2003 +++ spl/php_spl.c Wed Jun 11 16:51:14 2003 @@ -164,6 +164,7 @@ REGISTER_SPL_STD_CLASS(spl, array_writer_default, spl_array_writer_default_create); REGISTER_SPL_FUNCTIONS(spl, array_writer_default, spl_array_writer_funcs); #endif + return SUCCESS; } /* }}} */ @@ -205,6 +206,7 @@ #ifdef SPL_ARRAY_WRITE ZEND_EXECUTE_HOOK_RESTORE(ZEND_ASSIGN); #endif /* SPL_ARRAY_WRITE */ + return SUCCESS; } /* }}} */ Index: spl/php_spl.h diff -u spl/php_spl.h:1.3 spl/php_spl.h:1.4 --- spl/php_spl.h:1.3 Wed Jun 4 16:54:13 2003 +++ spl/php_spl.h Wed Jun 11 16:51:14 2003 @@ -58,7 +58,6 @@ #define ZEND_EXECUTE_HOOK_FUNCTION(name) \ int spl_handler_ ## name(ZEND_OPCODE_HANDLER_ARGS) - ZEND_BEGIN_MODULE_GLOBALS(spl) #ifdef SPL_FOREACH ZEND_EXECUTE_HOOK_PTR(ZEND_FE_RESET); Index: spl/spl_engine.c diff -u spl/spl_engine.c:1.6 spl/spl_engine.c:1.7 --- spl/spl_engine.c:1.6Wed Jun 4 16:54:13 2003 +++ spl/spl_engine.cWed Jun 11 16:51:14 2003 @@ -184,7 +184,6 @@ int (*orig_unary_op)(zval *result, zval *op1); int (*orig_binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC); zend_class_entry *current_scope; - zend_class_entry *calling_scope = NULL; zval *current_this; zend_execute_data execute_data; va_list args; @@ -200,7 +199,6 @@ EX(opline) = NULL; EX(object) = *object_pp; - calling_scope = obj_ce; original_function_state_ptr = EG(function_state_ptr); if (fn_proxy *fn_proxy) { @@ -231,13 +229,15 @@ ALLOC_ZVAL(new_zval); *new_zval = *arg; zval_copy_ctor(new_zval); - new_zval-refcount = 1; + new_zval-refcount = 2; + new_zval-is_ref = 1; arg-refcount--; - arg = new_zval; + param = new_zval; + } else { + arg-refcount++; + arg-is_ref = 1; + param = arg; } - arg-refcount++; - arg-is_ref = 1; - param = arg; } else if (arg != EG(uninitialized_zval)) { arg-refcount++; param = arg; @@ -250,15 +250,15 @@ } va_end(args); - zend_ptr_stack_n_push(EG(argument_stack), 2, (void *) (long) param_count, NULL); + zend_ptr_stack_push(EG(argument_stack), (void *) (long) param_count); + zend_ptr_stack_push(EG(argument_stack), NULL); EG(function_state_ptr) = EX(function_state); current_scope = EG(scope); - EG(scope) = calling_scope; + EG(scope) = obj_ce; current_this = EG(This); - EG(This) = *object_pp; if (!PZVAL_IS_REF(EG(This))) { @@ -309,7 +309,7 @@ EG(binary_op) = orig_binary_op; } else { ALLOC_INIT_ZVAL(*retval); - ((zend_internal_function *) EX(function_state).function)-handler(param_count, *retval, (object_pp?*object_pp:NULL), 1 TSRMLS_CC); + ((zend_internal_function *) EX(function_state).function)-handler(param_count, *retval, *object_pp, 1 TSRMLS_CC); INIT_PZVAL(*retval); } zend_ptr_stack_clear_multiple(TSRMLS_C); Index: spl/spl_foreach.c diff -u spl/spl_foreach.c:1.11 spl/spl_foreach.c:1.12 --- spl/spl_foreach.c:1.11 Mon Jun 9 12:58:51 2003 +++ spl/spl_foreach.c Wed Jun 11 16:51:14 2003 @@ -33,9 +33,6 @@ #define OPTIMIZED_ARRAY_CONSTRUCT -#define ezalloc(size) \ - memset(emalloc(size), 0, size) - typedef struct { zend_function *next; zend_function *rewind; @@ -81,8 +78,8 @@ PZVAL_LOCK(retval); } else if (is_a SPL_IS_A_FORWARD) { spl_unlock_zval_ptr_ptr(EX(opline)-op1, EX(Ts) TSRMLS_CC); - (*obj)-refcount += 2; /* lock two times */ retval = *obj; + retval-refcount += 2; /* lock two times */ } else { ZEND_EXECUTE_HOOK_ORIGINAL(ZEND_FE_RESET); } @@ -98,9 +95,10 @@ /* And pack it into a zval. Since it is nowhere accessible using a * zval of type STRING is the fastest approach of storing the proxy. */ - ALLOC_INIT_ZVAL(retval); + ALLOC_ZVAL(retval); ZVAL_STRINGL(retval, (char*)proxy, sizeof(spl_foreach_proxy)-1, 0); -
[PHP-CVS] cvs: php4 /ext/pspell pspell.c
iliaa Wed Jun 11 21:47:12 2003 EDT Modified files: /php4/ext/pspellpspell.c Log: Added missing safe_mode/open_basedir checks. Index: php4/ext/pspell/pspell.c diff -u php4/ext/pspell/pspell.c:1.33 php4/ext/pspell/pspell.c:1.34 --- php4/ext/pspell/pspell.c:1.33 Tue Jun 10 16:03:35 2003 +++ php4/ext/pspell/pspell.cWed Jun 11 21:47:12 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.33 2003/06/10 20:03:35 imajes Exp $ */ +/* $Id: pspell.c,v 1.34 2003/06/12 01:47:12 iliaa Exp $ */ #define IS_EXT_MODULE @@ -206,6 +206,15 @@ config = new_pspell_config(); convert_to_string_ex(personal); + + if (PG(safe_mode) (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, personal, Z_STRVAL_PP(personal)); pspell_config_replace(config, save-repl, false); @@ -737,6 +746,15 @@ } convert_to_string_ex(personal); + + if (PG(safe_mode) (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, personal, Z_STRVAL_PP(personal)); RETURN_TRUE; @@ -768,6 +786,15 @@ pspell_config_replace(config, save-repl, true); convert_to_string_ex(repl); + + if (PG(safe_mode) (!php_checkuid(Z_STRVAL_PP(repl), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(repl) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, repl, Z_STRVAL_PP(repl)); RETURN_TRUE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/pspell pspell.c
iliaa Wed Jun 11 21:47:29 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/pspellpspell.c Log: MFH: Added missing safe_mode/open_basedir checks. Index: php4/ext/pspell/pspell.c diff -u php4/ext/pspell/pspell.c:1.28.8.2 php4/ext/pspell/pspell.c:1.28.8.3 --- php4/ext/pspell/pspell.c:1.28.8.2 Wed May 21 19:08:27 2003 +++ php4/ext/pspell/pspell.cWed Jun 11 21:47:28 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.28.8.2 2003/05/21 23:08:27 jay Exp $ */ +/* $Id: pspell.c,v 1.28.8.3 2003/06/12 01:47:28 iliaa Exp $ */ #define IS_EXT_MODULE @@ -206,6 +206,15 @@ config = new_pspell_config(); convert_to_string_ex(personal); + + if (PG(safe_mode) (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, personal, Z_STRVAL_PP(personal)); pspell_config_replace(config, save-repl, false); @@ -737,6 +746,15 @@ } convert_to_string_ex(personal); + + if (PG(safe_mode) (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, personal, Z_STRVAL_PP(personal)); RETURN_TRUE; @@ -768,6 +786,15 @@ pspell_config_replace(config, save-repl, true); convert_to_string_ex(repl); + + if (PG(safe_mode) (!php_checkuid(Z_STRVAL_PP(repl), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(repl) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, repl, Z_STRVAL_PP(repl)); RETURN_TRUE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php