aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/attach.php2
-rw-r--r--include/import.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/attach.php b/include/attach.php
index 0ca87624f..40410d41e 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1972,7 +1972,7 @@ function get_filename_by_cloudname($cloudname, $channel, $storepath) {
foreach($items as $item) {
$filename = find_filename_by_hash($channel['channel_id'], $item);
if($filename === $cloudname) {
- return $filename;
+ return $item;
}
}
return null;
diff --git a/include/import.php b/include/import.php
index ac52cc9cf..73a2dfff4 100644
--- a/include/import.php
+++ b/include/import.php
@@ -1223,15 +1223,15 @@ function scan_webpage_elements($path, $type, $cloud = false) {
$dirtoscan = $path;
switch ($type) {
case 'page':
- $dirtoscan .= '/pages/';
+ $dirtoscan .= 'pages/';
$json_filename = 'page.json';
break;
case 'layout':
- $dirtoscan .= '/layouts/';
+ $dirtoscan .= 'layouts/';
$json_filename = 'layout.json';
break;
case 'block':
- $dirtoscan .= '/blocks/';
+ $dirtoscan .= 'blocks/';
$json_filename = 'block.json';
break;
default :
@@ -1251,7 +1251,7 @@ function scan_webpage_elements($path, $type, $cloud = false) {
$folder = $dirtoscan . '/' . $element;
if (is_dir($folder)) {
if($cloud) {
- $jsonfilepath = get_filename_by_cloudname($json_filename, $channel, $folder);
+ $jsonfilepath = $folder . '/' . get_filename_by_cloudname($json_filename, $channel, $folder);
} else {
$jsonfilepath = $folder . '/' . $json_filename;
}