Compare commits

...

3 commits

Author SHA1 Message Date
Rolf Allard van Hagen bff60ed496
Merge 92c2bbee0b into a1ae0fa729 2024-05-01 09:10:08 -06:00
BANKA2017 a1ae0fa729
fix: #52 Does not respect directory tree while uploading a folder containing sub-folders (#1056) 2024-05-01 10:01:27 +05:30
Rolf Allard van Hagen 92c2bbee0b
Save $CONFIG to config.php if it exists
Writes $CONFIG variable to the main plugin file, unless there is a config.php
2024-02-06 17:42:07 +01:00

View file

@ -958,7 +958,7 @@ if (!empty($_FILES) && !FM_READONLY) {
$targetPath = $path . $ds;
if ( is_writable($targetPath) ) {
$fullPath = $path . '/' . basename($fullPathInput);
$fullPath = $path . '/' . $fullPathInput;
$folder = substr($fullPath, 0, strrpos($fullPath, "/"));
if (!is_dir($folder)) {
@ -3502,7 +3502,8 @@ class FM_Zipper_Tar
function save()
{
$fm_file = __FILE__;
global $config_file;
$fm_file = is_readable($config_file) ? $config_file : __FILE__;
$var_name = '$CONFIG';
$var_value = var_export(json_encode($this->data), true);
$config_string = "<?php" . chr(13) . chr(10) . "//Default Configuration".chr(13) . chr(10)."$var_name = $var_value;" . chr(13) . chr(10);