update adminer and adapt plugins to new version
This commit is contained in:
parent
5659ab8524
commit
f66a311358
15 changed files with 1411 additions and 1975 deletions
|
|
@ -9,8 +9,8 @@
|
||||||
class AdminerEditForeign {
|
class AdminerEditForeign {
|
||||||
var $_limit;
|
var $_limit;
|
||||||
|
|
||||||
function __construct($limit = 0) {
|
function __construct() {
|
||||||
$this->_limit = $limit;
|
$this->_limit = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
function editInput($table, $field, $attrs, $value) {
|
function editInput($table, $field, $attrs, $value) {
|
||||||
|
|
@ -18,7 +18,7 @@ class AdminerEditForeign {
|
||||||
static $values = array();
|
static $values = array();
|
||||||
$foreignKeys = &$foreignTables[$table];
|
$foreignKeys = &$foreignTables[$table];
|
||||||
if ($foreignKeys === null) {
|
if ($foreignKeys === null) {
|
||||||
$foreignKeys = column_foreign_keys($table);
|
$foreignKeys = Adminer\column_foreign_keys($table);
|
||||||
}
|
}
|
||||||
foreach ((array) $foreignKeys[$field["field"]] as $foreignKey) {
|
foreach ((array) $foreignKeys[$field["field"]] as $foreignKey) {
|
||||||
if (count($foreignKey["source"]) == 1) {
|
if (count($foreignKey["source"]) == 1) {
|
||||||
|
|
@ -26,16 +26,16 @@ class AdminerEditForeign {
|
||||||
$id = $foreignKey["target"][0];
|
$id = $foreignKey["target"][0];
|
||||||
$options = &$values[$target][$id];
|
$options = &$values[$target][$id];
|
||||||
if (!$options) {
|
if (!$options) {
|
||||||
$column = idf_escape($id);
|
$column = Adminer\idf_escape($id);
|
||||||
if (preg_match('~binary~', $field["type"])) {
|
if (preg_match('~binary~', $field["type"])) {
|
||||||
$column = "HEX($column)";
|
$column = "HEX($column)";
|
||||||
}
|
}
|
||||||
$options = array("" => "") + get_vals("SELECT $column FROM " . table($target) . " ORDER BY 1" . ($this->_limit ? " LIMIT " . ($this->_limit + 1) : ""));
|
$options = array("" => "") + Adminer\get_vals("SELECT $column FROM " . Adminer\table($target) . " ORDER BY 1" . ($this->_limit ? " LIMIT " . ($this->_limit + 1) : ""));
|
||||||
if ($this->_limit && count($options) - 1 > $this->_limit) {
|
if ($this->_limit && count($options) - 1 > $this->_limit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "<select$attrs>" . optionlist($options, $value) . "</select>";
|
return "<select$attrs>" . Adminer\optionlist($options, $value) . "</select>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@ class AdminerEnumOption {
|
||||||
$options = array();
|
$options = array();
|
||||||
$selected = $value;
|
$selected = $value;
|
||||||
if (isset($_GET["select"])) {
|
if (isset($_GET["select"])) {
|
||||||
$options[-1] = lang('original');
|
$options[-1] = Adminer\lang('original');
|
||||||
if ($selected === null) {
|
if ($selected === null) {
|
||||||
$selected = -1;
|
$selected = -1;
|
||||||
}
|
}
|
||||||
|
|
@ -24,7 +24,7 @@ class AdminerEnumOption {
|
||||||
$selected = "";
|
$selected = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$options[0] = lang('empty');
|
$options[0] = Adminer\lang('empty');
|
||||||
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
||||||
foreach ($matches[1] as $i => $val) {
|
foreach ($matches[1] as $i => $val) {
|
||||||
$val = stripcslashes(str_replace("''", "'", $val));
|
$val = stripcslashes(str_replace("''", "'", $val));
|
||||||
|
|
@ -33,7 +33,7 @@ class AdminerEnumOption {
|
||||||
$selected = $i + 1;
|
$selected = $i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "<select$attrs>" . optionlist($options, (string) $selected, 1) . "</select>"; // 1 - use keys
|
return "<select$attrs>" . Adminer\optionlist($options, (string) $selected, 1) . "</select>"; // 1 - use keys
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* Modified 201802 - updated for Adminer 4.6.0 compatibility
|
* Modified 201802 - updated for Adminer 4.6.0 compatibility
|
||||||
*/
|
*/
|
||||||
class FasterTablesFilter {
|
class AdminerFasterTablesFilter {
|
||||||
function tablesPrint($tables) { ?>
|
function tablesPrint($tables) { ?>
|
||||||
|
|
||||||
<p class="jsonly"><input id="filter-field">
|
<p class="jsonly"><input id="filter-field">
|
||||||
|
|
@ -19,7 +19,7 @@ class FasterTablesFilter {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<p id='tables'></p>
|
<p id='tables'></p>
|
||||||
<script<?php echo nonce(); ?>>
|
<script<?php echo Adminer\nonce(); ?>>
|
||||||
function readCookie(name) {
|
function readCookie(name) {
|
||||||
name = name.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
name = name.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
||||||
var regex = new RegExp('(?:^|;)\\s?' + name + '=(.*?)(?:;|$)','i'),
|
var regex = new RegExp('(?:^|;)\\s?' + name + '=(.*?)(?:;|$)','i'),
|
||||||
|
|
@ -53,9 +53,9 @@ class FasterTablesFilter {
|
||||||
}
|
}
|
||||||
var tables = [<?php foreach($tables as $table => $type) { echo "'".urlencode($table) ."'". ",";}?>];
|
var tables = [<?php foreach($tables as $table => $type) { echo "'".urlencode($table) ."'". ",";}?>];
|
||||||
var tempTables = tables;
|
var tempTables = tables;
|
||||||
var hMe = "<?php echo h(ME) ?>";
|
var hMe = "<?php echo Adminer\h(Adminer\ME) ?>";
|
||||||
hMe = hMe.replace(/&/g, '&');
|
hMe = hMe.replace(/&/g, '&');
|
||||||
var langSelect = "<?php echo lang('select');?>";
|
var langSelect = "<?php echo Adminer\lang('select');?>";
|
||||||
var filterCookie = readCookie('tableFilter');
|
var filterCookie = readCookie('tableFilter');
|
||||||
var filter = document.getElementById("filter-field");
|
var filter = document.getElementById("filter-field");
|
||||||
if(filterCookie!='') {
|
if(filterCookie!='') {
|
||||||
|
|
@ -31,7 +31,7 @@ class AdminerJsonColumn
|
||||||
?>
|
?>
|
||||||
<a href="#" id="toggle_json_<?= $name ?>">show as table</a><br>
|
<a href="#" id="toggle_json_<?= $name ?>">show as table</a><br>
|
||||||
<pre id="show_json_<?= $name ?>" style="display: none;max-height:600px;overflow:auto;" contenteditable><code class="language-json"><?= $json; ?></code></pre>
|
<pre id="show_json_<?= $name ?>" style="display: none;max-height:600px;overflow:auto;" contenteditable><code class="language-json"><?= $json; ?></code></pre>
|
||||||
<script <?= nonce() ?>>
|
<script <?= Adminer\nonce() ?>>
|
||||||
document.getElementById('toggle_json_<?= $name ?>').addEventListener('click', function (e) {
|
document.getElementById('toggle_json_<?= $name ?>').addEventListener('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var show = document.getElementById('show_json_<?= $name ?>');
|
var show = document.getElementById('show_json_<?= $name ?>');
|
||||||
|
|
@ -14,7 +14,7 @@ class AdminerLoginSqlite {
|
||||||
|
|
||||||
function loginForm() {
|
function loginForm() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" <?= nonce() ?>>
|
<script type="text/javascript" <?= Adminer\nonce() ?>>
|
||||||
addEventListener('load', function () {
|
addEventListener('load', function () {
|
||||||
var driver = document.getElementsByName('auth[driver]')[0];
|
var driver = document.getElementsByName('auth[driver]')[0];
|
||||||
if (isTag(driver, 'select')) {
|
if (isTag(driver, 'select')) {
|
||||||
|
|
@ -6,13 +6,13 @@
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
* @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)
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||||
*/
|
*/
|
||||||
class Prism
|
class AdminerPrism
|
||||||
{
|
{
|
||||||
|
|
||||||
function head()
|
function head()
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<script<?= nonce() ?>>
|
<script<?= Adminer\nonce() ?>>
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
document.querySelectorAll('[class^=jush-]').forEach(function ($item) {
|
document.querySelectorAll('[class^=jush-]').forEach(function ($item) {
|
||||||
const current_class = $item.getAttribute('class').trim();
|
const current_class = $item.getAttribute('class').trim();
|
||||||
|
|
@ -28,8 +28,8 @@ class Prism
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" type="text/css" href="assets/prism.css?<?= filemtime(__DIR__ . '/../assets/prism.js') ?>"/>
|
<link rel="stylesheet" type="text/css" href="assets/prism.css?<?= filemtime(__DIR__ . '/../assets/prism.js') ?>"/>
|
||||||
<script <?= nonce() ?> src="assets/prism.js?<?= filemtime(__DIR__ . '/../assets/prism.js') ?>"></script>
|
<script <?= Adminer\nonce() ?> src="assets/prism.js?<?= filemtime(__DIR__ . '/../assets/prism.js') ?>"></script>
|
||||||
<script<?= nonce() ?>>
|
<script<?= Adminer\nonce() ?>>
|
||||||
// Prism.hooks.add('before-highlight', function (env) {
|
// Prism.hooks.add('before-highlight', function (env) {
|
||||||
// env.code = env.element.innerText;
|
// env.code = env.element.innerText;
|
||||||
// });
|
// });
|
||||||
|
|
@ -32,6 +32,6 @@ EOT;
|
||||||
|
|
||||||
function head()
|
function head()
|
||||||
{
|
{
|
||||||
echo script($this->prepend);
|
echo Adminer\script($this->prepend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -44,7 +44,7 @@ EOT;
|
||||||
|
|
||||||
function head()
|
function head()
|
||||||
{
|
{
|
||||||
echo script($this->prepend);
|
echo Adminer\script($this->prepend);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -36,7 +36,7 @@ class AdminerXMLColumn
|
||||||
?>
|
?>
|
||||||
<a href="#" id="toggle_xml_<?= $name ?>">show as table</a><br>
|
<a href="#" id="toggle_xml_<?= $name ?>">show as table</a><br>
|
||||||
<pre id="show_xml_<?= $name ?>" style="display: none"><code class="language-xml"><?= $xml ?></code></pre>
|
<pre id="show_xml_<?= $name ?>" style="display: none"><code class="language-xml"><?= $xml ?></code></pre>
|
||||||
<script <?= nonce() ?>>
|
<script <?= Adminer\nonce() ?>>
|
||||||
document.getElementById('toggle_xml_<?= $name ?>').addEventListener('click', function (e) {
|
document.getElementById('toggle_xml_<?= $name ?>').addEventListener('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var show = document.getElementById('show_xml_<?= $name ?>');
|
var show = document.getElementById('show_xml_<?= $name ?>');
|
||||||
2902
adminer.php
2902
adminer.php
File diff suppressed because one or more lines are too long
28
index.php
28
index.php
|
|
@ -1,20 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
error_reporting(0);
|
//error_reporting(0);
|
||||||
|
|
||||||
function adminer_object() {
|
//function adminer_object() {
|
||||||
include_once "./plugin.php";
|
// include_once "./plugin.php";
|
||||||
$plugins = array();
|
// $plugins = array();
|
||||||
|
//
|
||||||
foreach (glob("plugins/*.php") as $filename) {
|
// foreach (glob("plugins/*.php") as $filename) {
|
||||||
include_once "./$filename";
|
// include_once "./$filename";
|
||||||
$plugin = str_replace('plugins/', '', $filename);
|
// $plugin = str_replace('plugins/', '', $filename);
|
||||||
$plugin = str_replace('.php', '', $plugin);
|
// $plugin = str_replace('.php', '', $plugin);
|
||||||
$plugins[] = new $plugin();
|
// $plugins[] = new $plugin();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return new AdminerPlugin($plugins);
|
// return new AdminerPlugin($plugins);
|
||||||
}
|
//}
|
||||||
|
|
||||||
$_SESSION["lang"] = 'en';
|
$_SESSION["lang"] = 'en';
|
||||||
$_COOKIE["adminer_lang"] = 'en';
|
$_COOKIE["adminer_lang"] = 'en';
|
||||||
|
|
|
||||||
402
plugin.php
402
plugin.php
|
|
@ -1,402 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/** Adminer customization allowing usage of plugins
|
|
||||||
* @link https://www.adminer.org/plugins/#use
|
|
||||||
* @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 */
|
|
||||||
var $plugins;
|
|
||||||
|
|
||||||
function _findRootClass($class) { // is_subclass_of(string, string) is available since PHP 5.0.3
|
|
||||||
do {
|
|
||||||
$return = $class;
|
|
||||||
} while ($class = get_parent_class($class));
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Register plugins
|
|
||||||
* @param array object instances or null to register all classes starting by 'Adminer'
|
|
||||||
*/
|
|
||||||
function __construct($plugins) {
|
|
||||||
if ($plugins === null) {
|
|
||||||
$plugins = array();
|
|
||||||
foreach (get_declared_classes() as $class) {
|
|
||||||
if (preg_match('~^Adminer.~i', $class) && strcasecmp($this->_findRootClass($class), 'Adminer')) { //! can use interface
|
|
||||||
$plugins[$class] = new $class;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->plugins = $plugins;
|
|
||||||
//! it is possible to use ReflectionObject to find out which plugins defines which methods at once
|
|
||||||
}
|
|
||||||
|
|
||||||
function _callParent($function, $args) {
|
|
||||||
return call_user_func_array(array('parent', $function), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _applyPlugin($function, $args) {
|
|
||||||
foreach ($this->plugins as $plugin) {
|
|
||||||
if (method_exists($plugin, $function)) {
|
|
||||||
switch (count($args)) { // call_user_func_array() doesn't work well with references
|
|
||||||
case 0: $return = $plugin->$function(); break;
|
|
||||||
case 1: $return = $plugin->$function($args[0]); break;
|
|
||||||
case 2: $return = $plugin->$function($args[0], $args[1]); break;
|
|
||||||
case 3: $return = $plugin->$function($args[0], $args[1], $args[2]); break;
|
|
||||||
case 4: $return = $plugin->$function($args[0], $args[1], $args[2], $args[3]); break;
|
|
||||||
case 5: $return = $plugin->$function($args[0], $args[1], $args[2], $args[3], $args[4]); break;
|
|
||||||
case 6: $return = $plugin->$function($args[0], $args[1], $args[2], $args[3], $args[4], $args[5]); break;
|
|
||||||
default: trigger_error('Too many parameters.', E_USER_WARNING);
|
|
||||||
}
|
|
||||||
if ($return !== null) {
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $this->_callParent($function, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _appendPlugin($function, $args) {
|
|
||||||
$return = $this->_callParent($function, $args);
|
|
||||||
foreach ($this->plugins as $plugin) {
|
|
||||||
if (method_exists($plugin, $function)) {
|
|
||||||
$value = call_user_func_array(array($plugin, $function), $args);
|
|
||||||
if ($value) {
|
|
||||||
$return += $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// appendPlugin
|
|
||||||
|
|
||||||
function dumpFormat() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_appendPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dumpOutput() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_appendPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function editFunctions($field) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_appendPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
// applyPlugin
|
|
||||||
|
|
||||||
function name() {
|
|
||||||
return '<span class="title">' . $_SERVER['HTTP_HOST'] . '</span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function credentials() {
|
|
||||||
$args = func_get_args();
|
|
||||||
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 bruteForceKey() {
|
|
||||||
$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);
|
|
||||||
}
|
|
||||||
|
|
||||||
function schemas() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function databases($flush = true) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function queryTimeout() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function headers() {
|
|
||||||
$args = func_get_args();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
function loginFormField($name, $heading, $value) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function login($login, $password) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tableName($tableStatus) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fieldName($field, $order = 0) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectLinks($tableStatus, $set = "") {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function foreignKeys($table) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function backwardKeys($table, $tableName) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function backwardKeysPrint($backwardKeys, $row) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectQuery($query, $start, $failed = false) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function sqlCommandQuery($query) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function rowDescription($table) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function rowDescriptions($rows, $foreignKeys) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectLink($val, $field) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectVal($val, $link, $field, $original) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function editVal($val, $field) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tableStructurePrint($fields) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tableIndexesPrint($indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectColumnsPrint($select, $columns) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectSearchPrint($where, $columns, $indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectOrderPrint($order, $columns, $indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectLimitPrint($limit) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectLengthPrint($text_length) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectActionPrint($indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectCommandPrint() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectImportPrint() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectEmailPrint($emailFields, $columns) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectColumnsProcess($columns, $indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectSearchProcess($fields, $indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectOrderProcess($fields, $indexes) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectLimitProcess() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectLengthProcess() {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectEmailProcess($where, $foreignKeys) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectQueryBuild($select, $where, $group, $order, $limit, $page) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function messageQuery($query, $time, $failed = false) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function editInput($table, $field, $attrs, $value) {
|
|
||||||
$args = func_get_args();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dumpDatabase($db) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dumpTable($table, $style, $is_view = 0) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dumpData($table, $style, $query) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dumpFilename($identifier) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dumpHeaders($identifier, $multi_table = false) {
|
|
||||||
$args = func_get_args();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
function navigation($missing) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function databasesPrint($missing) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tablesPrint($tables) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return $this->_applyPlugin(__FUNCTION__, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
10
update.sh
10
update.sh
|
|
@ -1,8 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
URL=$(curl -s https://api.github.com/repos/adminerevo/adminerevo/releases/latest |
|
#URL=$(curl -s https://api.github.com/repos/adminerevo/adminerevo/releases/latest |
|
||||||
grep browser_download_url | grep "adminer-" |
|
# grep browser_download_url | grep "adminer-" |
|
||||||
cut -d : -f 2,3 |
|
# cut -d : -f 2,3 |
|
||||||
tr -d \")
|
# tr -d \")
|
||||||
|
|
||||||
|
URL="https://www.adminer.org/latest-en.php"
|
||||||
|
|
||||||
wget -q $URL -O adminer.php
|
wget -q $URL -O adminer.php
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue