From caa382dd55c285306a3f48bb54678cf787d842e1 Mon Sep 17 00:00:00 2001 From: Teromene Date: Tue, 29 Nov 2016 11:06:31 +0000 Subject: [PATCH] Disable Firefox Social in the tools section if the page is not loaded using HTTPS, as Firefox will deny the request. --- index.php | 1 + tpl/tools.html | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 84282b8d..5366cb0e 100644 --- a/index.php +++ b/index.php @@ -1078,6 +1078,7 @@ function renderPage($conf, $pluginManager) { $data = array( 'pageabsaddr' => index_url($_SERVER), + 'sslenabled' => !empty($_SERVER['HTTPS']) ); $pluginManager->executeHooks('render_tools', $data); diff --git a/tpl/tools.html b/tpl/tools.html index 8e285f44..e06d239d 100644 --- a/tpl/tools.html +++ b/tpl/tools.html @@ -50,12 +50,15 @@     Then click "✚Add Note" button anytime to start composing a private Note (text post) to your Shaarli.

+ + {if="$sslenabled"} ✚Add to Firefox social ⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox.

+ {/if} {loop="$tools_plugin"} {$value} @@ -64,6 +67,7 @@