Posts: 44
Threads: 8
Joined: May 2014
For example, if style.css is changed - eg:
After saving the changes it looks like this:
The problem seems to be in "\"
Posts: 328
Threads: 5
Joined: May 2012
(2023-01-10, 23:38:13)smdp-1971 Wrote: For example, if style.css is changed - eg:
After saving the changes it looks like this:
The problem seems to be in "\"
Thanks for the catch!
Edit file admin/theme-edit.php
Starting at line 55, replace this code:
PHP Code:
# save edited template file
$SavedFile = $_POST['edited_file'];
// $FileContents = get_magic_quotes_gpc() ? stripslashes($_POST['content']) : $_POST['content'];
$FileContents = stripslashes($_POST['content']);
$fh = fopen(GSTHEMESPATH . $SavedFile, 'w') or die("can't open file");
fwrite($fh, $FileContents);
fclose($fh);
$success = sprintf(i18n_r('TEMPLATE_FILE'), $SavedFile);
}
With this:
PHP Code:
# save edited template file
$SavedFile = $_POST['edited_file'];
$FileContents = $_POST['content'];
$fh = fopen(GSTHEMESPATH . $SavedFile, 'w') or die("can't open file");
fwrite($fh, $FileContents);
fclose($fh);
$success = sprintf(i18n_r('TEMPLATE_FILE'), $SavedFile);
}
Posts: 44
Threads: 8
Joined: May 2014
(2023-01-11, 04:07:57)islander Wrote: (2023-01-10, 23:38:13)smdp-1971 Wrote: For example, if style.css is changed - eg:
After saving the changes it looks like this:
The problem seems to be in "\"
Thanks for the catch!
Edit file admin/theme-edit.php
Starting at line 55, replace this code:
PHP Code:
# save edited template file
$SavedFile = $_POST['edited_file'];
// $FileContents = get_magic_quotes_gpc() ? stripslashes($_POST['content']) : $_POST['content'];
$FileContents = stripslashes($_POST['content']);
$fh = fopen(GSTHEMESPATH . $SavedFile, 'w') or die("can't open file");
fwrite($fh, $FileContents);
fclose($fh);
$success = sprintf(i18n_r('TEMPLATE_FILE'), $SavedFile);
}
With this:
PHP Code:
# save edited template file
$SavedFile = $_POST['edited_file'];
$FileContents = $_POST['content'];
$fh = fopen(GSTHEMESPATH . $SavedFile, 'w') or die("can't open file");
fwrite($fh, $FileContents);
fclose($fh);
$success = sprintf(i18n_r('TEMPLATE_FILE'), $SavedFile);
}
Great, now it works! Thank you!