Skip to content

Instantly share code, notes, and snippets.

@lucien144
Last active December 11, 2018 04:32
Show Gist options
  • Save lucien144/dc34bb91cde424681ac1d701d7f6e8e6 to your computer and use it in GitHub Desktop.
Save lucien144/dc34bb91cde424681ac1d701d7f6e8e6 to your computer and use it in GitHub Desktop.
Adminer self-update
<?php
function adminer_object() {
// required to run any plugin
include_once "./plugins/plugin.php";
// autoloader
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
$plugins = array(
// specify enabled plugins here
new AdminerColors([
# specify as many servers as you want
'adminer.dev' => '#00C94A',
'localhost' => '#00C94A',
'127.0.0.1' => '#00C94A',
'::1' => '#00C94A',
]),
);
return new AdminerPlugin($plugins);
}
// include original Adminer or Adminer Editor
include "./latest.php";
#!/bin/bash
cd "$(dirname "$0")"
mkdir plugins
rm index.php
rm latest.php
rm plugins/plugin.php
rm plugins/AdminerColors.php
wget https://www.adminer.org/latest.php
wget https://gist.githubusercontent.com/lucien144/dc34bb91cde424681ac1d701d7f6e8e6/raw/0d7d7d4749eaaa396bf607d792c0513b74202dad/index.php
cd plugins/
wget https://raw.github.com/vrana/adminer/master/plugins/plugin.php
wget https://raw.githubusercontent.com/lucien144/adminer-colors/master/AdminerColors.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment