Skip to content
Permalink
Browse files

Merge pull request #372 from diegoscl/patch-1

Change Google Infographics API to quickchart.io
  • Loading branch information...
splitbrain committed Mar 21, 2019
2 parents 329348c + 9b2636c commit c6ca97c71c1b7d489ed7c8f6712b460d5492ce3e
Showing with 3 additions and 3 deletions.
  1. +3 −3 action.php
@@ -663,12 +663,12 @@ protected function load_template() {
protected function page_depend_replacements($raw, $id) {
global $REV, $DATE_AT;
// generate qr code for this page using google infographics api
// generate qr code for this page using quickchart.io (Google infographics api was deprecated in March 14, 2019)
$qr_code = '';
if($this->getConf('qrcodesize')) {
$url = urlencode(wl($id, '', '&', true));
$qr_code = '<img src="https://chart.googleapis.com/chart?chs=' .
$this->getConf('qrcodesize') . '&cht=qr&chl=' . $url . '" />';
$qr_code = '<img src="https://quickchart.io/qr?size=' .
$this->getConf('qrcodesize') . '&text=' . $url . '&margin=1&ecLevel=Q" />';
}
// prepare replacements
$replace['@ID@'] = $id;

0 comments on commit c6ca97c

Please sign in to comment.
You can’t perform that action at this time.