mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-08-01 14:30:45 +02:00
Save $CONFIG to config.php if it exists (#1144)
Writes $CONFIG variable to the main plugin file, unless there is a config.php
This commit is contained in:
committed by
GitHub
parent
3716af20a2
commit
1042994a60
@@ -3598,7 +3598,8 @@ class FM_Zipper_Tar
|
|||||||
|
|
||||||
function save()
|
function save()
|
||||||
{
|
{
|
||||||
$fm_file = __FILE__;
|
global $config_file;
|
||||||
|
$fm_file = is_readable($config_file) ? $config_file : __FILE__;
|
||||||
$var_name = '$CONFIG';
|
$var_name = '$CONFIG';
|
||||||
$var_value = var_export(json_encode($this->data), true);
|
$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);
|
$config_string = "<?php" . chr(13) . chr(10) . "//Default Configuration".chr(13) . chr(10)."$var_name = $var_value;" . chr(13) . chr(10);
|
||||||
|
Reference in New Issue
Block a user