From e61c44ef466c802581f3f72b5e8f712262965a82 Mon Sep 17 00:00:00 2001 From: ZerooCool Date: Wed, 1 Jul 2020 19:47:12 +0200 Subject: [PATCH] Make Opengraph really functional Make Opengraph really functional Change : #664 for #651 --- cfg/conf.sample.php | 2 +- lib/Configuration.php | 2 +- lib/Controller.php | 2 +- tpl/bootstrap.php | 6 +++--- tst/ViewTest.php | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index 06f403ef..6b9295e4 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -9,7 +9,7 @@ ; The full URL, with the domain name and directories that point to the PrivateBin files ; This URL is essential to allow Opengraph images to be displayed on social networks -; path = "" +; basepath = "" ; enable or disable the discussion feature, defaults to true discussion = true diff --git a/lib/Configuration.php b/lib/Configuration.php index 90134c1f..f929c816 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -38,7 +38,7 @@ class Configuration private static $_defaults = array( 'main' => array( 'name' => 'PrivateBin', - 'path' => '', + 'basepath' => '', 'discussion' => true, 'opendiscussion' => false, 'password' => true, diff --git a/lib/Controller.php b/lib/Controller.php index 6b6769d9..744a5237 100644 --- a/lib/Controller.php +++ b/lib/Controller.php @@ -369,7 +369,7 @@ class Controller $page = new View; $page->assign('NAME', $this->_conf->getKey('name')); - $page->assign('PATH', I18n::_($this->_conf->getKey('path'))); + $page->assign('BASEPATH', I18n::_($this->_conf->getKey('basepath'))); $page->assign('ERROR', I18n::_($this->_error)); $page->assign('STATUS', I18n::_($this->_status)); $page->assign('VERSION', self::VERSION); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 899be8b7..003c668a 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -74,7 +74,7 @@ endif; - + @@ -86,11 +86,11 @@ endif; - + - + diff --git a/tst/ViewTest.php b/tst/ViewTest.php index 7bab1663..2be83b43 100644 --- a/tst/ViewTest.php +++ b/tst/ViewTest.php @@ -34,6 +34,7 @@ class ViewTest extends PHPUnit_Framework_TestCase /* Setup Routine */ $page = new View; $page->assign('NAME', 'PrivateBinTest'); + $page->assign('BASEPATH', false); $page->assign('ERROR', self::$error); $page->assign('STATUS', self::$status); $page->assign('VERSION', self::$version);