Loading Makefile +11 −6 Original line number Diff line number Diff line Loading @@ -121,21 +121,26 @@ else @echo "Done!" endif pdfexportfile := $(shell ls -d htdocs/lib/chrome-php/headless-chromium-php-master 2>/dev/null) pdfexportdir := $(shell ls -d htdocs/lib/chrome-php/ 2>/dev/null) pdfexportfile := $(shell ls -d htdocs/lib/chrome-php/chrome-0.11/ 2>/dev/null) cleanpdfexport: @echo "Cleaning out PDF export files..." rm -rf htdocs/lib/chrome-php pdfexport: initcomposer ifdef pdfexportdir ifdef pdfexportfile @echo "PDF export files already exists - doing nothing" else @echo "Pulling Headless-chromium-php from download ..." @curl -sSL https://github.com/chrome-php/headless-chromium-php/archive/0.10.zip -o pdf_tmp.zip && unzip pdf_tmp.zip -d htdocs/lib/chrome-php && rm pdf_tmp.zip @php external/composer.phar --working-dir=htdocs/lib/chrome-php/headless-chromium-php-0.10 install @find htdocs/lib/chrome-php/headless-chromium-php-0.10 -type f -name composer.json -delete @find htdocs/lib/chrome-php/headless-chromium-php-0.10 -type f -name composer.lock -delete @echo "Older PDF export files exists - update via: make cleanpdfexport && make pdfexport" endif else @echo "Pulling chrome-0.11 from download ..." @curl -sSL https://github.com/chrome-php/chrome/archive/0.11.zip -o pdf_tmp.zip && unzip pdf_tmp.zip -d htdocs/lib/chrome-php && rm pdf_tmp.zip @php external/composer.phar --working-dir=htdocs/lib/chrome-php/chrome-0.11 install @find htdocs/lib/chrome-php/chrome-0.11 -type f -name composer.json -delete @find htdocs/lib/chrome-php/chrome-0.11 -type f -name composer.lock -delete @find htdocs/lib/chrome-php -type d -name Tests -exec rm -r {} + @echo "Done!" endif Loading htdocs/export/pdf/lib.php +3 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ if (db_table_exists('export_installed')) { $pdfactive = get_field('export_installed', 'active', 'name', 'pdf'); } $chromephpexists = file_exists(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-0.10/vendor/autoload.php'); $chromephpexists = file_exists(get_config('docroot') . 'lib/chrome-php/chrome-0.11/vendor/autoload.php'); if (($pdfactive && !$chromephpexists) || ($pdfactive && $chromephpexists && !get_config('usepdfexport'))) { global $SESSION; Loading @@ -31,7 +31,7 @@ if (($pdfactive && !$chromephpexists) || } } else if ($pdfactive) { require_once(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-0.10/vendor/autoload.php'); require_once(get_config('docroot') . 'lib/chrome-php/chrome-0.11/vendor/autoload.php'); } use HeadlessChromium\BrowserFactory; use HeadlessChromium\Cookies\Cookie; Loading Loading @@ -116,7 +116,7 @@ class PluginExportPdf extends PluginExportHtml { $needs = get_string('needschromeheadless', 'export.pdf'); // make sure that composer has installed the headlessbrowser hook $requires = array(); if (!file_exists(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-0.10/src/BrowserFactory.php')) { if (!file_exists(get_config('docroot') . 'lib/chrome-php/chrome-0.11/src/BrowserFactory.php')) { $requires[] = get_string('needschromeheadlessphp', 'export.pdf'); } Loading Loading
Makefile +11 −6 Original line number Diff line number Diff line Loading @@ -121,21 +121,26 @@ else @echo "Done!" endif pdfexportfile := $(shell ls -d htdocs/lib/chrome-php/headless-chromium-php-master 2>/dev/null) pdfexportdir := $(shell ls -d htdocs/lib/chrome-php/ 2>/dev/null) pdfexportfile := $(shell ls -d htdocs/lib/chrome-php/chrome-0.11/ 2>/dev/null) cleanpdfexport: @echo "Cleaning out PDF export files..." rm -rf htdocs/lib/chrome-php pdfexport: initcomposer ifdef pdfexportdir ifdef pdfexportfile @echo "PDF export files already exists - doing nothing" else @echo "Pulling Headless-chromium-php from download ..." @curl -sSL https://github.com/chrome-php/headless-chromium-php/archive/0.10.zip -o pdf_tmp.zip && unzip pdf_tmp.zip -d htdocs/lib/chrome-php && rm pdf_tmp.zip @php external/composer.phar --working-dir=htdocs/lib/chrome-php/headless-chromium-php-0.10 install @find htdocs/lib/chrome-php/headless-chromium-php-0.10 -type f -name composer.json -delete @find htdocs/lib/chrome-php/headless-chromium-php-0.10 -type f -name composer.lock -delete @echo "Older PDF export files exists - update via: make cleanpdfexport && make pdfexport" endif else @echo "Pulling chrome-0.11 from download ..." @curl -sSL https://github.com/chrome-php/chrome/archive/0.11.zip -o pdf_tmp.zip && unzip pdf_tmp.zip -d htdocs/lib/chrome-php && rm pdf_tmp.zip @php external/composer.phar --working-dir=htdocs/lib/chrome-php/chrome-0.11 install @find htdocs/lib/chrome-php/chrome-0.11 -type f -name composer.json -delete @find htdocs/lib/chrome-php/chrome-0.11 -type f -name composer.lock -delete @find htdocs/lib/chrome-php -type d -name Tests -exec rm -r {} + @echo "Done!" endif Loading
htdocs/export/pdf/lib.php +3 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ if (db_table_exists('export_installed')) { $pdfactive = get_field('export_installed', 'active', 'name', 'pdf'); } $chromephpexists = file_exists(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-0.10/vendor/autoload.php'); $chromephpexists = file_exists(get_config('docroot') . 'lib/chrome-php/chrome-0.11/vendor/autoload.php'); if (($pdfactive && !$chromephpexists) || ($pdfactive && $chromephpexists && !get_config('usepdfexport'))) { global $SESSION; Loading @@ -31,7 +31,7 @@ if (($pdfactive && !$chromephpexists) || } } else if ($pdfactive) { require_once(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-0.10/vendor/autoload.php'); require_once(get_config('docroot') . 'lib/chrome-php/chrome-0.11/vendor/autoload.php'); } use HeadlessChromium\BrowserFactory; use HeadlessChromium\Cookies\Cookie; Loading Loading @@ -116,7 +116,7 @@ class PluginExportPdf extends PluginExportHtml { $needs = get_string('needschromeheadless', 'export.pdf'); // make sure that composer has installed the headlessbrowser hook $requires = array(); if (!file_exists(get_config('docroot') . 'lib/chrome-php/headless-chromium-php-0.10/src/BrowserFactory.php')) { if (!file_exists(get_config('docroot') . 'lib/chrome-php/chrome-0.11/src/BrowserFactory.php')) { $requires[] = get_string('needschromeheadlessphp', 'export.pdf'); } Loading