packages: bacula-gui/bacula-web.patch (NEW) - bacula web webapps hacking

glen glen at pld-linux.org
Mon Jul 20 18:21:27 CEST 2009


Author: glen                         Date: Mon Jul 20 16:21:27 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- bacula web webapps hacking

---- Files affected:
packages/bacula-gui:
   bacula-web.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/bacula-gui/bacula-web.patch
diff -u /dev/null packages/bacula-gui/bacula-web.patch:1.1
--- /dev/null	Mon Jul 20 18:21:27 2009
+++ packages/bacula-gui/bacula-web.patch	Mon Jul 20 18:21:22 2009
@@ -0,0 +1,98 @@
+--- bacula-gui-2.4.4/bacula-web/index.php~	2009-07-20 18:51:35.000000000 +0300
++++ bacula-gui-2.4.4/bacula-web/index.php	2009-07-20 18:52:12.016384629 +0300
+@@ -26,8 +26,8 @@
+ //$smarty->compile_check = true;
+ //$smarty->debugging = true;
+ $smarty->template_dir = "./templates";
+-$smarty->compile_dir = "./templates_c";
+-$smarty->config_dir     = "./configs";
++$smarty->compile_dir = "/var/cache/bacula-web";
++$smarty->config_dir     = "/etc/webapps/bacula-web";
+ $smarty->config_load("bacula.conf");                                                                                    // Load config file
+ $mode = $smarty->get_config_vars("mode");                                                                               // Lite o Extend?
+ 
+--- ./bacula-web/lang.php~	2005-06-19 12:57:55.000000000 +0300
++++ ./bacula-web/lang.php	2009-07-20 19:01:05.259658012 +0300
+@@ -18,15 +18,11 @@
+ // and we check if it is present at the system
+ 
+ if ( function_exists("gettext") ) {
+-        require($smarty_gettext_path."smarty_gettext.php");     
+-        $smarty->register_block('t','smarty_translate');
+-        
+         $vars = $smarty->get_config_vars();
+         $language = $vars['lang'];
+-        $domain = "messages";   
++        $domain = "bacula-web";   
+         putenv("LANG=$language"); 
+         setlocale(LC_ALL, $language);
+-        bindtextdomain($domain,"./locale");
+         textdomain($domain);
+ }
+ else {
+--- ./bacula-web/paths.php~	2005-10-06 17:45:48.000000000 +0300
++++ ./bacula-web/paths.php	2009-07-20 19:01:53.826992837 +0300
+@@ -3,12 +3,12 @@
+ // -----------------------------
+ 
+ // PhPlot package. version 5.0RC1. http://www.phplot.com
+-$phplot_path = "external_packages/phplot/";
++$phplot_path = "/usr/share/php/phplot/";
+ 
+ //Smarty package. version 2.6.10. http://smarty.php.net
+-$smarty_path = "external_packages/smarty/";
++$smarty_path = "Smarty/";
+ 
+ //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
++?>
+--- ./bacula-web/classes.inc	2009-07-20 18:57:32.147464445 +0300
++++ ./bacula-web/classes.inc	2009-07-20 19:12:27.596925323 +0300
+@@ -15,7 +15,7 @@
+ +-------------------------------------------------------------------------+ 
+ */
+ // Last Err: 11
+-define('CONFIG_DIR', "configs");
++define('CONFIG_DIR', "/etc/webapps/bacula-web");
+ define('CONFIG_FILE', "bacula.conf");
+ define('BACULA_TYPE_BYTES_FILES', 1);
+ define('BACULA_TYPE_FILES_JOBID', 2);
+@@ -187,7 +187,7 @@
+         
+                 global $type;
+         
+-                require_once ("external_packages/phplot/phplot.php");
++                require_once ("phplot/phplot.php");
+ 
+                 if ( empty($this->sizex) || empty($this->sizey) ) {    //Default size
+                         $this->sizex = "600";
+--- ./bacula-web/report.php~	2005-10-06 17:45:48.000000000 +0300
++++ ./bacula-web/report.php	2009-07-20 19:13:50.036496326 +0300
+@@ -25,8 +25,8 @@
+ //$smarty->debugging = true;
+ 
+ $smarty->template_dir   = "./templates";
+-$smarty->compile_dir    = "./templates_c";
+-$smarty->config_dir     = "./configs";
++$smarty->compile_dir = "/var/cache/bacula-web";
++$smarty->config_dir     = "/etc/webapps/bacula-web";
+ $smarty->config_load("bacula.conf");
+ require("lang.php");
+ 
+--- ./bacula-web/templates/header.tpl~	2005-10-06 18:08:14.000000000 +0300
++++ ./bacula-web/templates/header.tpl	2009-07-20 19:15:47.352895730 +0300
+@@ -32,8 +32,8 @@
+  	Bugs?
+  	</a>
+  	</td>
+- 	<td background="images/end2.png>
++ 	<td background="images/end2.png">
+  	<img src="images/empty.png">
+  	</td>
+  </tr>
+-</table>
+\ No newline at end of file
++</table>
================================================================


More information about the pld-cvs-commit mailing list