updated plugins and version; added table filter

This commit is contained in:
Pau Capó 2018-02-17 16:12:52 +01:00
parent b92f7a0a63
commit 8c7fe51582
9 changed files with 1153 additions and 1107 deletions

View file

@ -2,9 +2,9 @@
/** Adminer customization allowing usage of plugins
* @link https://www.adminer.org/plugins/#use
* @author Jakub Vrana, http://www.vrana.cz/
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
* @author Jakub Vrana, https://www.vrana.cz/
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerPlugin extends Adminer {
/** @access protected */
@ -62,7 +62,10 @@ class AdminerPlugin extends Adminer {
$return = $this->_callParent($function, $args);
foreach ($this->plugins as $plugin) {
if (method_exists($plugin, $function)) {
$return += call_user_func_array(array($plugin, $function), $args);
$value = call_user_func_array(array($plugin, $function), $args);
if ($value) {
$return += $value;
}
}
}
return $return;
@ -97,11 +100,21 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function connectSsl() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function permanentLogin($create = false) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function serverName($server) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function database() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
@ -127,11 +140,21 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function csp() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function head() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function css() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function loginForm() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
@ -172,7 +195,7 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function selectQuery($query, $time) {
function selectQuery($query, $start, $failed = false) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
@ -297,7 +320,7 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function messageQuery($query, $time) {
function messageQuery($query, $time, $failed = false) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
@ -307,6 +330,11 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function editHint($table, $field, $value) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function processInput($field, $value, $function = "") {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
@ -337,6 +365,11 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function importServerPath() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function homepage() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
@ -357,4 +390,4 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
}
}