| 1 |
<?php
|
| 2 |
/* This file is part of "WebDav for Drupal Module".
|
| 3 |
* Copyright 2009, arNuméral
|
| 4 |
* Author : Yoran Brault
|
| 5 |
* eMail : yoran.brault@bad_arnumeral.fr (remove bad_ before sending an email)
|
| 6 |
* Site : http://www.arnumeral.fr/node/5
|
| 7 |
*
|
| 8 |
* "WebDav for Drupal Module" is free software; you can redistribute it and/or
|
| 9 |
* modify it under the terms of the GNU General Public License as
|
| 10 |
* published by the Free Software Foundation; either version 2.1 of
|
| 11 |
* the License, or (at your option) any later version.
|
| 12 |
*
|
| 13 |
* "WebDav for Drupal Module" is distributed in the hope that it will be useful,
|
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 16 |
* General Public License for more details.
|
| 17 |
*
|
| 18 |
* You should have received a copy of the GNU General Public
|
| 19 |
* License along with "Broken Anchor for Node comments Module"; if not, write to the Free
|
| 20 |
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
| 21 |
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
| 22 |
*/
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
/**
|
| 27 |
* WebDAV server configuration form.
|
| 28 |
*
|
| 29 |
* @return form
|
| 30 |
*/
|
| 31 |
function webdav_admin_settings() {
|
| 32 |
$form=array();
|
| 33 |
$form['webdav_performances'] = array (
|
| 34 |
'#type' => 'fieldset',
|
| 35 |
'#title' => t('Performances'),
|
| 36 |
'#collapsible' => TRUE,
|
| 37 |
'#collapsed' => FALSE
|
| 38 |
);
|
| 39 |
|
| 40 |
$form['webdav_performances']['information'] = array(
|
| 41 |
'#prefix' => "<div>
|
| 42 |
In order to optimize performances :
|
| 43 |
<ul>
|
| 44 |
<li>Think about removing 'statistics' module if you don't need it...
|
| 45 |
</ul>
|
| 46 |
",
|
| 47 |
'#suffix' => '</div>',
|
| 48 |
);
|
| 49 |
$form['webdav_performances']['webdav_cache_routes'] = array (
|
| 50 |
'#type' => 'checkbox',
|
| 51 |
'#title' => t("Routes caching"),
|
| 52 |
'#default_value' => webdav_cache_routes(),
|
| 53 |
'#description' => t("Cache routes (experimental)")
|
| 54 |
);
|
| 55 |
$form['webdav_performances']['webdav_cache_members'] = array (
|
| 56 |
'#type' => 'checkbox',
|
| 57 |
'#title' => t("Members caching"),
|
| 58 |
'#default_value' => webdav_cache_members(),
|
| 59 |
'#description' => t("Cache members (experimental)")
|
| 60 |
);
|
| 61 |
$form['webdav_debugging'] = array (
|
| 62 |
'#type' => 'fieldset',
|
| 63 |
'#title' => t('Debugging'),
|
| 64 |
'#collapsible' => TRUE,
|
| 65 |
'#collapsed' => FALSE
|
| 66 |
);
|
| 67 |
$form['webdav_debugging']['webdav_watch_dog'] = array (
|
| 68 |
'#type' => 'checkbox',
|
| 69 |
'#title' => t("Use WatchDog"),
|
| 70 |
'#default_value' => webdav_watch_dog(),
|
| 71 |
'#description' => t("Log every user access to watchdog. This will reduce performances !!")
|
| 72 |
);
|
| 73 |
|
| 74 |
$form['webdav_debugging']['webdav_debug_level'] = array (
|
| 75 |
'#title' => t("Debug level"),
|
| 76 |
'#description' => t("Set the debugging output level. Every logging will use php error_log function. On UNIX system, this will end up in apache error logs."),
|
| 77 |
'#type' => 'select',
|
| 78 |
'#default_value' => webdav_debug_level(),
|
| 79 |
'#options' => array (
|
| 80 |
0 => t('Disabled'),
|
| 81 |
1 => t('Enabled'),
|
| 82 |
2 => t('Verbose'),
|
| 83 |
3 => t('Full'),
|
| 84 |
)
|
| 85 |
);
|
| 86 |
|
| 87 |
$form['webdav_http']= array (
|
| 88 |
'#type' => 'fieldset',
|
| 89 |
'#title' => t('HTTP settings'),
|
| 90 |
'#weight' => -3,
|
| 91 |
'#collapsible' => TRUE,
|
| 92 |
'#collapsed' => FALSE
|
| 93 |
);
|
| 94 |
$form['webdav_http']['webdav_http_compression'] = array (
|
| 95 |
'#type' => 'checkbox',
|
| 96 |
'#title' => t("Compression"),
|
| 97 |
'#default_value' => webdav_http_compression(),
|
| 98 |
'#description' => t("Activate WebDAV HTTP compression for text contents.")
|
| 99 |
);
|
| 100 |
|
| 101 |
|
| 102 |
$form['webdav_dav']= array (
|
| 103 |
'#type' => 'fieldset',
|
| 104 |
'#title' => t('DAV settings'),
|
| 105 |
'#weight' => -1,
|
| 106 |
'#collapsible' => TRUE,
|
| 107 |
'#collapsed' => FALSE
|
| 108 |
);
|
| 109 |
$form['webdav_dav']['webdav_lock_timeout'] = array (
|
| 110 |
'#type' => 'textfield',
|
| 111 |
'#title' => t("Locks timeout"),
|
| 112 |
'#default_value' => webdav_lock_timeout(),
|
| 113 |
'#description' => t("Delay before a lock is automaticaly released (seconds).")
|
| 114 |
);
|
| 115 |
|
| 116 |
$form['webdav_advanced'] = array (
|
| 117 |
'#type' => 'fieldset',
|
| 118 |
'#title' => t('Advanced settings'),
|
| 119 |
'#collapsible' => TRUE,
|
| 120 |
'#collapsed' => TRUE
|
| 121 |
);
|
| 122 |
$form['webdav_advanced']['webdav_redirection_mode'] = array (
|
| 123 |
'#type' => 'select',
|
| 124 |
'#title' => t("Redirect wrong URL"),
|
| 125 |
'#options' => array (
|
| 126 |
0 => t('Yes'),
|
| 127 |
1 => t('No'),
|
| 128 |
2 => t('Automatic'),
|
| 129 |
),
|
| 130 |
'#default_value' => webdav_redirection_mode(),
|
| 131 |
'#description' => t("
|
| 132 |
Redirect WebDAV client when the URL don't end with / for a collection.")
|
| 133 |
);
|
| 134 |
|
| 135 |
return system_settings_form($form);
|
| 136 |
}
|