mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #58116
[Bug 1871718] A change has been merged
Reviewed: https://reviews.mahara.org/10872
Committed: https://git.mahara.org/mahara/mahara/commit/2613dc3a6387cccdabbd10375df7b1cd79c6392f
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 2613dc3a6387cccdabbd10375df7b1cd79c6392f
Author: Mitsuhiro Yoshida <mits@xxxxxxxxxxx>
Date: Thu Apr 9 06:46:04 2020 +0900
Bug 1871718: Chrome browser availability check for RHEL/CentOS
behatnotneeded
Change-Id: I07fd774acbc41687d77b3379a19b9b15944208e0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1871718
Title:
Chrome browser availability check for RHEL/CentOS
Status in Mahara:
Fix Committed
Bug description:
Adding the following code, we can check Chrome browser installation on
Red Hat Enterprise Linux (RHEL) and CentOS environment (Related to Bug
#1871515).
File to modify:
export/pdf/lib.php
Line:
133
[Before]
/**
* Dumps all views into the HTML export
*/
private function pdf_view_export_data() {
global $pdfrun;
static $browser;
static $page;
$progressstart = 85;
$progressend = 95;
$i = 0;
$viewcount = count($this->views);
if (!isset($pdfrun) || $pdfrun == 'first' || $pdfrun == 'all') {
$browsertype = 'chromium-browser';
system('dpkg -l | grep ' . $browsertype, $error);
if ($error) {
$browsertype = 'chrome';
system('dpkg -l | grep ' . $browsertype, $error2);
if ($error2) {
throw new MaharaException('Need to have a Chrome browser installed to use the headless pdf option');
}
}
[After]
/**
* Dumps all views into the HTML export
*/
private function pdf_view_export_data() {
global $pdfrun;
static $browser;
static $page;
$progressstart = 85;
$progressend = 95;
$i = 0;
$viewcount = count($this->views);
if (system('command -v dpgk')) {
$command = 'dpkg -l';
} else {
$command = 'rpm -qa';
}
if (!isset($pdfrun) || $pdfrun == 'first' || $pdfrun == 'all') {
$browsertype = 'chromium-browser';
system($command . ' | grep ' . $browsertype, $error);
if ($error) {
$browsertype = 'chrome';
system($command . ' | grep ' . $browsertype, $error2);
if ($error2) {
throw new MaharaException('Need to have a Chrome browser installed to use the headless pdf option');
}
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1871718/+subscriptions
References