Skip to content

Commit

Permalink
Fixed images not syncing when assets folder path contains aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetkovIT committed Jun 1, 2018
1 parent 9d1e9f5 commit ebba92f
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 193 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.8 - 2018.06.01
### Fixed
- Fixed images not syncing when assets folder path contains aliases

## 1.0.7 - 2018.05.30
### Fixed
- Fixed plugin tables created without prefixes
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "gathercontent/gathercontent",
"description": "Integrates GatherContent",
"type": "craft-plugin",
"version": "1.0.7",
"version": "1.0.8",
"keywords": [
"craft",
"cms",
Expand Down
4 changes: 3 additions & 1 deletion src/models/GatherContent_SettingsModel.php
Expand Up @@ -2,6 +2,8 @@

namespace Craft;

use Craft;

/**
* @property string $defaultView
* @property bool $spamProtectionEnabled
Expand Down Expand Up @@ -36,7 +38,7 @@ public function folderExists($attribute)
public function getAbsoluteFormTemplateDirectory()
{
if ($this->formTemplateDirectory) {
$absolutePath = $this->getAbsolutePath($this->formTemplateDirectory);
$absolutePath = $this->getAbsolutePath(Craft::getAlias($this->formTemplateDirectory));

return file_exists($absolutePath) ? $absolutePath : null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/GatherContent_AssetService.php
Expand Up @@ -62,7 +62,7 @@ public function downloadUrl($urlInfo, $downloadPath)

set_time_limit(0);
//This is the file where we save the information
$fp = fopen ($path . '/' . $urlInfo->filename, 'w+');
$fp = fopen (Craft::getAlias($path) . '/' . $urlInfo->filename, 'w+');
//Here is the file we are downloading, replace spaces with %20
$ch = curl_init(str_replace(" ","%20",$urlInfo->url));
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
Expand Down

0 comments on commit ebba92f

Please sign in to comment.