예제 #1
0
 public function initialize(DAV\Server $server)
 {
     parent::initialize($server);
     $this->server = $server;
     if ($this->enablePost) {
         $this->server->on('method:POST', [$this, 'httpPOSTExtra']);
     }
 }
 /**
  * This method returns a local pathname to an asset.
  * 
  * The logo and favicon can be overwritten
  *
  * @param string $assetName
  *
  * @return string
  */
 protected function getLocalAssetPath($assetName)
 {
     // load path to logo from parameters
     if ($assetName === 'sabredav.png' && $this->getBrowserConfig('browser_logo')) {
         return $this->getBrowserConfig('browser_logo');
     } elseif ($assetName === 'favicon.ico' && $this->getBrowserConfig('favicon')) {
         return $this->getBrowserConfig('favicon');
     }
     return parent::getLocalAssetPath($assetName);
 }
예제 #3
0
 /**
  * @brief Constructor for RedBrowser class.
  *
  * $enablePost will be activated through set_writeable() in a later stage.
  * At the moment the write_storage permission is only valid for the whole
  * folder. No file specific permissions yet.
  * @todo disable enablePost by default and only activate if permissions
  * grant edit rights.
  *
  * Disable assets with $enableAssets = false. Should get some thumbnail views
  * anyway.
  *
  * @param RedBasicAuth &$auth
  */
 public function __construct(&$auth)
 {
     $this->auth = $auth;
     parent::__construct(true, false);
 }