helly Wed Dec 31 13:25:21 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2 zend_builtin_functions.c /php-src/main main.c Log: MFH - Register engine classes when and where they should be - Show core module version as PHP version http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.25.2.42&r2=1.277.2.12.2.25.2.43&diff_format=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.42 ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.43 --- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.42 Wed Dec 31 12:26:33 2008 +++ ZendEngine2/zend_builtin_functions.c Wed Dec 31 13:25:21 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.42 2008/12/31 12:26:33 helly Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.43 2008/12/31 13:25:21 helly Exp $ */ #include "zend.h" #include "zend_API.h" @@ -292,6 +292,8 @@ INIT_CLASS_ENTRY(class_entry, "stdClass", NULL); zend_standard_class_def = zend_register_internal_class(&class_entry TSRMLS_CC); + zend_register_default_classes(TSRMLS_C); + return SUCCESS; } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.38&r2=1.640.2.23.2.57.2.39&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.38 php-src/main/main.c:1.640.2.23.2.57.2.39 --- php-src/main/main.c:1.640.2.23.2.57.2.38 Wed Dec 31 11:15:47 2008 +++ php-src/main/main.c Wed Dec 31 13:25:21 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.38 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.39 2008/12/31 13:25:21 helly Exp $ */ /* {{{ includes */ @@ -1606,6 +1606,14 @@ } /* }}} */ +PHP_MINFO_FUNCTION(php_core) { /* {{{ */ + php_info_print_table_start(); + php_info_print_table_row(2, "PHP Version", PHP_VERSION); + php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); +} +/* }}} */ + /* {{{ php_register_extensions */ int php_register_extensions(zend_module_entry **ptr, int count TSRMLS_DC) @@ -1663,6 +1671,7 @@ zend_utility_values zuv; int module_number=0; /* for REGISTER_INI_ENTRIES() */ char *php_os; + zend_module_entry *module; #ifdef ZTS zend_executor_globals *executor_globals; void ***tsrm_ls; @@ -1875,9 +1884,6 @@ return FAILURE; } - /* Register internal Zend classes */ - zend_register_default_classes(TSRMLS_C); - /* startup extensions staticly compiled in */ if (php_register_internal_extensions_func(TSRMLS_C) == FAILURE) { php_printf("Unable to start builtin modules\n"); @@ -1904,6 +1910,12 @@ /* start Zend extensions */ zend_startup_extensions(); + /* make core report what it should */ + if (zend_hash_find(&module_registry, "core", sizeof("core"), (void**)&module)==SUCCESS) { + module->version = PHP_VERSION; + module->info_func = PHP_MINFO(php_core); + } + #ifdef ZTS zend_post_startup(TSRMLS_C); #endif
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php