-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/1.0.0: Adjust directory structure Switch PHP comment syntax for INI files Add adminer.php to .gitignore
- Loading branch information
Showing
22 changed files
with
82 additions
and
881 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
config.ini | ||
adminer.php | ||
.verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
### | ||
### MySQL socket | ||
### | ||
; | ||
; MySQL socket | ||
; | ||
mysql = localhost:/var/run/mysqld/mysqld.sock | ||
|
||
### | ||
### Adminer Version | ||
### latest stable version: http://www.adminer.org/latest[-mysql][-de].php | ||
### | ||
; | ||
; Adminer Version | ||
; latest stable version: http://www.adminer.org/latest[-mysql][-de].php | ||
; | ||
|
||
### All, multi-language | ||
# version=latest.php | ||
; All, multi-language | ||
; version = latest.php | ||
|
||
### MySQL only, multi-language | ||
; MySQL only, multi-language | ||
version = latest-mysql.php | ||
|
||
### MySQL only, german | ||
# version=latest-mysql-de.php | ||
; MySQL only, german | ||
; version = latest-mysql-de.php | ||
|
||
### | ||
### Adminer Theme | ||
### https://github.com/pematon/adminer-theme | ||
### | ||
### If not set, use default theme | ||
### | ||
#theme = default-orange | ||
#theme = default-blue | ||
#theme = default-green | ||
; | ||
; Adminer Theme | ||
; https://github.com/pematon/adminer-theme | ||
; | ||
; If not set, use default theme | ||
; | ||
; theme = default-orange | ||
; theme = default-blue | ||
; theme = default-green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1 @@ | ||
<?php | ||
|
||
extension_loaded('newrelic') && newrelic_set_appname('Adminer'); | ||
|
||
$cfg = 'config/config.ini'; | ||
|
||
if (!file_exists($cfg)) die('Missing configuration file!'); | ||
|
||
$config = parse_ini_file($cfg); | ||
|
||
function adminer_object() | ||
{ | ||
// Plugins auto-loader | ||
foreach (glob("plugins/*.php") as $filename) { | ||
include_once $filename; | ||
} | ||
|
||
global $config; | ||
|
||
$plugins = [ | ||
new AdminerLoginSingleServer($config['mysql']), | ||
new AdminerJsonColumn | ||
]; | ||
if (isset($config['theme'])) { | ||
$plugins[] = new AdminerTheme($config['theme']); | ||
} | ||
return new AdminerPlugin($plugins); | ||
} | ||
|
||
include 'adminer.php'; | ||
<?php header('Location: public/'); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
if (!file_exists('../.verbose')) { | ||
// Quiet | ||
ini_set('display_errors', 0); | ||
error_reporting(0); | ||
} else { | ||
// Quiet | ||
ini_set('display_errors', 1); | ||
error_reporting(-1); | ||
} | ||
|
||
extension_loaded('newrelic') && newrelic_set_appname('Adminer'); | ||
|
||
$cfg = '../config/config.ini'; | ||
|
||
if (!file_exists($cfg)) { | ||
die('Missing configuration file!'); | ||
} | ||
|
||
$config = parse_ini_file($cfg); | ||
|
||
if (!file_exists('../adminer.php')) { | ||
// Load inital | ||
exec('bin/update.sh'); | ||
die(header('Location: '.$_SERVER['REQUEST_URI'])); | ||
} | ||
|
||
/** | ||
* Wrapper function | ||
*/ | ||
function adminer_object() | ||
{ | ||
global $config; | ||
|
||
// Plugins auto-loader | ||
foreach (glob('../plugins/*.php') as $filename) { | ||
include_once $filename; | ||
} | ||
|
||
$plugins = array( | ||
new AdminerLoginSingleServer($config['mysql']), | ||
new AdminerJsonColumn | ||
); | ||
|
||
if (isset($config['theme'])) { | ||
$plugins[] = new AdminerTheme($config['theme']); | ||
} | ||
|
||
return new AdminerPlugin($plugins); | ||
} | ||
|
||
include '../adminer.php'; |