mirror of
https://github.com/friendica/friendica
synced 2025-04-25 15:10:13 +00:00
Rename Friendica\Database\dba to Friendica\Database\DBA
This commit is contained in:
parent
b6a1df0598
commit
af6dbc654f
127 changed files with 1169 additions and 1169 deletions
|
@ -4,7 +4,7 @@ namespace Friendica\Core\Session;
|
|||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use SessionHandlerInterface;
|
||||
|
||||
|
@ -30,7 +30,7 @@ class DatabaseSessionHandler extends BaseObject implements SessionHandlerInterfa
|
|||
return '';
|
||||
}
|
||||
|
||||
$session = dba::selectFirst('session', ['data'], ['sid' => $session_id]);
|
||||
$session = DBA::selectFirst('session', ['data'], ['sid' => $session_id]);
|
||||
if (DBM::is_result($session)) {
|
||||
Session::$exists = true;
|
||||
return $session['data'];
|
||||
|
@ -67,10 +67,10 @@ class DatabaseSessionHandler extends BaseObject implements SessionHandlerInterfa
|
|||
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;
|
||||
|
@ -83,13 +83,13 @@ class DatabaseSessionHandler extends BaseObject implements SessionHandlerInterfa
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue