Skip to content

Commit 563d00d

Browse files
committed
custom phpMyAdmin and phpPgAdmin links
1 parent bdac016 commit 563d00d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

web/list/db/index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
// Panel
1212
top_panel($user,$TAB);
1313

14+
// SYS
15+
exec (VESTA_CMD."v-list-sys-config json", $output, $return_var);
16+
$sys = json_decode(implode('', $output), true);
17+
unset($output);
18+
1419
// Data
1520
exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
1621
$data = json_decode(implode('', $output), true);

web/templates/admin/list_db.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@
4545
if ($data[$key]['HOST'] != 'localhost' ) $http_host = $data[$key]['HOST'];
4646
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
4747
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/";
48+
if (($data[$key]['TYPE'] == 'mysql') && (!empty($sys['config']['DB_PMA_URL']))) $db_admin_link = $sys['config']['DB_PMA_URL'];
4849
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
4950
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phppgadmin/";
51+
if (($data[$key]['TYPE'] == 'pgsql') && (!empty($sys['config']['DB_PGA_URL']))) $db_admin_link = $sys['config']['DB_PGA_URL'];
5052
?>
5153
<tr class="data-row">
5254
<td class="data-dotted" width="150">

web/templates/user/list_db.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
if ($data[$key]['HOST'] != 'localhost' ) $http_host = $data[$key]['HOST'];
4242
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
4343
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/";
44+
if (($data[$key]['TYPE'] == 'mysql') && (!empty($sys['config']['DB_PMA_URL']))) $db_admin_link = $sys['config']['DB_PMA_URL'];
4445
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
4546
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phppgadmin/";
47+
if (($data[$key]['TYPE'] == 'pgsql') && (!empty($sys['config']['DB_PGA_URL']))) $db_admin_link = $sys['config']['DB_PGA_URL'];
4648
?>
4749
<tr class="data-row">
4850
<td class="data-dotted" width="150">

0 commit comments

Comments
 (0)