From f037967820b2df6eeb85d3f28c1a6b1240ae49ad Mon Sep 17 00:00:00 2001 From: rugk Date: Fri, 29 Sep 2017 18:59:02 +0200 Subject: [PATCH] changes the file extension to php and adds a small one-liner to stop PHP from presenting the file to any website visitor Signed-off-by: El RIDO --- lib/Configuration.php | 2 +- tst/JsonApiTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Configuration.php b/lib/Configuration.php index b6b9f6f4..d9d70bff 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -100,7 +100,7 @@ class Configuration public function __construct() { $config = array(); - $configFile = PATH . 'cfg' . DIRECTORY_SEPARATOR . 'conf.ini'; + $configFile = PATH . 'cfg' . DIRECTORY_SEPARATOR . 'conf.php'; if (is_readable($configFile)) { $config = parse_ini_file($configFile, true); foreach (array('main', 'model', 'model_options') as $section) { diff --git a/tst/JsonApiTest.php b/tst/JsonApiTest.php index a5928893..cd27cd83 100644 --- a/tst/JsonApiTest.php +++ b/tst/JsonApiTest.php @@ -283,7 +283,7 @@ class JsonApiTest extends PHPUnit_Framework_TestCase $this->reset(); $paste = Helper::getPasteWithAttachment(); $this->_model->create(Helper::getPasteId(), $paste); - $_GET['jsonld'] = '../cfg/conf.ini'; + $_GET['jsonld'] = CONF; ob_start(); new PrivateBin; $content = ob_get_contents();