mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
Line endings are converted to unix style
This commit is contained in:
parent
164f4f7cdf
commit
15a857e411
35 changed files with 1484 additions and 1484 deletions
|
@ -1,57 +1,57 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Core/Session.php
|
||||
*/
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Core\Session\DatabaseSessionHandler;
|
||||
use Friendica\Core\Session\MemcacheSessionHandler;
|
||||
|
||||
/**
|
||||
* High-level Session service class
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
*/
|
||||
class Session
|
||||
{
|
||||
public static $exists = false;
|
||||
public static $expire = 180000;
|
||||
|
||||
public static function init()
|
||||
{
|
||||
ini_set('session.gc_probability', 50);
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
|
||||
if (Config::get('system', 'ssl_policy') == SSL_POLICY_FULL) {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
|
||||
if (!Config::get('system', 'disable_database_session')) {
|
||||
$memcache = Cache::memcache();
|
||||
if (is_object($memcache)) {
|
||||
$SessionHandler = new MemcacheSessionHandler($memcache);
|
||||
} else {
|
||||
$SessionHandler = new DatabaseSessionHandler();
|
||||
}
|
||||
|
||||
session_set_save_handler($SessionHandler);
|
||||
}
|
||||
}
|
||||
|
||||
public static function exists($name)
|
||||
{
|
||||
return isset($_SESSION[$name]);
|
||||
}
|
||||
|
||||
public static function get($name)
|
||||
{
|
||||
return defaults($_SESSION, $name, null);
|
||||
}
|
||||
|
||||
public static function set($name, $value)
|
||||
{
|
||||
$_SESSION[$name] = $value;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Core/Session.php
|
||||
*/
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Core\Session\DatabaseSessionHandler;
|
||||
use Friendica\Core\Session\MemcacheSessionHandler;
|
||||
|
||||
/**
|
||||
* High-level Session service class
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
*/
|
||||
class Session
|
||||
{
|
||||
public static $exists = false;
|
||||
public static $expire = 180000;
|
||||
|
||||
public static function init()
|
||||
{
|
||||
ini_set('session.gc_probability', 50);
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
|
||||
if (Config::get('system', 'ssl_policy') == SSL_POLICY_FULL) {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
|
||||
if (!Config::get('system', 'disable_database_session')) {
|
||||
$memcache = Cache::memcache();
|
||||
if (is_object($memcache)) {
|
||||
$SessionHandler = new MemcacheSessionHandler($memcache);
|
||||
} else {
|
||||
$SessionHandler = new DatabaseSessionHandler();
|
||||
}
|
||||
|
||||
session_set_save_handler($SessionHandler);
|
||||
}
|
||||
}
|
||||
|
||||
public static function exists($name)
|
||||
{
|
||||
return isset($_SESSION[$name]);
|
||||
}
|
||||
|
||||
public static function get($name)
|
||||
{
|
||||
return defaults($_SESSION, $name, null);
|
||||
}
|
||||
|
||||
public static function set($name, $value)
|
||||
{
|
||||
$_SESSION[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue