Reviewed: https://reviews.mahara.org/10903 Committed: https://git.mahara.org/mahara/mahara/commit/d60ec5790756abe199775774bf32ee2172c0cd05 Submitter: Robert Lyon ([email protected]) Branch: 20.04_STABLE
commit d60ec5790756abe199775774bf32ee2172c0cd05 Author: Mitsuhiro Yoshida <[email protected]> Date: Thu Apr 9 06:46:04 2020 +0900 Bug 1871718: Chrome browser availability check for RHEL/CentOS behatnotneeded Change-Id: I07fd774acbc41687d77b3379a19b9b15944208e0 (cherry picked from commit 2613dc3a6387cccdabbd10375df7b1cd79c6392f) -- 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

