function eZFatalError() { eZDebug::setHandleType(eZDebug::HANDLE_NONE); eZWebDAVContentBackend::appendLogEntry("****************************************"); eZWebDAVContentBackend::appendLogEntry("Fatal error: eZ Publish did not finish its request"); eZWebDAVContentBackend::appendLogEntry("The execution of eZ Publish was abruptly ended, the debug output is present below."); eZWebDAVContentBackend::appendLogEntry("****************************************"); // $templateResult = null; // eZDisplayResult( $templateResult ); }
/** * Checks authentication for the given $user. * * This method checks the given user/password credentials encapsulated in * $data. Returns true if the user was succesfully recognized and the * password is valid for him, false otherwise. In case no username and/or * password was provided in the request, empty strings are provided as the * parameters of this method. * * @param ezcWebdavBasicAuth $data * @return bool */ public function authenticateBasic(ezcWebdavBasicAuth $data) { $loginHandler = 'standard'; eZWebDAVContentBackend::appendLogEntry("Got username: {$data->username}"); // added by @ds to fix problems with IE6 SP2 if (preg_match('(^' . preg_quote($_SERVER['SERVER_NAME']) . '(.+))', $data->username, $matches) > 0) { $data->username = $matches[1]; } eZWebDAVContentBackend::appendLogEntry("Processed to username: {$data->username}"); $userClass = eZUserLoginHandler::instance($loginHandler); $user = $userClass->loginUser($data->username, $data->password); if (!$user instanceof eZUser) { return false; } eZWebDAVContentBackend::appendLogEntry("AuthenticatedBasic"); return true; }
/** * Handles data retrival on the content tree level. * * The format of the returned array is the same as $result: * <code> * array( 'isFile' => bool, * 'isCollection' => bool, * 'file' => path to the storage file which contain the contents ); * </code> * * @param array(string=>mixed) $result * @param string $currentSite Eg. 'plain_site_user' * @param string $virtualFolder Eg. 'Content' * @param string $target Eg. 'Folder1/file1.txt' * @param string $fullPath Eg. '/plain_site_user/Content/Folder1/file1.txt' * @return array(string=>mixed) Or false if an error appeared * @todo remove/replace eZContentUpload */ protected function getContentNodeData($result, $currentSite, $virtualFolder, $target, $fullPath) { // Attempt to fetch the node the client wants to get. $nodePath = $this->internalNodePath($virtualFolder, $target); eZWebDAVContentBackend::appendLogEntry(__FUNCTION__ . " Path:" . $nodePath); $node = $this->fetchNodeByTranslation($nodePath); $info = $this->fetchNodeInfo($fullPath, $node); // Proceed only if the node is valid: if ($node === null) { return $result; } // Can we fetch the contents of the node if (!$node->canRead()) { return false; // @as self::FAILED_FORBIDDEN; } $object = $node->attribute('object'); foreach ($info as $key => $value) { $result[$key] = $value; } $upload = new eZContentUpload(); $info = $upload->objectFileInfo($object); if ($info) { $result['file'] = $info['filepath']; } else { $class = $object->contentClass(); if ($this->isObjectFolder($object, $class)) { $result['isCollection'] = true; } } return $result; }