コード例 #1
0
 /**
  * Returns instance of Tinebase_Config
  *
  * @return Tinebase_Config
  */
 public static function getInstance()
 {
     if (self::$_instance === NULL) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 public function testDownloadListAlternativeURL()
 {
     Filemanager_Config::getInstance()->set(Filemanager_Config::PUBLIC_DOWNLOAD_URL, 'https://download.example.com/');
     $fileList = $this->testGetFileList();
     $this->assertContains('example', $fileList[0]->path);
 }
 /**
  * get download url for link
  *
  * @param string $action one of show|get
  * @return string
  */
 public function getDownloadUrl($action = 'show')
 {
     $baseURL = Filemanager_Config::getInstance()->get(Filemanager_Config::PUBLIC_DOWNLOAD_URL, Tinebase_Core::getUrl() . '/download');
     $downloadURL = $baseURL . '/' . $action . '/' . $this->getId();
     return $downloadURL;
 }