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 used in the web interface to match the installation paths.
6 @DPATCH@
8 diff a/contrib/web/php-admin/conf/config.php b/contrib/web/php-admin/conf/config.php
9 --- a/contrib/web/php-admin/conf/config.php
10 +++ b/contrib/web/php-admin/conf/config.php
11 @@ -1,6 +1,6 @@
12 <?php
14 $topdir = "/var/spool/mlmmj";
15 -$templatedir = "/home/mlmmj/templates";
16 +$templatedir = "/usr/share/mlmmj-php-web-admin/templates/";
18 ?>
19 diff a/contrib/web/php-admin/htdocs/dot.htaccess b/contrib/web/php-admin/htdocs/dot.htaccess
20 --- a/contrib/web/php-admin/htdocs/dot.htaccess
21 +++ b/contrib/web/php-admin/htdocs/dot.htaccess
22 @@ -1,4 +1,5 @@
23 Require valid-user
24 AuthType Basic
25 -AuthName "mlmmj web-interface"
26 -AuthUserFile /home/mlmmj/htpasswd
27 +AuthName "mlmmj web-interface on Debian GNU/Linux"
28 +AuthUserFile /etc/mlmmj-php-web-admin/htpasswd
29 +php_value include_path "/usr/share/mlmmj-php-web-admin"
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 */
37 -require("../conf/config.php");
38 +require("conf/config.php");
39 require("class.FastTemplate.php");
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 */
48 require("class.FastTemplate.php");
49 -require("../conf/config.php");
50 +require("conf/config.php");
52 $tpl = new FastTemplate($templatedir);
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 */
61 -require("../conf/config.php");
62 +require("conf/config.php");
63 require("class.FastTemplate.php");
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>