public function __construct() { $this->data = midgardmvc_core::get_instance()->context->get(); parent::HTTP_WebDAV_Server(); }
/** * Constructor * * @param void * @return void */ function KTWebDAVServer() { // CGI compatible auth setup $altinfo = KTUtil::arrayGet($_SERVER, 'kt_auth', KTUtil::arrayGet($_SERVER, 'REDIRECT_kt_auth')); if (!empty($altinfo) && !isset($_SERVER['PHP_AUTH_USER'])) { $val = $altinfo; $pieces = explode(' ', $val); // bad. if ($pieces[0] == 'Basic') { $chunk = $pieces[1]; $decoded = base64_decode($chunk); $credential_info = explode(':', $decoded); if (count($credential_info) == 2) { $_SERVER['PHP_AUTH_USER'] = $credential_info[0]; $_SERVER['PHP_AUTH_PW'] = $credential_info[1]; $_SERVER["AUTH_TYPE"] = 'Basic'; } } } // Let the base class do it's thing parent::HTTP_WebDAV_Server(); // Load KTWebDAV config if (!$this->initConfig()) { $this->ktwebdavLog('Could not load configuration.', 'error'); exit(0); } if ($this->debugInfo == 'on') { $this->ktwebdavLog('====================='); $this->ktwebdavLog(' Debug Info is : ' . $this->debugInfo); $this->ktwebdavLog(' SafeMode is : ' . $this->safeMode); $this->ktwebdavLog(' Root Folder is : ' . $this->rootFolder); $this->ktwebdavLog('====================='); } }
function webdav() { global $bhconfig; parent::HTTP_WebDAV_Server(); $this->http_auth_realm = $bhconfig['sitename']; }