diff --git a/package2.xml b/package2.xml index f20eecae..7b7f5c21 100644 --- a/package2.xml +++ b/package2.xml @@ -13,8 +13,8 @@ 2012-09-07 - 2.2.1 - 2.2.1 + 2.2.2 + 2.2.2 beta @@ -22,18 +22,9 @@ PHP - - (Repackage, previous one missed one fix) - - Implemented Yaf_Response::setBody with key(which will make the layout easier to implement) - - New method Yaf_View_Simple::eval, Yaf_View_Simple::clear - - Support short open tag in view templates regardless of php.short_open_tag - - Make Yaf_Autoload faster(30%) - - Controller of default module can be autoloaded now - - Single class can be local class now (previous is a design issue) - - Performance improve in various place - - Compatible with php5.5, which droped PHP logo guid - - Fixed bug that Supervar should not respect the base_uri - - Implemented FR #62702 (Make baseuri case-insensitive) - - Implemented FR #62638 (Supports set yaf runtime configuration via application.ini) + - Yaf_Controller's methods are not final anymore + - Yaf_View_Simple is not final anymore + - Memleaks fixed in various place diff --git a/requests/http.c b/requests/http.c index 25293a56..941e8202 100644 --- a/requests/http.c +++ b/requests/http.c @@ -181,8 +181,10 @@ PHP_METHOD(yaf_request_http, isXmlHttpRequest) { zval * header = yaf_request_query(YAF_GLOBAL_VARS_SERVER, ZEND_STRL("HTTP_X_REQUESTED_WITH") TSRMLS_CC); if (Z_TYPE_P(header) == IS_STRING && strncasecmp("XMLHttpRequest", Z_STRVAL_P(header), Z_STRLEN_P(header)) == 0) { + zval_ptr_dtor(&header); RETURN_TRUE; } + zval_ptr_dtor(&header); RETURN_FALSE; } /* }}} */ diff --git a/requests/simple.c b/requests/simple.c index 6f7812fe..dfe5e6ae 100644 --- a/requests/simple.c +++ b/requests/simple.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simple.c 327554 2012-09-09 04:49:24Z laruence $ */ +/* $Id: simple.c 327580 2012-09-10 06:31:34Z laruence $ */ static zend_class_entry *yaf_request_simple_ce; diff --git a/tests/052.phpt b/tests/052.phpt index 4354e02d..fadbcf4b 100644 --- a/tests/052.phpt +++ b/tests/052.phpt @@ -26,6 +26,10 @@ echo "------params-------\n"; var_dump($request->setParam("xxxx")); var_dump($request->getParam("xxxx")); var_dump($request->getParams()); +echo "-----others-----\n"; +var_dump($request->isXmlHttpRequest()); +var_dump($request->isCli()); +var_dump($request->isPost()); ?> --EXPECTF-- Warning: Yaf_Request_Http::__construct() expects at most 2 parameters, 3 given in %s052.php on line %d @@ -56,3 +60,7 @@ NULL NULL array(0) { } +-----others----- +bool(false) +bool(true) +bool(false) diff --git a/yaf.c b/yaf.c index c7c03eaf..50b48959 100644 --- a/yaf.c +++ b/yaf.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf.c 327514 2012-09-07 04:31:34Z laruence $ */ +/* $Id: yaf.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/yaf_application.c b/yaf_application.c index 6d33c19a..ee5152fe 100644 --- a/yaf_application.c +++ b/yaf_application.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_application.c 327549 2012-09-09 03:02:48Z laruence $ */ +/* $Id: yaf_application.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/yaf_controller.c b/yaf_controller.c index 2c2bf752..33bb0b7c 100644 --- a/yaf_controller.c +++ b/yaf_controller.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_controller.c 327561 2012-09-09 06:30:22Z laruence $ */ +/* $Id: yaf_controller.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/yaf_dispatcher.c b/yaf_dispatcher.c index 4b5f9b8a..e59821ad 100644 --- a/yaf_dispatcher.c +++ b/yaf_dispatcher.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_dispatcher.c 327562 2012-09-09 06:54:44Z laruence $ */ +/* $Id: yaf_dispatcher.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -700,6 +700,7 @@ int yaf_dispatcher_handle(yaf_dispatcher_t *dispatcher, yaf_request_t *request, zend_update_property(ce, iaction, ZEND_STRL(YAF_CONTROLLER_PROPERTY_NAME_NAME), controller TSRMLS_CC); zend_update_property(ce, iaction, ZEND_STRL(YAF_ACTION_PROPERTY_NAME_CTRL), icontroller TSRMLS_CC); + zval_ptr_dtor(&icontroller); if (fptr->common.num_args) { zval *method_name = NULL; @@ -784,7 +785,6 @@ int yaf_dispatcher_handle(yaf_dispatcher_t *dispatcher, yaf_request_t *request, } } else { zval_ptr_dtor(&executor); - zval_ptr_dtor(&action); } } zval_ptr_dtor(&action); diff --git a/yaf_loader.c b/yaf_loader.c index 7215de4e..511cb219 100644 --- a/yaf_loader.c +++ b/yaf_loader.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_loader.c 327560 2012-09-09 06:09:27Z laruence $ */ +/* $Id: yaf_loader.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/yaf_loader.h b/yaf_loader.h index 3937bdc5..fb4277c3 100644 --- a/yaf_loader.h +++ b/yaf_loader.h @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_loader.h 327509 2012-09-07 03:26:22Z laruence $ */ +/* $Id: yaf_loader.h 327580 2012-09-10 06:31:34Z laruence $ */ #ifndef YAF_LOADER_H #define YAF_LOADER_H diff --git a/yaf_request.c b/yaf_request.c index 778fbe71..f8872372 100644 --- a/yaf_request.c +++ b/yaf_request.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_request.c 327552 2012-09-09 03:52:28Z laruence $*/ +/* $Id: yaf_request.c 327580 2012-09-10 06:31:34Z laruence $*/ #ifdef HAVE_CONFIG_H #include "config.h" @@ -345,7 +345,7 @@ zval * yaf_request_get_language(yaf_request_t *instance TSRMLS_DC) { zval * accept_langs = yaf_request_query(YAF_GLOBAL_VARS_SERVER, ZEND_STRL("HTTP_ACCEPT_LANGUAGE") TSRMLS_CC); if (IS_STRING != Z_TYPE_P(accept_langs) || !Z_STRLEN_P(accept_langs)) { - return lang; + return accept_langs; } else { char *ptrptr, *seg; uint prefer_len = 0; diff --git a/yaf_response.c b/yaf_response.c index 6ef230c7..191f22de 100644 --- a/yaf_response.c +++ b/yaf_response.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_response.c 327560 2012-09-09 06:09:27Z laruence $ */ +/* $Id: yaf_response.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/yaf_router.h b/yaf_router.h index 3f206351..e6332731 100644 --- a/yaf_router.h +++ b/yaf_router.h @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_router.h 321289 2011-12-21 02:53:29Z laruence $ */ +/* $Id: yaf_router.h 327580 2012-09-10 06:31:34Z laruence $ */ #ifndef YAF_ROUTER_H #define YAF_ROUTER_H diff --git a/yaf_session.c b/yaf_session.c index ac60f0e7..b99ee427 100644 --- a/yaf_session.c +++ b/yaf_session.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_session.c 327425 2012-09-02 03:58:49Z laruence $ */ +/* $Id: yaf_session.c 327580 2012-09-10 06:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h"