Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | madcat | 1 | diff -rup bacula-web_ORIG/classes.inc bacula-web/classes.inc |
2 | --- bacula-web_ORIG/classes.inc 2010-08-05 16:29:51.000000000 +0200 |
||
3 | +++ bacula-web/classes.inc 2010-11-25 15:11:24.000000000 +0100 |
||
4 | @@ -36,6 +36,7 @@ class Bweb extends DB { |
||
5 | var $driver; |
||
6 | var $dbs; |
||
7 | var $dbs_name; |
||
8 | + var $nameofdb; |
||
9 | |||
10 | |||
11 | |||
12 | @@ -43,13 +44,16 @@ class Bweb extends DB { |
||
13 | |||
14 | $conf = new Config_File (CONFIG_DIR); |
||
15 | $this->dbs = array(); |
||
16 | + $this->nameofdb = array(); |
||
17 | $i = 2; |
||
18 | $sections = $conf->get(CONFIG_FILE,"DATABASE","host"); |
||
19 | array_push($this->dbs, "DATABASE"); |
||
20 | + array_push($this->nameofdb, $conf->get(CONFIG_FILE,"DATABASE","db_name")); |
||
21 | while ( !empty($sections) ) { |
||
22 | $sections = $conf->get(CONFIG_FILE,"DATABASE".$i,"host"); |
||
23 | if ( !empty($sections) ) |
||
24 | array_push($this->dbs,"DATABASE".$i); |
||
25 | + array_push($this->nameofdb, $conf->get(CONFIG_FILE,"DATABASE".$i,"db_name")); |
||
26 | $i++; |
||
27 | } |
||
28 | |||
29 | diff -rup bacula-web_ORIG/index.php bacula-web/index.php |
||
30 | --- bacula-web_ORIG/index.php 2010-08-05 16:29:51.000000000 +0200 |
||
31 | +++ bacula-web/index.php 2010-11-25 13:01:34.000000000 +0100 |
||
32 | @@ -37,6 +37,7 @@ require("lang.php"); |
||
33 | if ( count($dbSql->dbs) >1 ) { |
||
34 | $smarty->assign("dbs", $dbSql->dbs); |
||
35 | $smarty->assign("dbs_now", $_SESSION['DATABASE']); |
||
36 | + $smarty->assign("nameofdb", $dbSql->nameofdb); |
||
37 | } |
||
38 | |||
39 | // generaldata.tpl & last_run_report.tpl (last24bytes) |
||
40 | diff -rup bacula-web_ORIG/templates/header.tpl bacula-web/templates/header.tpl |
||
41 | --- bacula-web_ORIG/templates/header.tpl 2010-08-05 16:29:51.000000000 +0200 |
||
42 | +++ bacula-web/templates/header.tpl 2010-11-25 12:38:12.000000000 +0100 |
||
43 | @@ -21,7 +21,7 @@ |
||
44 | <td background="{#root#}/images/bg2.png" align="right" valign="top"> |
||
45 | {t}Select{/t}: |
||
46 | <select name=sel_database style="font-family:verdana;font-size: 10px;color: white; background-color:#666;" onchange=submit()> |
||
47 | - {html_options values=$dbs output=$dbs selected=$dbs_now} |
||
48 | + {html_options values=$dbs output=$nameofdb selected=$dbs_now} |
||
49 | </select> |
||
50 | </td> |
||
51 | </form> |
||
52 | @@ -36,4 +36,4 @@ |
||
53 | <img src="images/empty.png"> |
||
54 | </td> |
||
55 | </tr> |
||
56 | -</table> |
||
57 | \ No newline at end of file |
||
58 | +</table> |