From 96bb938787bf0c1261525a35e2dc25f1ec924067 Mon Sep 17 00:00:00 2001 From: Dan Garner Date: Mon, 29 Jan 2018 17:18:39 +0000 Subject: [PATCH 1/2] Fix issue with PHP5 sessions (can't login) --- lib/Helper/Session.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Helper/Session.php b/lib/Helper/Session.php index ddbf7e512f..6f3333cdc7 100644 --- a/lib/Helper/Session.php +++ b/lib/Helper/Session.php @@ -286,10 +286,15 @@ public function setUser($userId) public function regenerateSessionId() { //$this->log->debug('Session regenerate'); - session_regenerate_id(true); $this->key = session_id(); + + // PHP7 calls open/close on regenerate + // PHP5 does neither + if (version_compare(phpversion(), '7.0') === -1) { + $this->insertSession($this->key, '', time(), time() + $this->maxLifetime); + } } /** From a999ad4f8b3567281f389390dbe17f33e2395c86 Mon Sep 17 00:00:00 2001 From: Dan Garner Date: Tue, 30 Jan 2018 08:24:05 +0000 Subject: [PATCH 2/2] Fix issue with DarkSky wrong API url --- lib/Widget/ForecastIo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Widget/ForecastIo.php b/lib/Widget/ForecastIo.php index a4c035b8a1..683a245858 100644 --- a/lib/Widget/ForecastIo.php +++ b/lib/Widget/ForecastIo.php @@ -36,7 +36,7 @@ */ class ForecastIo extends ModuleWidget { - const API_ENDPOINT = 'https://api.darksky.net/forecast/player/'; + const API_ENDPOINT = 'https://api.darksky.net/forecast/'; private $resourceFolder; protected $codeSchemaVersion = 1; @@ -46,7 +46,7 @@ class ForecastIo extends ModuleWidget */ public function init() { - $this->resourceFolder = PROJECT_ROOT . '/modules/forecastio'; + $this->resourceFolder = PROJECT_ROOT . '/modules/forecastio/player'; // Initialise extra validation rules v::with('Xibo\\Validation\\Rules\\');