Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit f9ad088

Browse files
author
Charles Ma
committed
ENH: refs #296 Fixed dashboard
1 parent ed221ea commit f9ad088

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/controllers/UploadController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,18 @@ public function saveuploadedAction()
262262

263263
if(!empty($pathClient))
264264
{
265-
$tmpArray = split(';;', $pathClient);
265+
$tmpArray = explode(';;', $pathClient);
266266
foreach($tmpArray as $value)
267267
{
268-
if(strpos($value, $filename) !== false)
268+
$tmpPathValue = explode('/', $value);
269+
if(end($tmpPathValue) == $filename)
269270
{
270271
$pathClient = $value;
271272
break;
272273
}
273274
}
274275
}
275-
276+
276277
$parent = $this->_getParam("parent");
277278
$license = $this->_getParam("license");
278279
if(!empty($path) && file_exists($path) && $file_size > 0)
@@ -289,7 +290,7 @@ public function saveuploadedAction()
289290
{
290291
$parentDao = $this->Folder->load($parent);
291292
$this->getLogger()->info($pathClient);
292-
$folders = split('/', $pathClient);
293+
$folders = explode('/', $pathClient);
293294
unset($folders[count($folders) - 1]);
294295
foreach($folders as $folderName)
295296
{

0 commit comments

Comments
 (0)