Skip to content

Commit

Permalink
applying workaround referred in issue sunhater#77 in upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
lfglopes committed Feb 23, 2015
1 parent b645d2a commit b7f3b82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/class/uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ public function __construct() {
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
? path::normalize($this->config['uploadDir'])
: path::url2fullPath("/$path");
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
$this->typeDir = realpath("{$this->config['uploadDir']}/{$this->type}");
$this->typeURL = "{$this->config['uploadURL']}/{$this->type}";

// SITE ROOT
} elseif ($this->config['uploadURL'] == "/") {
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
? path::normalize($this->config['uploadDir'])
: path::normalize(realpath($_SERVER['DOCUMENT_ROOT']));
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
$this->typeDir = realpath("{$this->config['uploadDir']}/{$this->type}");
$this->typeURL = "/{$this->type}";

// ABSOLUTE & RELATIVE
Expand All @@ -191,7 +191,7 @@ public function __construct() {
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
? path::normalize($this->config['uploadDir'])
: path::url2fullPath($this->config['uploadURL']);
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
$this->typeDir = realpath("{$this->config['uploadDir']}/{$this->type}");
$this->typeURL = "{$this->config['uploadURL']}/{$this->type}";
}

Expand Down

0 comments on commit b7f3b82

Please sign in to comment.