From: Arthur Date: Wed, 30 Nov 2016 08:13:22 +0000 (+0100) Subject: Merge pull request #699 from teromene/https-no-social X-Git-Tag: v0.8.1~10 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=fd7d9cad2bb6622400736b9dd4e22a38e63d9ee6;hp=76fb679e38c6237fc2e39c12b829068c374b8372;p=github%2Fshaarli%2FShaarli.git Merge pull request #699 from teromene/https-no-social Disable Firefox Social in the tools section if the page is not loaded using HTTPS. --- 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 @@