From: Sascha Schumann Date: Thu, 7 Dec 2000 13:07:18 +0000 (+0000) Subject: Axe rest of DAV leftovers and use STD_PHP_INI_ENTRY in the INI section X-Git-Tag: php-4.0.5RC1~975 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ddb725f91cc82a5134269f77b367230289b19cf;p=php Axe rest of DAV leftovers and use STD_PHP_INI_ENTRY in the INI section --- diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 085a15fe78..16faa88fac 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -59,9 +59,6 @@ #include "util_script.h" #include "mod_php4.h" -#if HAVE_MOD_DAV -# include "mod_dav.h" -#endif #undef shutdown @@ -724,46 +721,6 @@ void php_init_handler(server_rec *s, pool *p) } -#if HAVE_MOD_DAV - -extern int phpdav_mkcol_test_handler(request_rec *r); -extern int phpdav_mkcol_create_handler(request_rec *r); - -/* conf is being read twice (both here and in send_php()) */ -int send_parsed_php_dav_script(request_rec *r) -{ - php_apache_info_struct *conf; - - conf = (php_apache_info_struct *) get_module_config(r->per_dir_config, - &php4_module); - return send_php(r, 0, 0, conf->dav_script); -} - -static int php_type_checker(request_rec *r) -{ - php_apache_info_struct *conf; - - conf = (php_apache_info_struct *)get_module_config(r->per_dir_config, - &php4_module); - - /* If DAV support is enabled, use mod_dav's type checker. */ - if (conf->dav_script) { - dav_api_set_request_handler(r, send_parsed_php_dav_script); - dav_api_set_mkcol_handlers(r, phpdav_mkcol_test_handler, - phpdav_mkcol_create_handler); - /* leave the rest of the request to mod_dav */ - return dav_api_type_checker(r); - } - - return DECLINED; -} - -#else /* HAVE_MOD_DAV */ - -# define php_type_checker NULL - -#endif /* HAVE_MOD_DAV */ - handler_rec php_handlers[] = { @@ -799,7 +756,7 @@ module MODULE_VAR_EXPORT php4_module = NULL, /* check_user_id */ NULL, /* check auth */ NULL, /* check access */ - php_type_checker, /* type_checker */ + NULL, /* type_checker */ NULL, /* fixups */ NULL /* logger */ #if MODULE_MAGIC_NUMBER >= 19970103 diff --git a/sapi/apache/mod_php4.h b/sapi/apache/mod_php4.h index 9a2efe0428..3b2813dad4 100644 --- a/sapi/apache/mod_php4.h +++ b/sapi/apache/mod_php4.h @@ -29,7 +29,6 @@ typedef struct { long engine; long last_modified; - char *dav_script; long xbithack; } php_apache_info_struct; diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 1aab409f0f..efa9a07afa 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -73,42 +73,10 @@ function_entry apache_functions[] = { }; -static PHP_INI_MH(OnChangeApacheInt) -{ - long *p; - char *base = (char *) &php_apache_info; - - p = (long *) (base+(size_t) mh_arg1); - - if (new_value) { - *p = atoi(new_value); - return SUCCESS; - } else { - return FAILURE; - } -} - - -static PHP_INI_MH(OnChangeApacheString) -{ - char **p; - char *base = (char *) &php_apache_info; - - p = (char **) (base+(size_t) mh_arg1); - - if (new_value) { - *p = new_value; - return SUCCESS; - } else { - return FAILURE; - } -} - PHP_INI_BEGIN() - PHP_INI_ENTRY1("xbithack", "0", PHP_INI_ALL, OnChangeApacheInt, (void *) XtOffsetOf(php_apache_info_struct, xbithack)) - PHP_INI_ENTRY1("engine", "1", PHP_INI_ALL, OnChangeApacheInt, (void *) XtOffsetOf(php_apache_info_struct, engine)) - PHP_INI_ENTRY1("last_modified", "0", PHP_INI_ALL, OnChangeApacheInt, (void *) XtOffsetOf(php_apache_info_struct, last_modified)) - PHP_INI_ENTRY1("dav_script", NULL, PHP_INI_ALL, OnChangeApacheString, (void *) XtOffsetOf(php_apache_info_struct, dav_script)) + STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateInt, xbithack, php_apache_info_struct, php_apache_info) + STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateInt, engine, php_apache_info_struct, php_apache_info) + STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateInt, last_modified, php_apache_info_struct, php_apache_info) PHP_INI_END()