Skip to content
This repository
Browse code

1. Fixed issues #4

2. Compatible with php trunk
  • Loading branch information...
commit d473a48d670ccbb3ec69f0755d18d6be047cc590 1 parent f8bbe99
Xinchen Hui authored August 17, 2012
2  CREDITS
... ...
@@ -1,2 +1,2 @@
1 1
 Yaf
2  
-Xinchen Hui<Laruence@php.net>
  2
+Xinchen Hui
3  php_yaf.h
@@ -14,7 +14,7 @@
14 14
   +----------------------------------------------------------------------+
15 15
 */
16 16
 
17  
-/* $Id: php_yaf.h 326615 2012-07-12 09:10:29Z laruence $ */
  17
+/* $Id: php_yaf.h 327064 2012-08-12 03:04:55Z laruence $ */
18 18
 
19 19
 #ifndef PHP_YAF_H
20 20
 #define PHP_YAF_H
@@ -73,7 +73,6 @@ extern zend_module_entry yaf_module_entry;
73 73
 #define yaf_session_t		zval
74 74
 #define yaf_exception_t		zval
75 75
 
76  
-extern PHPAPI int  php_register_info_logo(char *logo_string, const char *mimetype, const unsigned char *data, int size);
77 76
 extern PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC);
78 77
 extern PHPAPI void php_debug_zval_dump(zval **struc, int level TSRMLS_DC);
79 78
 
4  routes/static.c
@@ -14,7 +14,7 @@
14 14
   +----------------------------------------------------------------------+
15 15
  */
16 16
 
17  
-/* $Id: static.c 326904 2012-07-31 15:00:05Z laruence $ */
  17
+/* $Id: static.c 327068 2012-08-12 08:04:53Z laruence $ */
18 18
 
19 19
 zend_class_entry * yaf_route_static_ce;
20 20
 
@@ -196,7 +196,7 @@ zend_function_entry yaf_route_static_methods[] = {
196 196
 YAF_STARTUP_FUNCTION(route_static) {
197 197
 	zend_class_entry ce;
198 198
 
199  
-	YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Static", "Yaf\\Route\\Static", yaf_route_static_methods);
  199
+	YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Static", "Yaf\\Route_Static", yaf_route_static_methods);
200 200
 	yaf_route_static_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
201 201
 	zend_class_implements(yaf_route_static_ce TSRMLS_CC, 1, yaf_router_ce);
202 202
 
7  yaf.c
@@ -14,7 +14,7 @@
14 14
   +----------------------------------------------------------------------+
15 15
 */
16 16
 
17  
-/* $Id: yaf.c 325605 2012-05-09 07:16:31Z laruence $ */
  17
+/* $Id: yaf.c 327064 2012-08-12 03:04:55Z laruence $ */
18 18
 
19 19
 #ifdef HAVE_CONFIG_H
20 20
 #include "config.h"
@@ -100,7 +100,9 @@ PHP_MINIT_FUNCTION(yaf)
100 100
 {
101 101
 	REGISTER_INI_ENTRIES();
102 102
 
  103
+#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 5 
103 104
 	php_register_info_logo(YAF_LOGO_GUID, YAF_LOGO_MIME_TYPE, yaf_logo, sizeof(yaf_logo));
  105
+#endif
104 106
 
105 107
 #ifdef YAF_HAVE_NAMESPACE
106 108
 	if(YAF_G(use_namespace)) {
@@ -232,12 +234,13 @@ PHP_RSHUTDOWN_FUNCTION(yaf)
232 234
 PHP_MINFO_FUNCTION(yaf)
233 235
 {
234 236
 	php_info_print_table_start();
235  
-	if (PG(expose_php)) {
  237
+	if (PG(expose_php) && !sapi_module.phpinfo_as_text) {
236 238
 		php_info_print_table_header(2, "yaf support", YAF_LOGO_IMG"enabled");
237 239
 	} else {
238 240
 		php_info_print_table_header(2, "yaf support", "enabled");
239 241
 	}
240 242
 
  243
+
241 244
 	php_info_print_table_row(2, "Version", YAF_VERSION);
242 245
 	php_info_print_table_row(2, "Supports", YAF_SUPPORT_URL);
243 246
 	php_info_print_table_end();
4  yaf_config.c
@@ -14,7 +14,7 @@
14 14
   +----------------------------------------------------------------------+
15 15
 */
16 16
 
17  
-/* $Id: yaf_config.c 325800 2012-05-25 03:25:11Z laruence $ */
  17
+/* $Id: yaf_config.c 327093 2012-08-13 06:04:16Z laruence $ */
18 18
 
19 19
 #ifdef HAVE_CONFIG_H
20 20
 #include "config.h"
@@ -55,7 +55,7 @@ static zval * yaf_config_ini_zval_losable(zval *zvalue TSRMLS_DC);
55 55
 */
56 56
 static int yaf_config_ini_modified(zval * file, long ctime TSRMLS_DC) {
57 57
 	zval  n_ctime;
58  
-	php_stat(Z_STRVAL_P(file), Z_STRLEN_P(file), 7 /*YAF_FS_CTIME*/ , &n_ctime TSRMLS_CC);
  58
+	php_stat(Z_STRVAL_P(file), Z_STRLEN_P(file), 7 /* FS_CTIME */ , &n_ctime TSRMLS_CC);
59 59
 	if (Z_TYPE(n_ctime) != IS_BOOL && ctime != Z_LVAL(n_ctime)) {
60 60
 		return Z_LVAL(n_ctime);
61 61
 	}
43  yaf_logo.h
@@ -14,16 +14,17 @@
14 14
   +----------------------------------------------------------------------+
15 15
 */
16 16
 
17  
-/* $Id: yaf_logo.h 321289 2011-12-21 02:53:29Z laruence $ */
  17
+/* $Id: yaf_logo.h 327064 2012-08-12 03:04:55Z laruence $ */
18 18
 
19 19
 #ifndef YAF_LOGO_H
20 20
 #define YAF_LOGO_H
21 21
 
  22
+#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 5 
22 23
 #define YAF_LOGO_MIME_TYPE "image/png"
23 24
 #define YAF_LOGO_GUID	   "YAF-LOGO-LARUNECE-COM"
24 25
 #define YAF_SUPPORT_URL	   "http://pecl.php.net/package/yaf"
25 26
 #define YAF_LOGO_IMG       "<a href=" YAF_SUPPORT_URL "> \
26  
-						   <img src=\"?="YAF_LOGO_GUID"\" alt=\"Yaf logo\" /></a>\n"
  27
+						   <img src=\"" YAF_LOGO_GUID "\" alt=\"Yaf logo\" /></a>\n"
27 28
 
28 29
 static const unsigned char yaf_logo[] = {
29 30
   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
@@ -170,6 +171,44 @@ static const unsigned char yaf_logo[] = {
170 171
   0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
171 172
 };
172 173
 
  174
+extern PHPAPI int  php_register_info_logo(char *logo_string, const char *mimetype, const unsigned char *data, int size);
  175
+#else
  176
+#define YAF_LOGO_BASE64    "iVBORw0KGgoAAAANSUhEUgAAAB8AAAAVCAYAAAC+NTVfAAAABGdBTUEAALGPC/xhBQAAAAlwSFlz" \
  177
+"AAALEAAACxABrSO9dQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngA" \
  178
+"AAYaSURBVEhLlVUJTJRHFEYEhXIoQm0EQyKklkMOOSxqI1awUDUchogGEDEgoMJ6IaigIMgtDZcY" \
  179
+"VhCxQBEs5VixiNoCCgQTuZSG1sa2EUlLi0K9XV6/N4mEFbS6yWZ/+Gfmfdd7o6T0jh8iUu7r69O6" \
  180
+"evWq2lRb+H13d3dpV1fXo+rqanMzM7MZ73j01MvOnTs3/ciRIyoHDhwwCQ0NdUThkvb29vALFy7M" \
  181
+"fH3HyMjIhzKZLPDkyZN9MTEx/zg4OPjwXoCa9t4g2tra5ufk5Lj6+Ph4bdmy5S9vb286fvw4oUBP" \
  182
+"XV2d9ZsOLCwstMjLy3vq5ub2y549ezwA3Oy9it+5c2dWU1NTUnh4+PDKlSvJ1NSUDh48SElJSc/B" \
  183
+"rKG2ttbq1YHMrLOz87OioqJN165d29TT0+NXX18/vHHjRvL19X0O0DLss3pnBW7cuOGRkZHxk5WV" \
  184
+"Fenq6hL8IwsLixcbNmyoOHPmjPNEJux1R0dH6KlTp77Bu9GamhqqqKigffv2ERQjyC/fvn379wBt" \
  185
+"878KwOdZ2Jzr7u4+pqWlRWpqaqSnp8cHPSgtLf10qgM4hPBXf/fu3cXBwcEvXFxcKCQkhLKysmj5" \
  186
+"8uXk6OgoDwgIiG9padF6K4CoqCjnzZs33zQ2NiZlZWVSVVUlPz8/KigoCOC0X7p0ybCkpCQZUuZV" \
  187
+"Vlbmwf88BDC/oaHhYw7mjh07Up2dnYm//v7+BO/J3NycVqxY0R4YGOjwxuK9vb2akCcmIiLiGUut" \
  188
+"rq5O+vr6MsgZ0d/fPxPI3SHrj1DgsVQqlfMXSsmh1Bg8b8FzFM7wOXHiRKGlpWX3vHnzyM7OjkxM" \
  189
+"TMjGxubp1q1bw2DpB1MCACMdMErjVK9bt47gFUVGRroz48HBwWYwvNvY2EgXL14kFGA1CEBEGBMT" \
  190
+"Ewns/z579mzVwMCAKTLz1bJly8jIyIhghVBgzZo10XivrVAcfikj2bZBQUHhhw8fDoV0//LisLAw" \
  191
+"AqMBqPErBsfY9evX6fLly8QAuPDRo0cJNtGxY8eoubmZYAmhRZ9cuXKlv6ysrA3KELym9evXk62t" \
  192
+"Le3atasdKsZkZ2frjgPgYbJ///4vwfKPtLS02L179+Z4enqSgYEBoxXIq6qqCK1E2MyACDOAAFq8" \
  193
+"A2jREcyS36G/KT8/Xw6JRV40NTVp1apVtG3btqcAUAlb9RXYo2Wm37p1yxsDYgCMH8Hbl3wQQiQU" \
  194
+"ABMCI4LvBOQEddhHgrcCJAeTi2AoiRbjwLm6utKCBQto8eLFLz08PP5MSEiIg4IfwVZ1EJ6hxKwh" \
  195
+"p8ErJJjNNmCXEhcXVw/fhlne1NRU0bfl5eWCGRdesmQJzZkzR8wBbW1t0tDQEACsra2JVUNBMjQ0" \
  196
+"pNWrVxPG7RAUjUY27MD6c+QqLD4+3k8JUtp/jQ8kdIOHbjjY7dUzpO5gmZk9e5uZmUkAJSTkJM+d" \
  197
+"O5dmz54tZoGKigrp6OiId6yGvb09cb+jbVm5YdwNvbD2pkQi6QAYGaz5Tqm1tdX70KFD0tjYWCmC" \
  198
+"I925c6cUqCpR6B4Wi8CgRcQvpx+zW/QvJhctXLhQSM3DiEFwUZYbQ4UlH0MW5ADO33sIcg06Ihwd" \
  199
+"4YRxrDGp3ZKTk+fDM39sSsd0qk5PT5cBWB3QPl66dKk4nIFwoHiCYXYLdl5eXqI1165dK3yG1M8g" \
  200
+"/Q9YF49zEsA+H89d6KhinPcF7FMfL87zOTc31xKMyjFW72JRBQq6QIlF6OdFKDgARi9RbBDeNyLh" \
  201
+"ElgkSUlJEb8AKQE7CS4RCQ5/gsCNRkdHx3ABvlBQWA973GHdt/h/MzrFfPyi4aQjVJ6QvAMoA1Dw" \
  202
+"kwm3ljIs+Q29OoLfIAyY8RttqkmFcfsAqR5FWEXxiR8MqzDU6VS45RgFUmgDthF4Vn3t1pqG//c5" \
  203
+"OTm9gGetANaINkzEEFK4JLBPBcyM0A0jSPbo6dOnJxUfGhqaj4AnYiAZKqBCImcikTpTsUHqszk8" \
  204
+"7C+uVR4qP2PUek1ci/lQAEb9kF2OC2T09u3bk4rz+ocPH+pi+CgQfOtNhytTE2zLkPbfEbTC4uLi" \
  205
+"SIXQYDf+bjp//jzPATneF92/f39yol+r8h/ztexGHYdU2gAAAABJRU5ErkJggg=="
  206
+#define YAF_LOGO_DATA      "data:image/png;base64," YAF_LOGO_BASE64
  207
+#define YAF_SUPPORT_URL	   "http://pecl.php.net/package/yaf"
  208
+#define YAF_LOGO_IMG       "<a href=" YAF_SUPPORT_URL "> \
  209
+						   <img src=\"" YAF_LOGO_DATA "\" alt=\"Yaf logo\" /></a>\n"
  210
+
  211
+#endif
173 212
 #endif
174 213
 
175 214
 /*

0 notes on commit d473a48

Please sign in to comment.
Something went wrong with that request. Please try again.