From c665385ff6ed7a6924717fe6dfe97e1e0cc112aa Mon Sep 17 00:00:00 2001 From: Sergio Giraldo Date: Sat, 9 Sep 2023 22:26:11 +0200 Subject: [PATCH 1/3] feat: make the email button optional. Issue #1031 ::by sergio giraldo @ 20230909T2226CEST, gpg signed --- cfg/conf.sample.php | 10 ++++++++-- lib/Configuration.php | 1 + lib/Controller.php | 1 + tpl/bootstrap.php | 11 +++++++++++ tpl/page.php | 5 +++++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index 09bb9e19..f65fbb35 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -1,4 +1,5 @@ -; '', 'urlshortener' => '', 'qrcode' => true, + 'email' => true, 'icon' => 'identicon', 'cspheader' => 'default-src \'none\'; base-uri \'self\'; form-action \'none\'; manifest-src \'self\'; connect-src * blob:; script-src \'self\' \'unsafe-eval\'; style-src \'self\'; font-src \'self\'; frame-ancestors \'none\'; img-src \'self\' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads', 'zerobincompatibility' => false, diff --git a/lib/Controller.php b/lib/Controller.php index bb5450ca..6a68a2e5 100644 --- a/lib/Controller.php +++ b/lib/Controller.php @@ -411,6 +411,7 @@ class Controller $page->assign('EXPIREDEFAULT', $this->_conf->getKey('default', 'expire')); $page->assign('URLSHORTENER', $this->_conf->getKey('urlshortener')); $page->assign('QRCODE', $this->_conf->getKey('qrcode')); + $page->assign('EMAIL', $this->_conf->getKey('email')); $page->assign('HTTPWARNING', $this->_conf->getKey('httpwarning')); $page->assign('HTTPSLINK', 'https://' . $this->_request->getHost() . $this->_request->getRequestUri()); $page->assign('COMPRESSION', $this->_conf->getKey('compression')); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 7d1d1879..2190be2f 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -144,6 +144,7 @@ if ($QRCODE) : +