pdfunite and ghostscript availability check for RHEL/CentOS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Adding the following code, we can check pdfunite and ghostscript installation on Red Hat Enterprise Linux (RHEL) and CentOS environment.
File to modify:
export/pdf/lib.php
Line:
80
[Before]
public static function has_pdf_combiner() {
// Check we have a valid way to combine pdfs
$combiner = false;
if ($pdfunite = exec('apt-cache policy poppler-utils | grep Installed')) {
if (!preg_
}
}
if ($ghostscript = exec('apt-cache policy ghostscript | grep Installed')) {
if (!preg_
}
}
return $combiner;
}
[After]
public static function has_pdf_combiner() {
// Check we have a valid way to combine pdfs
$combiner = false;
if ($pdfunite = exec('apt-cache policy poppler-utils | grep Installed')) {
if (!preg_
}
}
if ($ghostscript = exec('apt-cache policy ghostscript | grep Installed')) {
if (!preg_
}
}
if ($pgtune = exec('rpm -q poppler-utils')) {
}
if ($pgtune = exec('rpm -q ghostscript')) {
}
return $combiner;
}
Changed in mahara: | |
status: | New → In Progress |
Changed in mahara: | |
milestone: | 20.04rc1 → 20.04.0 |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/10869