Commit 6c97dd7c authored by Karamel's avatar Karamel
Browse files

Remove unused SysModule DynamicDB.

parent 764f2e3f
......@@ -94,7 +94,6 @@ $filesToCheck = [
// Pastèque Web back office, Dynamic database module
// Copyright (C) 2015 Scil (
// This file is part of Pastèque.
// Pastèque is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Pastèque is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Pastèque. If not, see <>.
namespace Pasteque\Server\System\SysModules\Database;
class DynamicDB extends DBModule {
protected static $expectedProperties = array(
"db_dsn", "db_username", "db_password");
// Remember, this cache dies at the end of each HTTP request, no panic
private $data = NULL;
private function getLocalAuthDatabase() {
return new \PDO($this->getProperty('db_dsn'),
function getDatabase($uid) {
if ($this->data == NULL) {
$dbh = \Pasteque\get_local_auth_database();
$stmt = $dbh->prepare('SELECT * FROM pasteque_databases WHERE user_id = :user_id');
$stmt->bindParam(':user_id', $uid);
$result = $stmt->fetchAll();
if (count($result) != 1) {
die("No database found for " . $uid);
$data = $result[0];
return $data;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment