ALPHA 3.0.2a

This commit is contained in:
TheGamecraft
2018-09-10 08:51:18 -04:00
parent 7fe13ae0a7
commit 0e0ef86b71
1404 changed files with 10604 additions and 33714 deletions

View File

@@ -24,7 +24,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler
private $mongo;
/**
* @var \MongoCollection
* @var \MongoDB\Collection
*/
private $collection;
@@ -143,21 +143,12 @@ class MongoDbSessionHandler extends AbstractSessionHandler
{
$expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000);
if ($this->mongo instanceof \MongoDB\Client) {
$methodName = 'updateOne';
$options = array();
} else {
$methodName = 'update';
$options = array('multiple' => false);
}
$this->getCollection()->$methodName(
$this->getCollection()->updateOne(
array($this->options['id_field'] => $sessionId),
array('$set' => array(
$this->options['time_field'] => new \MongoDB\BSON\UTCDateTime(),
$this->options['expiry_field'] => $expiry,
)),
$options
))
);
return true;
@@ -181,7 +172,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler
}
/**
* @return \MongoCollection
* @return \MongoDB\Collection
*/
private function getCollection()
{