Commit 8c2f50f9 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1870993: Respect $cfg->usepdfexport value



If all other dependencies are met then it is possible to export by pdf
on new installs without $cfg->usepdfexport set

Change-Id: I7a61e88ba835609564f1aaeaa46be89b82bd8974
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 24e19042
......@@ -15,7 +15,10 @@ $pdfactive = false;
if (db_table_exists('export_installed')) {
$pdfactive = get_field('export_installed', 'active', 'name', 'pdf');
}
if ($pdfactive && !file_exists(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-master/vendor/autoload.php')) {
$chromephpexists = file_exists(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-master/vendor/autoload.php');
if (($pdfactive && !$chromephpexists) ||
($pdfactive && $chromephpexists && !get_config('usepdfexport'))) {
global $SESSION;
// need to disable the PDF export option
execute_sql("UPDATE {export_installed} SET active = 0 WHERE name = ?", array('pdf'));
......
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