Skip to content

Commit

Permalink
Synced with pecl-svn (yaf-2.1.15 released)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed May 8, 2012
1 parent 1c24138 commit 1d6b812
Show file tree
Hide file tree
Showing 27 changed files with 725 additions and 251 deletions.
115 changes: 103 additions & 12 deletions package2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,19 @@
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2012-04-01</date>
<time>18:34:23</time>
<date>2012-05-07</date>
<time>16:26:23</time>
<version>
<release>2.1.10</release>
<api>2.1.10</api>
<release>2.1.15</release>
<api>2.1.15</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Improved Yaf_Config_Ini::__Construct performance, and reduce memory consumption
- Fixed bug #61493 (Can't remove item when using unset() with a Yaf_Config_Simple instance)
- Support controller autoloading(Only default module)
- Fixed bug that the controller name could be lowercase in routeShutdown hook
- Fixed bug that segfault while attempt to free owrite_handler
- Added Yaf_Controller::$yafAutoRender to controller render
- Fixed some memory leaks
- Fixed typo variable name in static route(affect 2.1.14)
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -130,6 +124,11 @@
<file name="030.phpt" role="test" />
<file name="031.phpt" role="test" />
<file name="032.phpt" role="test" />
<file name="033.phpt" role="test" />
<file name="034.phpt" role="test" />
<file name="035.phpt" role="test" />
<file name="036.phpt" role="test" />
<file name="037.phpt" role="test" />
<file name="bug61493.phpt" role="test" />
<file name="simple.ini" role="test" />
</dir>
Expand All @@ -149,6 +148,99 @@
<providesextension>yaf</providesextension>
<extsrcrelease />
<changelog>
<release>
<date>2012-05-07</date>
<version>
<release>2.1.15</release>
<api>2.1.15</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed typo variable name in static route(affect 2.1.14)
</notes>
</release>

<release>
<date>2012-05-05</date>
<version>
<release>2.1.14</release>
<api>2.1.14</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed Bug that if no routes success router will throw exception(since 2.1.13 Yaf supports configure default route by application.ini)
- Fixed Bug that 'foo/index' router result as c => index a => foo
</notes>
</release>
<release>
<date>2012-04-24</date>
<version>
<release>2.1.13</release>
<api>2.1.13</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Added Yaf_View_Simple::eval
- Supported short_open_tag in Yaf_View_Simple
- Fixed a potential segfault while alternately access two yaf application host in one machine
- Improve the Yaf_Route_Static/Supervar::route logic
- Fixed bug that 404 occurred if the request is prefix with more than one slash
- Fixed bug that free NULL pointer in Yaf_Loader::registerLocalNameSpace
</notes>
</release>
<release>
<date>2012-04-18</date>
<version>
<release>2.1.12</release>
<api>2.1.12</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed bug that baseUri set to wrong value (affected version: 2.1.10, 2.1.11)
- Fixed bug Yaf_View_Simple crash while calling assign if construct it with no tpl_dir
- Fixed bug that Yaf_View_Simple::display doesn't convert controller name
</notes>
</release>
<release>
<date>2012-04-11</date>
<version>
<release>2.1.11</release>
<api>2.1.11</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Improve Yaf_Config parsing performance, if the wanted section was parsed, then overpass the rest sections
- Now catchException will failover to the default moudle error handler
- Added Yaf_View_Simple::clear
- Support set default route by config(appliation.dispatcher.defaultRoute)
- Support adding Yaf_Route_Map by config
- Allow Yaf_View_Simple::get(void)
- Fixed Bug that Yaf_Config_Ini will take part of the section
- Fixed bug that yaf_config_ini_deep_copy is not much deepy.
- Fixed bug Yaf_Route_Simple dont respect application.modules configure
- Fixed some memory leaks
</notes>
</release>
<release>
<date>2012-04-01</date>
<version>
Expand All @@ -169,7 +261,6 @@
- Fixed some memory leaks
</notes>
</release>

<release>
<date>2012-03-20</date>
<version>
Expand Down
4 changes: 2 additions & 2 deletions php_yaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: php_yaf.h 324890 2012-04-06 05:46:43Z laruence $ */
/* $Id: php_yaf.h 325566 2012-05-07 08:35:35Z laruence $ */

#ifndef PHP_YAF_H
#define PHP_YAF_H
Expand All @@ -41,7 +41,7 @@ extern zend_module_entry yaf_module_entry;
#define YAF_G(v) (yaf_globals.v)
#endif

#define YAF_VERSION "2.1.11-dev"
#define YAF_VERSION "2.1.16-dev"

#define YAF_STARTUP_FUNCTION(module) ZEND_MINIT_FUNCTION(yaf_##module)
#define YAF_RINIT_FUNCTION(modle) ZEND_RINIT_FUNCTION(yaf_##module)
Expand Down
14 changes: 13 additions & 1 deletion requests/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: http.c 321289 2011-12-21 02:53:29Z laruence $ */
/* $Id: http.c 325431 2012-04-24 07:41:42Z laruence $ */

#include "ext/standard/url.h"

Expand Down Expand Up @@ -124,6 +124,18 @@ yaf_request_t * yaf_request_http_instance(yaf_request_t *this_ptr, char *request
}

if (settled_uri) {
char *p = Z_STRVAL_P(settled_uri);

while (*p == '/' && *(p + 1) == '/') {
p++;
}

if (p != Z_STRVAL_P(settled_uri)) {
char *garbage = Z_STRVAL_P(settled_uri);
ZVAL_STRING(settled_uri, p, 1);
efree(garbage);
}

zend_update_property(yaf_request_http_ce, instance, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_URI), settled_uri TSRMLS_CC);
yaf_request_set_base_uri(instance, base_uri, Z_STRVAL_P(settled_uri) TSRMLS_CC);
zval_ptr_dtor(&settled_uri);
Expand Down
4 changes: 2 additions & 2 deletions routes/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: interface.c 324890 2012-04-06 05:46:43Z laruence $ */
/* $Id: interface.c 325413 2012-04-23 09:19:44Z laruence $ */

#include "ext/standard/php_smart_str.h"

Expand Down Expand Up @@ -44,7 +44,7 @@ zend_class_entry *yaf_route_ce;

/* {{{ yaf_route_t * yaf_route_instance(yaf_route_t *this_ptr, zval *config TSRMLS_DC)
*/
yaf_route_t * yaf_route_instance(yaf_route_t *this_ptr, zval *config TSRMLS_DC) {
yaf_route_t * yaf_route_instance(yaf_route_t *this_ptr, zval *config TSRMLS_DC) {
zval **match, **def, **map, **ppzval;
yaf_route_t *instance = NULL;

Expand Down
7 changes: 5 additions & 2 deletions routes/simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: simple.c 321289 2011-12-21 02:53:29Z laruence $ */
/* $Id: simple.c 325432 2012-04-24 09:06:40Z laruence $ */

zend_class_entry *yaf_route_simple_ce;

Expand Down Expand Up @@ -50,7 +50,10 @@ int yaf_route_simple_route(yaf_route_t *route, yaf_request_t *request TSRMLS_DC)
return 0;
}

zend_update_property(yaf_request_ce, request, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_MODULE), module TSRMLS_CC);
if (Z_TYPE_P(module) == IS_STRING && yaf_application_is_module_name(Z_STRVAL_P(module), Z_STRLEN_P(module) TSRMLS_CC)) {
zend_update_property(yaf_request_ce, request, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_MODULE), module TSRMLS_CC);
}

zend_update_property(yaf_request_ce, request, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_CONTROLLER), controller TSRMLS_CC);
zend_update_property(yaf_request_ce, request, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_ACTION), action TSRMLS_CC);

Expand Down
Loading

0 comments on commit 1d6b812

Please sign in to comment.