예제 #1
0
 /**
  * Get server path to thumbnails directory
  *
  * @access public
  * @return string
  */
 public function getThumbsServerPath()
 {
     if (is_null($this->_thumbsServerPath)) {
         $this->_resourceTypeConfig = $this->getResourceTypeConfig();
         $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
         $_thumbnailsConfig = $_config->getThumbnailsConfig();
         // Get the resource type directory.
         $this->_thumbsServerPath = CKFinder_Connector_Utils_FileSystem::combinePaths($_thumbnailsConfig->getDirectory(), $this->_resourceTypeConfig->getName());
         // Return the resource type directory combined with the required path.
         $this->_thumbsServerPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_thumbsServerPath, ltrim($this->_clientPath, '/'));
         if (!is_dir($this->_thumbsServerPath)) {
             if (!CKFinder_Connector_Utils_FileSystem::createDirectoryRecursively($this->_thumbsServerPath)) {
             }
         }
     }
     return $this->_thumbsServerPath;
 }
예제 #2
0
 /**
  * Get server path to thumbnails directory
  *
  * @access public
  * @return string
  */
 public function getThumbsServerPath()
 {
     if (is_null($this->_thumbsServerPath)) {
         $this->_resourceTypeConfig = $this->getResourceTypeConfig();
         $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
         $_thumbnailsConfig = $_config->getThumbnailsConfig();
         // Get the resource type directory.
         $this->_thumbsServerPath = CKFinder_Connector_Utils_FileSystem::combinePaths($_thumbnailsConfig->getDirectory(), $this->_resourceTypeConfig->getName());
         // Return the resource type directory combined with the required path.
         $this->_thumbsServerPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_thumbsServerPath, ltrim($this->_clientPath, '/'));
         if (!is_dir($this->_thumbsServerPath)) {
             if (!CKFinder_Connector_Utils_FileSystem::createDirectoryRecursively($this->_thumbsServerPath)) {
                 /**
                  * todo  Ckfinder_Connector_Utils_Xml::raiseError(); perhaps we should return error
                  * @author Pulipuli Chen <*****@*****.**> 20151102
                  */
             }
         }
     }
     return $this->_thumbsServerPath;
 }