Skip to content
Snippets Groups Projects
Verified Commit fbf3f934 authored by Damien's avatar Damien
Browse files

[REFACTORING] Static database reset

parent 121c6bfb
No related branches found
No related tags found
No related merge requests found
......@@ -46,9 +46,7 @@ foreach ($customs as $custom) {
}
}
if (!empty($db)) {
$db->reset();
}
\SrcCore\models\DatabasePDO::reset();
$db = new \SrcCore\models\DatabasePDO(['customId' => $custom]);
foreach ($priorities as $key => $priority) {
......
......@@ -15,9 +15,7 @@ foreach ($customs as $custom) {
continue;
}
if (!empty($db)) {
$db->reset();
}
\SrcCore\models\DatabasePDO::reset();
$db = new \SrcCore\models\DatabasePDO(['customId' => $custom]);
......
......@@ -191,7 +191,7 @@ class DatabasePDO
return ['where' => $where, 'limit' => $limit];
}
public function reset()
public static function reset()
{
self::$pdo = null;
self::$preparedQueries = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment