/** * Prepares the server for administrative operations. * * Removes any configured auth mechanism in the server and stores it for * later restoring. Registers the lock plugin, if it is not registered, * yet. Locks the backend. */ private function prepareEnvironment() { if ($this->server->auth !== null) { $this->serverAuth = $this->server->auth; $this->server->auth = null; } $lockConf = null; if (!$this->server->pluginRegistry->hasPlugin(ezcWebdavLockPlugin::PLUGIN_NAMESPACE)) { $lockConf = new ezcWebdavLockPluginConfiguration(); $this->server->pluginRegistry->registerPlugin($lockConf); $this->serverHadLockPlugin = false; } else { $lockConf = $this->server->pluginRegistry->getPluginConfig(ezcWebdavLockPlugin::PLUGIN_NAMESPACE); $this->serverHadLockPlugin = true; } $this->backend->lock($lockConf->options->backendLockWaitTime, $lockConf->options->backendLockTimeout); }