From 8bf72246bb396290f71e860b6d2b77cacda58903 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 13 Mar 2019 23:07:41 +0200 Subject: [PATCH] Moved the update of dynamic paths before preg_match to better mannage the forward slash placement. gh-231 --- admin/helpers/compiler/b_Structure.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 07691d200..12314eb70 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -1300,12 +1300,12 @@ class Structure extends Get // set full path if this is a full path folder if (!isset($custom['folder']) && isset($custom['folderpath'])) { + // update the dynamic path + $custom['folderpath'] = $this->updateDynamicPath($custom['folderpath']); // set the folder path with / if does not have a drive/windows full path $custom['folder'] = (preg_match('/^[a-z]:/i', $custom['folderpath'])) ? trim($custom['folderpath'], '/') : '/' . trim($custom['folderpath'], '/'); - // update the dynamic path - $custom['folder'] = $this->updateDynamicPath($custom['folder']); // remove the file path unset($custom['folderpath']); // triget fullpath @@ -1382,12 +1382,12 @@ class Structure extends Get // set full path if this is a full path file if (!isset($custom['file']) && isset($custom['filepath'])) { + // update the dynamic path + $custom['filepath'] = $this->updateDynamicPath($custom['filepath']); // set the file path with / if does not have a drive/windows full path $custom['file'] = (preg_match('/^[a-z]:/i', $custom['filepath'])) ? trim($custom['filepath'], '/') : '/' . trim($custom['filepath'], '/'); - // update the dynamic path - $custom['file'] = $this->updateDynamicPath($custom['file']); // remove the file path unset($custom['filepath']); // triget fullpath