Core update (localhost support)
This commit is contained in:
parent
724359ff54
commit
c8bdc7862d
3 changed files with 11 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
Yellow 0.5.23
|
||||
Yellow 0.5.24
|
||||
=============
|
||||
[](http://datenstrom.se/yellow)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Web interface core plugin
|
||||
class YellowWebinterface
|
||||
{
|
||||
const Version = "0.5.18";
|
||||
const Version = "0.5.19";
|
||||
var $yellow; //access to API
|
||||
var $active; //web interface is active? (boolean)
|
||||
var $userLoginFailed; //web interface login failed? (boolean)
|
||||
|
@ -624,26 +624,25 @@ class YellowWebinterfaceUsers
|
|||
{
|
||||
if($this->isExisting($email))
|
||||
{
|
||||
$serverScheme = $this->yellow->config->get("webinterfaceServerScheme");
|
||||
$serverName = $this->yellow->config->get("webinterfaceServerName");
|
||||
$location = $this->yellow->config->get("serverBase").$this->yellow->config->get("webinterfaceLocation");
|
||||
$domain = $this->yellow->config->get("webinterfaceServerName");
|
||||
$expire = time()+60*60*24*30*365;
|
||||
$session = $this->yellow->toolbox->createHash($this->users[$email]["hash"], "sha256");
|
||||
if(empty($session)) $session = "error-hash-algorithm-sha256";
|
||||
if($domain == "localhost") $domain = $expire = false;
|
||||
setcookie($cookieName, "$email,$session", $expire, $location, $domain,
|
||||
$this->yellow->config->get("webinterfaceServerScheme")=="https");
|
||||
if($serverName == "localhost") $serverName = false;
|
||||
setcookie($cookieName, "$email,$session", $expire, $location, $serverName, $serverScheme=="https");
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy browser cookie
|
||||
function destroyCookie($cookieName)
|
||||
{
|
||||
$serverScheme = $this->yellow->config->get("webinterfaceServerScheme");
|
||||
$serverName = $this->yellow->config->get("webinterfaceServerName");
|
||||
$location = $this->yellow->config->get("serverBase").$this->yellow->config->get("webinterfaceLocation");
|
||||
$domain = $this->yellow->config->get("webinterfaceServerName");
|
||||
$expire = time()-3600;
|
||||
if($domain == "localhost") $domain = $expire = false;
|
||||
setcookie($cookieName, "", $expire, $location, $domain,
|
||||
$this->yellow->config->get("webinterfaceServerScheme")=="https");
|
||||
if($serverName == "localhost") $serverName = false;
|
||||
setcookie($cookieName, "", time()-3600, $location, $serverName, $serverScheme=="https");
|
||||
}
|
||||
|
||||
// Return information from browser cookie
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Yellow main class
|
||||
class Yellow
|
||||
{
|
||||
const Version = "0.5.23";
|
||||
const Version = "0.5.24";
|
||||
var $page; //current page
|
||||
var $pages; //pages from file system
|
||||
var $files; //files from file system
|
||||
|
|
Loading…
Add table
Reference in a new issue