]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed paths.php from git
authorDavide Franco <bacula-dev@dflc.ch>
Fri, 18 Mar 2011 13:35:01 +0000 (14:35 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:08 +0000 (14:49 +0200)
 - Removed paths.php file from git and moved his content in config.inc.php
 - Made some code cleanup
 - Adapted includes in all php script after this change

gui/bacula-web/backupjob-report.php
gui/bacula-web/bgraph.inc.php
gui/bacula-web/bweb.inc.php
gui/bacula-web/config.inc.php
gui/bacula-web/index.php
gui/bacula-web/jobs.php
gui/bacula-web/paths.php [deleted file]
gui/bacula-web/pools.php
gui/bacula-web/report.php
gui/bacula-web/test.php

index 2857e211a94e157219ef5b5e5ec847d66418aa09..5453662a5fd669d699bd08303d7f9e3ffccde522 100644 (file)
@@ -1,6 +1,5 @@
 <?php\r
   session_start();\r
-  require_once('paths.php');
   include_once( 'bweb.inc.php' );
 \r
   $dbSql = new Bweb();\r
index 7d77de5e4eb0379b774d2f1804b8753aeffb06c7..05d5b9ad977e06a7d90ad6ee0286139f5648903a 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-require_once ("external_packages/phplot/phplot.php");
 
 class BGraph{
        private $title;
index bd7a04e3a0b60d8695f5f036df3415013f25bd9e..4490134421f1cf2897c7db6bb5d009476e206e04 100644 (file)
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+ 
 */
-require_once "paths.php";
-require_once($smarty_path."Smarty.class.php");
-
-require_once "DB.php";                                                                                                                  // Pear DB
 require_once "config.inc.php";
-require_once "bgraph.inc.php";
 
 class Bweb extends DB {
 
index abd6a01d0d21d11395bc986e4da45c23c89bf09e..6a28a47f736c1102491152cfa2665626e0db307c 100644 (file)
@@ -1,4 +1,22 @@
 <?php
+ // PhPlot (version 5.3.1) 
+ // http://www.phplot.com
+ $phplot_path = "external_packages/phplot/";
+
+ // Smarty (version 2.6.26)
+ // http://smarty.php.net
+ $smarty_path = "external_packages/smarty/libs/";
+
+ // Smarty_gettext (version 0.9)
+ // http://www.boom.org.il/smarty/gettext/
+ $smarty_gettext_path = "external_packages/smarty_gettext-0.9/"; 
+ require_once( $smarty_path . "Smarty.class.php");
+ require_once( $phplot_path . "phplot.php");
+ require_once "DB.php";   
+ require_once "bgraph.inc.php";
  // Global constants
  define('CONFIG_DIR', "configs");
  define('CONFIG_FILE', "bacula.conf");
@@ -6,7 +24,7 @@
  define('BACULA_TYPE_FILES_JOBID', 2);
  define('BACULA_TYPE_BYTES_ENDTIME_ALLJOBS', 69);
 
- // Intervalles in secondes
+ // Time intervals in secondes
  define( 'LAST_DAY', 86400 );
  define( 'LAST_WEEK', 604800 );
  define( 'LAST_MONTH', 2678400 );
index 976fb832a7adcf8bd2a63f5966d978a670589301..070347ac38a53ce9859079a242e7f36ef5a82790 100644 (file)
@@ -15,7 +15,6 @@
 +-------------------------------------------------------------------------+ 
 */
 session_start();
-require_once('paths.php');
 include_once( 'bweb.inc.php' );
 
 $dbSql = new Bweb();
index daea6dbad37b8205d1d5ca75ab5b75bc964bf54a..71f01b51cea198e2a3beb63fefe917876e6add54 100644 (file)
@@ -1,6 +1,5 @@
 <?php
   session_start();
-  require_once('paths.php');
   include_once( 'bweb.inc.php' );
 
   $dbSql = new Bweb();
diff --git a/gui/bacula-web/paths.php b/gui/bacula-web/paths.php
deleted file mode 100644 (file)
index fa3e6b0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-// LOCATION OF EXTERNAL PACKAGES
-// -----------------------------
-
-// PhPlot package. version 5.0RC1. http://www.phplot.com
-$phplot_path = "external_packages/phplot/";
-
-//Smarty package. version 2.6.10. http://smarty.php.net
-$smarty_path = "external_packages/smarty/libs/";
-
-//Smarty_gettext. version 0.9. http://www.boom.org.il/smarty/gettext/
-$smarty_gettext_path = "external_packages/smarty_gettext-0.9/"; 
-
-?>
\ No newline at end of file
index 3391920d704269c8b6579b13716d0dc6abfa20aa..90a4958ca42c2c2953bafd6a31e5fa9eb07da9e2 100644 (file)
@@ -1,6 +1,5 @@
 <?php
   session_start();
-  require_once('paths.php');
   include_once( 'bweb.inc.php' );
 
   $dbSql = new Bweb();
index b43402e58c553b6e53496abdb00e08595a108cc5..08def41ed1390c3100ad0a97fd69488ac54f664e 100644 (file)
@@ -15,7 +15,6 @@
 +-------------------------------------------------------------------------+ 
 */
 session_start();
-require_once('paths.php');
 include_once( 'bweb.inc.php' );
 
 $dbSql = new Bweb();
index a8407a53ed72d67365bd64d6bbf6814fd866c1f1..a595a65d849656a86eb22a822a6046fdc7776d78 100644 (file)
@@ -1,19 +1,7 @@
 <?php
-       require_once ("paths.php");
-       require_once ($smarty_path."Smarty.class.php");
        require_once ("bweb.inc.php");
-
-       $smarty = new Smarty(); 
-
-       // Smarty configuration
-       $smarty->compile_check  = true;
-       $smarty->debugging              = false;
-       $smarty->force_compile  = true;
-
-       $smarty->template_dir   = "./templates";
-       $smarty->compile_dir    = "./templates_c";
-       $smarty->config_dir     = "./configs";  
-  
+       $bw = new Bweb();
+       
        // Check result icon
     $check_result = array( true => 's_ok.png', false => 's_error.gif' );
        
@@ -75,7 +63,7 @@
        $graph->Render();
 
        // Parse to template
-       $smarty->assign( 'checks', $check_list );
-       $smarty->assign('graph_test', $graph->Get_Image_file() );
-       $smarty->display('test.tpl');
+       $bw->tpl->assign( 'checks', $check_list );
+       $bw->tpl->assign('graph_test', $graph->Get_Image_file() );
+       $bw->tpl->display('test.tpl');
 ?>