Subversion Repositories bacula-web

Rev

Blame | Last modification | View Log | RSS feed

diff -rup bacula-web_ORIG/classes.inc bacula-web/classes.inc
--- bacula-web_ORIG/classes.inc 2010-08-05 16:29:51.000000000 +0200
+++ bacula-web/classes.inc      2010-11-25 15:11:24.000000000 +0100
@@ -36,6 +36,7 @@ class Bweb extends DB {
         var $driver;
        var $dbs;
        var $dbs_name;
+       var $nameofdb;
 
 
 
@@ -43,13 +44,16 @@ class Bweb extends DB {
                 
                 $conf = new Config_File (CONFIG_DIR);
                $this->dbs = array();
+               $this->nameofdb = array();
                $i = 2;
                $sections = $conf->get(CONFIG_FILE,"DATABASE","host");
                array_push($this->dbs, "DATABASE");
+               array_push($this->nameofdb, $conf->get(CONFIG_FILE,"DATABASE","db_name"));
                while ( !empty($sections) ) {                
                        $sections = $conf->get(CONFIG_FILE,"DATABASE".$i,"host");
                        if ( !empty($sections) )
                                array_push($this->dbs,"DATABASE".$i);
+                               array_push($this->nameofdb, $conf->get(CONFIG_FILE,"DATABASE".$i,"db_name"));
                        $i++;
                }
 
diff -rup bacula-web_ORIG/index.php bacula-web/index.php
--- bacula-web_ORIG/index.php   2010-08-05 16:29:51.000000000 +0200
+++ bacula-web/index.php        2010-11-25 13:01:34.000000000 +0100
@@ -37,6 +37,7 @@ require("lang.php");
 if ( count($dbSql->dbs) >1 ) {
   $smarty->assign("dbs", $dbSql->dbs);
   $smarty->assign("dbs_now", $_SESSION['DATABASE']);
+  $smarty->assign("nameofdb", $dbSql->nameofdb);
 }
 
 // generaldata.tpl & last_run_report.tpl (last24bytes)
diff -rup bacula-web_ORIG/templates/header.tpl bacula-web/templates/header.tpl
--- bacula-web_ORIG/templates/header.tpl        2010-08-05 16:29:51.000000000 +0200
+++ bacula-web/templates/header.tpl     2010-11-25 12:38:12.000000000 +0100
@@ -21,7 +21,7 @@
                <td background="{#root#}/images/bg2.png" align="right" valign="top">
                {t}Select{/t}:
                <select name=sel_database style="font-family:verdana;font-size: 10px;color: white; background-color:#666;" onchange=submit()>
-               {html_options values=$dbs output=$dbs selected=$dbs_now}
+               {html_options values=$dbs output=$nameofdb selected=$dbs_now}
                </select>
                </td>
                </form>
@@ -36,4 +36,4 @@
        <img src="images/empty.png">
        </td>
  </tr>
-</table>
\ No newline at end of file
+</table>