-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New updating for preview php content #30155
Conversation
@@ -0,0 +1,58 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the ajax service i think ?
If i am right, move the file into directory htdocs/core/ajax/emailingemplates.php.
top_httphead(); | ||
|
||
if ($_SERVER['REQUEST_METHOD'] == 'POST' && GETPOSTISSET('content')) { | ||
$content = $_POST['content']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$_POST use is forbidden.
You must use GETPOST()
|
||
$i = 0; | ||
do { | ||
$filePath = $directory . '/template_' . $i++ . '.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The $directory = DOL_DATA_ROOT . '/mailing/email_template';
is inside the root where binary files are stored. It means the directory should be in readonly mode and is not writable by the web server on a secured installation.
Any temporaty files must be stored into a temp directory.
For example, you can use $conf->admin->dir_temp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok it s solved
NEW|New updating for preview php content on Ckeditor
for exemple preview news :