mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-09 01:12:16 +02:00
fix settings are not saved. (#361)
This commit is contained in:
parent
dcdf736e48
commit
1482e41f74
|
@ -3082,12 +3082,11 @@ class FM_Zipper_Tar
|
||||||
|
|
||||||
function save()
|
function save()
|
||||||
{
|
{
|
||||||
global $root_path;
|
$fm_file = __FILE__;
|
||||||
$fm_file = $root_path.$_SERVER["PHP_SELF"];
|
|
||||||
$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);
|
||||||
if (file_exists($fm_file)) {
|
if (is_writable($fm_file)) {
|
||||||
$lines = file($fm_file);
|
$lines = file($fm_file);
|
||||||
if ($fh = @fopen($fm_file, "w")) {
|
if ($fh = @fopen($fm_file, "w")) {
|
||||||
@fputs($fh, $config_string, strlen($config_string));
|
@fputs($fh, $config_string, strlen($config_string));
|
||||||
|
|
Loading…
Reference in a new issue