|
@@ -228,13 +228,13 @@ class Core
|
|
|
$this->base64 = true;
|
|
|
} elseif (strstr($this->data['file'], 'content,')) {
|
|
|
$file = str_replace('content,', '', $this->data['file']);
|
|
|
- $this->data['cropper'] = 1;
|
|
|
+ $this->data['cropper'] = true;
|
|
|
} else {
|
|
|
$name = urldecode($this->data['file']);
|
|
|
}
|
|
|
|
|
|
$this->data['file'] = array();
|
|
|
- if (((isset($this->data['cropper'])) || (!isset($this->data['cropper'])) && strstr($name, 'http') && !$this->yun)) {
|
|
|
+ if ((!isset($this->data['cropper'])) && strstr($name, 'http') && !$this->yun) {
|
|
|
$this->base64 = false;
|
|
|
|
|
|
$this->root();
|
|
@@ -316,7 +316,7 @@ class Core
|
|
|
} else {
|
|
|
$filename = md5($this->data['pic']) . '.' . pathinfo($this->data['pic'], PATHINFO_EXTENSION);
|
|
|
$this->path();
|
|
|
- $file = $this->base . $this->data['key'] . $this->path . $filename;
|
|
|
+ $file = Dever::path($this->base . $this->data['key'] . $this->path, $filename);
|
|
|
if (!is_file($file)) {
|
|
|
$content = Dever::curl($name);
|
|
|
file_put_contents($file, $content);
|