Commit 955664da authored by jcnventura's avatar jcnventura

Issue #1153606: TCPDF cache and images directories should be write-enabled.

parent 0a82b3e8
......@@ -51,7 +51,9 @@ TCPDF support:
2. Extract the contents of the downloaded package into one of the
supported paths. There is no need to modify the config/tcpdf_config.php
file, as the module self-configures TCPDF.
3. Check http://tcpdf.sourceforge.net/ for further information.
3. Grant write access to the cache and images directories to your
webserver user.
4. Check http://tcpdf.sourceforge.net/ for further information.
wkhtmltopdf support:
......
......@@ -205,6 +205,18 @@ function print_pdf_requirements($phase) {
'severity' => REQUIREMENT_ERROR,
);
}
foreach (array('cache', 'images') as $dir) {
$directory = dirname($print_pdf_pdf_tool) .'/'. $dir;
if (!is_dir($directory) || !is_writable($directory)) {
$requirements['print_pdf_tool_'. $dir] = array(
'title' => $t('TCPDF directory'),
'value' => $t('Non-writable permissions'),
'description' => $t('You must change the %fontdir permissions to be writable, as dompdf requires write-access to that directory.', array('%fontdir' => $directory)),
'severity' => REQUIREMENT_ERROR,
);
}
}
}
elseif (substr(basename($print_pdf_pdf_tool, '.exe'), 0, 11) == 'wkhtmltopdf') {
if (function_exists('is_executable') && !is_executable($print_pdf_pdf_tool)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment