FIX #16343
This commit is contained in:
parent
f1f950e8b7
commit
ebc3210308
@ -402,13 +402,13 @@ foreach ($dirmodels as $reldir) {
|
||||
// Active
|
||||
if (in_array($name, $def)) {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
} else {
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@ -417,7 +417,7 @@ foreach ($dirmodels as $reldir) {
|
||||
if ($conf->global->PROPALE_ADDON_PDF == "$name") {
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
} else {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -913,16 +913,20 @@ IMG;
|
||||
{
|
||||
dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG);
|
||||
$filename=''; $linenum=0;
|
||||
if (headers_sent($filename, $linenum)) {
|
||||
throw new OdfException("headers already sent ($filename at $linenum)");
|
||||
|
||||
if (php_sapi_name() != 'cli') { // If we are in a web context (not into CLI context)
|
||||
if (headers_sent($filename, $linenum)) {
|
||||
throw new OdfException("headers already sent ($filename at $linenum)");
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$name=preg_replace('/\.od(x|t)/i', '', $name);
|
||||
header('Content-type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="'.$name.'.pdf"');
|
||||
readfile($name.".pdf");
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$name=preg_replace('/\.od(x|t)/i', '', $name);
|
||||
header('Content-type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="'.$name.'.pdf"');
|
||||
readfile($name.".pdf");
|
||||
}
|
||||
if (!empty($conf->global->MAIN_ODT_AS_PDF_DEL_SOURCE))
|
||||
{
|
||||
unlink($name);
|
||||
@ -931,7 +935,7 @@ IMG;
|
||||
dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG);
|
||||
dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.var_export($output_arr, true), LOG_DEBUG);
|
||||
|
||||
if ($retval==126) {
|
||||
if ($retval == 126) {
|
||||
throw new OdfException('Permission execute convert script : ' . $command);
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user