mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
PHP: Use namespace
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
$drivers["mongo"] = "MongoDB (alpha)";
|
||||
|
||||
if (isset($_GET["mongo"])) {
|
||||
|
@@ -5,6 +5,8 @@
|
||||
* @author Jakub Vrana
|
||||
*/
|
||||
|
||||
namespace Adminer;
|
||||
|
||||
$drivers["mssql"] = "MS SQL";
|
||||
|
||||
if (isset($_GET["mssql"])) {
|
||||
|
@@ -1,11 +1,13 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
$drivers = array("server" => "MySQL") + $drivers;
|
||||
|
||||
if (!defined("DRIVER")) {
|
||||
define("DRIVER", "server"); // server - backwards compatibility
|
||||
// MySQLi supports everything, MySQL doesn't support multiple result sets, PDO_MySQL doesn't support orgtable
|
||||
if (extension_loaded("mysqli")) {
|
||||
class Min_DB extends MySQLi {
|
||||
class Min_DB extends \MySQLi {
|
||||
var $extension = "MySQLi";
|
||||
|
||||
function __construct() {
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
$drivers["oracle"] = "Oracle (beta)";
|
||||
|
||||
if (isset($_GET["oracle"])) {
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
$drivers["pgsql"] = "PostgreSQL";
|
||||
|
||||
if (isset($_GET["pgsql"])) {
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
$drivers["sqlite"] = "SQLite";
|
||||
|
||||
if (isset($_GET["sqlite"])) {
|
||||
@@ -9,7 +11,7 @@ if (isset($_GET["sqlite"])) {
|
||||
var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error, $_link;
|
||||
|
||||
function __construct($filename) {
|
||||
$this->_link = new SQLite3($filename);
|
||||
$this->_link = new \SQLite3($filename);
|
||||
$version = $this->_link->version();
|
||||
$this->server_info = $version["versionString"];
|
||||
}
|
||||
@@ -90,7 +92,7 @@ if (isset($_GET["sqlite"])) {
|
||||
|
||||
}
|
||||
|
||||
if (class_exists("Min_SQLite")) {
|
||||
if (class_exists('Adminer\Min_SQLite')) {
|
||||
class Min_DB extends Min_SQLite {
|
||||
|
||||
function __construct() {
|
||||
|
Reference in New Issue
Block a user