use Friendica\BaseObject;
use Friendica\Core\Session;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
use SessionHandlerInterface;
-use dba;
require_once 'boot.php';
require_once 'include/dba.php';
return '';
}
- $session = dba::selectFirst('session', ['data'], ['sid' => $session_id]);
- if (DBM::is_result($session)) {
+ $session = DBA::selectFirst('session', ['data'], ['sid' => $session_id]);
+ if (DBA::isResult($session)) {
Session::$exists = true;
return $session['data'];
}
if (Session::$exists) {
$fields = ['data' => $session_data, 'expire' => $expire];
$condition = ["`sid` = ? AND (`data` != ? OR `expire` != ?)", $session_id, $session_data, $expire];
- dba::update('session', $fields, $condition);
+ DBA::update('session', $fields, $condition);
} else {
$fields = ['sid' => $session_id, 'expire' => $default_expire, 'data' => $session_data];
- dba::insert('session', $fields);
+ DBA::insert('session', $fields);
}
return true;
public function destroy($id)
{
- dba::delete('session', ['sid' => $id]);
+ DBA::delete('session', ['sid' => $id]);
return true;
}
public function gc($maxlifetime)
{
- dba::delete('session', ["`expire` < ?", time()]);
+ DBA::delete('session', ["`expire` < ?", time()]);
return true;
}
}