mirror of
https://github.com/friendica/friendica
synced 2025-04-27 20:30:13 +00:00
Session - Remove unneeded cookie parameter
This commit is contained in:
parent
ae0421f321
commit
673c4537e4
4 changed files with 5 additions and 23 deletions
|
@ -3,21 +3,11 @@
|
|||
|
||||
namespace Friendica\Core\Session;
|
||||
|
||||
use Friendica\Model\User\Cookie;
|
||||
|
||||
/**
|
||||
* Contains the base methods for $_SESSION interaction
|
||||
*/
|
||||
class AbstractSession
|
||||
{
|
||||
/** @var Cookie */
|
||||
protected $cookie;
|
||||
|
||||
public function __construct( Cookie $cookie)
|
||||
{
|
||||
$this->cookie = $cookie;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Friendica\Core\Session;
|
||||
|
||||
use Friendica\Model\User\Cookie;
|
||||
|
||||
/**
|
||||
* Usable for backend processes (daemon/worker) and testing
|
||||
*
|
||||
|
@ -11,10 +9,8 @@ use Friendica\Model\User\Cookie;
|
|||
*/
|
||||
final class Memory extends AbstractSession implements ISession
|
||||
{
|
||||
public function __construct(Cookie $cookie)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($cookie);
|
||||
|
||||
// Backward compatibility until all Session variables are replaced
|
||||
// with the Session class
|
||||
$_SESSION = [];
|
||||
|
|
|
@ -11,10 +11,8 @@ use SessionHandlerInterface;
|
|||
*/
|
||||
final class Native extends AbstractSession implements ISession
|
||||
{
|
||||
public function __construct(App\BaseURL $baseURL, Cookie $cookie, SessionHandlerInterface $handler = null)
|
||||
public function __construct(App\BaseURL $baseURL, SessionHandlerInterface $handler = null)
|
||||
{
|
||||
parent::__construct($cookie);
|
||||
|
||||
ini_set('session.gc_probability', 50);
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.cookie_httponly', (int)Cookie::HTTPONLY);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue