Fix Try to fix DAV pb with some buggy clients by disabling browser
This commit is contained in:
parent
00f6265870
commit
e87a32e92f
@ -153,7 +153,7 @@ print "</form>\n";
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
print $langs->trans("WebDAVSetupDesc")."<br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("WebDAVSetupDesc")."</span><br>\n";
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,9 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* You can test with the WebDav client cadaver:
|
||||||
|
* cadaver http://myurl/dav/fileserver.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +62,8 @@ $publicDir = $conf->dav->multidir_output[$entity].'/public';
|
|||||||
$privateDir = $conf->dav->multidir_output[$entity].'/private';
|
$privateDir = $conf->dav->multidir_output[$entity].'/private';
|
||||||
$ecmDir = $conf->ecm->multidir_output[$entity];
|
$ecmDir = $conf->ecm->multidir_output[$entity];
|
||||||
$tmpDir = $conf->dav->multidir_temp[$entity];
|
$tmpDir = $conf->dav->multidir_temp[$entity];
|
||||||
//var_dump($tmpDir);exit;
|
//var_dump($tmpDir);mkdir($tmpDir);exit;
|
||||||
|
|
||||||
|
|
||||||
// Authentication callback function
|
// Authentication callback function
|
||||||
$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) {
|
$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) {
|
||||||
@ -147,13 +151,17 @@ if ((empty($conf->global->DAV_ALLOW_PUBLIC_DIR)
|
|||||||
$server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend));
|
$server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend));
|
||||||
}
|
}
|
||||||
// Support for LOCK and UNLOCK
|
// Support for LOCK and UNLOCK
|
||||||
|
dol_mkdir($tmpDir);
|
||||||
$lockBackend = new \Sabre\DAV\Locks\Backend\File($tmpDir . '/.locksdb');
|
$lockBackend = new \Sabre\DAV\Locks\Backend\File($tmpDir . '/.locksdb');
|
||||||
$lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend);
|
$lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend);
|
||||||
$server->addPlugin($lockPlugin);
|
$server->addPlugin($lockPlugin);
|
||||||
|
|
||||||
// Support for html frontend
|
// Support for html frontend
|
||||||
$browser = new \Sabre\DAV\Browser\Plugin();
|
if (empty($conf->global->DAV_DISABLE_BROWSER))
|
||||||
$server->addPlugin($browser);
|
{
|
||||||
|
$browser = new \Sabre\DAV\Browser\Plugin();
|
||||||
|
$server->addPlugin($browser);
|
||||||
|
}
|
||||||
|
|
||||||
// Automatically guess (some) contenttypes, based on extension
|
// Automatically guess (some) contenttypes, based on extension
|
||||||
//$server->addPlugin(new \Sabre\DAV\Browser\GuessContentType());
|
//$server->addPlugin(new \Sabre\DAV\Browser\GuessContentType());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user