remoteFileExists() public static method

public static remoteFileExists ( $url )
Esempio n. 1
0
 /**
  * Function to Get Remote File
  **/
 public static function getRemoteFile(&$resource, $model, &$process, &$message, $path, $ext, $changeresname = true, $max_size, $min_size, $allow = array())
 {
     if (GxcHelpers::remoteFileExists($path)) {
         $storages = GxcHelpers::getStorages(true);
         $upload_handle = new $storages[$model->where]($max_size, $min_size, $allow);
         if (!$upload_handle->getRemoteFile($resource, $model, $process, $message, $path, $ext, true)) {
             $model->addError('upload', $message);
         } else {
             $process = true;
             return true;
         }
     } else {
         $process = false;
         $message = t('cms', 'Remote file not exist');
         return false;
     }
 }