diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index 09bb9e19..8c8eeb6a 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -65,6 +65,10 @@ languageselection = false ; It works both when a new paste is created and when you view a paste. ; qrcode = true +; (optional) Let users send an email sharing the paste URL with one click. +; It works both when a new paste is created and when you view a paste. +; email = true + ; (optional) IP based icons are a weak mechanism to detect if a comment was from ; a different user when the same username was used in a comment. It might get ; used to get the IP of a comment poster if the server salt is leaked and a diff --git a/lib/Configuration.php b/lib/Configuration.php index 523bf289..4eedfc43 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -53,6 +53,7 @@ class Configuration 'languagedefault' => '', '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..f2c2c078 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -144,6 +144,7 @@ if ($QRCODE) :
+