From 48ee741b057af7afa63127d1d1135008a6fda9ef Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Wed, 23 Mar 2011 16:44:01 +0100 Subject: [PATCH] bacula-web: New function Get_Catalogs() in BW_Config classe - Used in header template to generate option list of catalogs --- gui/bacula-web/classes/cfg/config.classe.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gui/bacula-web/classes/cfg/config.classe.php b/gui/bacula-web/classes/cfg/config.classe.php index 6a500c9e98..a9273846eb 100644 --- a/gui/bacula-web/classes/cfg/config.classe.php +++ b/gui/bacula-web/classes/cfg/config.classe.php @@ -41,6 +41,15 @@ return $config[$param]; } + public function Get_Catalogs() + { + $result = array(); + foreach( $this->catalogs as $db ) + array_push( $result, $db['label']); + + return $result; + } + public function Count_Catalogs() { return count( $this->catalogs ); -- 2.39.5