mirror of
https://github.com/vrana/adminer.git
synced 2025-08-25 23:36:20 +02:00
Remove function minification for performance and customization
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@912 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -365,7 +365,6 @@ function email_header($header) {
|
||||
}
|
||||
|
||||
function call_adminer($method, $default, $arg1 = null, $arg2 = null, $arg3 = null) {
|
||||
// maintains original method name in minification
|
||||
if (method_exists('Adminer', $method)) { // user defined class
|
||||
// can use func_get_args() and call_user_func_array()
|
||||
return Adminer::$method($arg1, $arg2, $arg3);
|
||||
|
@@ -24,63 +24,13 @@ if (extension_loaded("mysqli")) {
|
||||
if (!$result) {
|
||||
return false;
|
||||
}
|
||||
$row = $result->_result->fetch_array();
|
||||
$row = $result->fetch_array();
|
||||
return $row[$field];
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return "'" . parent::escape_string($string) . "'";
|
||||
return "'" . $this->escape_string($string) . "'";
|
||||
}
|
||||
|
||||
// minification compatibility start
|
||||
function select_db($database) {
|
||||
return parent::select_db($database);
|
||||
}
|
||||
|
||||
function query($query) {
|
||||
// result is packed in envelope object to allow minification
|
||||
$result = parent::query($query);
|
||||
return (is_object($result) ? new Min_Result($result) : $result);
|
||||
}
|
||||
|
||||
function multi_query($query) {
|
||||
return parent::multi_query($query);
|
||||
}
|
||||
|
||||
function store_result() {
|
||||
$result = parent::store_result();
|
||||
return (is_object($result) ? new Min_Result($result) : $result);
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
return parent::next_result();
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
var $_result, $num_rows;
|
||||
|
||||
function __construct($result) {
|
||||
$this->_result = $result;
|
||||
$this->num_rows = $result->num_rows;
|
||||
}
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->_result->fetch_assoc();
|
||||
}
|
||||
|
||||
function fetch_row() {
|
||||
return $this->_result->fetch_row();
|
||||
}
|
||||
|
||||
function fetch_field() {
|
||||
return $this->_result->fetch_field();
|
||||
}
|
||||
|
||||
function free() {
|
||||
return $this->_result->free();
|
||||
}
|
||||
// minification compatibility end
|
||||
}
|
||||
|
||||
} elseif (extension_loaded("mysql")) {
|
||||
|
@@ -381,7 +381,7 @@ if (!$columns) {
|
||||
}
|
||||
echo "<fieldset><legend>" . lang('CSV Import') . "</legend><div><input type='hidden' name='token' value='$token'><input type='file' name='csv_file'> <input type='submit' name='import' value='" . lang('Import') . "'></div></fieldset>\n";
|
||||
|
||||
adminer_select_extra_display(array_filter($email_fields)); //! should use strlen but compile.php doesn't support array_filter
|
||||
adminer_select_extra_display(array_filter($email_fields, 'strlen'));
|
||||
|
||||
echo "</form>\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user