Code

Merged branch 'tg/master'.
[pkg-mlmmj.git] / debian / patches / 02_fix_mlmmj_php.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 02_fix_mlmmj_php.dpatch by Søren Boll Overgaard <boll@tristram.fork.dk>
3 ##
4 ## DP: Adapt pathes and settings used in the web interface to match the
5 ## DP: (FHS compliant) installation paths.
7 @DPATCH@
9 diff a/contrib/web/php-admin/conf/config.php b/contrib/web/php-admin/conf/config.php
10 --- a/contrib/web/php-admin/conf/config.php
11 +++ b/contrib/web/php-admin/conf/config.php
12 @@ -1,6 +1,6 @@
13  <?php
14  
15  $topdir = "/var/spool/mlmmj";
16 -$templatedir = "/home/mlmmj/templates";
17 +$templatedir = "/usr/share/mlmmj-php-web-admin/templates/";
18  
19  ?>
20 diff a/contrib/web/php-admin/htdocs/dot.htaccess b/contrib/web/php-admin/htdocs/dot.htaccess
21 --- a/contrib/web/php-admin/htdocs/dot.htaccess
22 +++ b/contrib/web/php-admin/htdocs/dot.htaccess
23 @@ -1,4 +1,4 @@
24  Require valid-user
25  AuthType Basic
26 -AuthName "mlmmj web-interface"
27 -AuthUserFile /home/mlmmj/htpasswd
28 +AuthName "mlmmj web-interface on Debian GNU/Linux"
29 +AuthUserFile /etc/mlmmj-php-web-admin/htpasswd
30 diff a/contrib/web/php-admin/htdocs/edit.php b/contrib/web/php-admin/htdocs/edit.php
31 --- a/contrib/web/php-admin/htdocs/edit.php
32 +++ b/contrib/web/php-admin/htdocs/edit.php
33 @@ -26,7 +26,7 @@
34   * IN THE SOFTWARE.
35   */
36  
37 -require("../conf/config.php");
38 +require("conf/config.php");
39  require("class.FastTemplate.php");
40  
41  function mlmmj_boolean($name, $nicename, $text) 
42 diff a/contrib/web/php-admin/htdocs/index.php b/contrib/web/php-admin/htdocs/index.php
43 --- a/contrib/web/php-admin/htdocs/index.php
44 +++ b/contrib/web/php-admin/htdocs/index.php
45 @@ -27,7 +27,7 @@
46   */
47  
48  require("class.FastTemplate.php");
49 -require("../conf/config.php");
50 +require("conf/config.php");
51  
52  $tpl = new FastTemplate($templatedir);
53  
54 diff a/contrib/web/php-admin/htdocs/save.php b/contrib/web/php-admin/htdocs/save.php
55 --- a/contrib/web/php-admin/htdocs/save.php
56 +++ b/contrib/web/php-admin/htdocs/save.php
57 @@ -26,7 +26,7 @@
58   * IN THE SOFTWARE.
59   */
60  
61 -require("../conf/config.php");
62 +require("conf/config.php");
63  require("class.FastTemplate.php");
64  
65  function mlmmj_boolean($name, $nicename, $text)
66 diff a/contrib/web/php-user/example.html b/contrib/web/php-user/example.html
67 --- a/contrib/web/php-user/example.html
68 +++ b/contrib/web/php-user/example.html
69 @@ -1,7 +1,7 @@
70  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
71  <html>
72  <head>
73 -<title>mlmmj-webinterface</title>
74 +<title>mlmmj web interface</title>
75  </head>
76  <body>
77