]> granicus.if.org Git - php/commitdiff
Axe rest of DAV leftovers and use STD_PHP_INI_ENTRY in the INI section
authorSascha Schumann <sas@php.net>
Thu, 7 Dec 2000 13:07:18 +0000 (13:07 +0000)
committerSascha Schumann <sas@php.net>
Thu, 7 Dec 2000 13:07:18 +0000 (13:07 +0000)
sapi/apache/mod_php4.c
sapi/apache/mod_php4.h
sapi/apache/php_apache.c

index 085a15fe787873945a5fef8ba1adc3237ec05f6c..16faa88facc9b8e3a875fafacc670c4dec49d34b 100644 (file)
@@ -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
index 9a2efe04289da669c8b581241fc552d7e976b80a..3b2813dad486bd11dbb360cd43f6eb687c65e0ad 100644 (file)
@@ -29,7 +29,6 @@
 typedef struct {
     long engine;
     long last_modified;
-       char *dav_script;
        long xbithack;
 } php_apache_info_struct;
 
index 1aab409f0f27a8811e8089bbc6e61f48fd653f9c..efa9a07afa4d875eb216cd77e732d36a4d917e8d 100644 (file)
@@ -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()