Unsubstite constants (PHP 5 is now required)
This commit is contained in:
parent
205305d6b5
commit
af1a908f56
4 changed files with 8 additions and 8 deletions
|
@ -266,7 +266,7 @@ if (!defined("DRIVER")) {
|
|||
}
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$this->pdo->setAttribute(1000, !$unbuffered); // 1000 - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
|
||||
$this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, !$unbuffered);
|
||||
return parent::query($query, $unbuffered);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ function adminer_errors($errno, $errstr) {
|
|||
}
|
||||
|
||||
error_reporting(6135); // errors and warnings
|
||||
set_error_handler('adminer_errors', 2); // 2 - E_WARNING
|
||||
set_error_handler('adminer_errors', E_WARNING);
|
||||
|
||||
include "../adminer/include/coverage.inc.php";
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ if (extension_loaded('pdo')) {
|
|||
}
|
||||
|
||||
function dsn($dsn, $username, $password, $options = array()) {
|
||||
$options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_SILENT;
|
||||
$options[PDO::ATTR_STATEMENT_CLASS] = array('Min_PDOStatement');
|
||||
try {
|
||||
$this->pdo = new PDO($dsn, $username, $password, $options);
|
||||
} catch (Exception $ex) {
|
||||
auth_error(h($ex->getMessage()));
|
||||
}
|
||||
$this->pdo->setAttribute(3, 0); // 3 - PDO::ATTR_ERRMODE, 0 - PDO::ERRMODE_SILENT
|
||||
$this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
|
||||
$this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
|
||||
$this->server_info = @$this->pdo->getAttribute(PDO::ATTR_SERVER_VERSION);
|
||||
}
|
||||
|
||||
/*abstract function select_db($database);*/
|
||||
|
@ -84,11 +84,11 @@ if (extension_loaded('pdo')) {
|
|||
var $_offset = 0, $num_rows;
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->fetch(2); // PDO::FETCH_ASSOC
|
||||
return $this->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
function fetch_row() {
|
||||
return $this->fetch(3); // PDO::FETCH_NUM
|
||||
return $this->fetch(PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
function fetch_field() {
|
||||
|
|
|
@ -5,7 +5,7 @@ function adminer_errors($errno, $errstr) {
|
|||
}
|
||||
|
||||
error_reporting(6135); // errors and warnings
|
||||
set_error_handler('adminer_errors', 2); // 2 - E_WARNING
|
||||
set_error_handler('adminer_errors', E_WARNING);
|
||||
include dirname(__FILE__) . "/adminer/include/version.inc.php";
|
||||
include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php";
|
||||
|
||||
|
|
Loading…
Reference in a new issue