[ previous ] [ next ] [ threads ]
 
 From:  sil <silverjp1 at gazeta dot pl>
 To:  m0n0wall dash dev at lists dot m0n0 dot ch
 Subject:  fix for system_do_extensions() in system.inc
 Date:  Fri, 18 Aug 2006 16:11:10 +0200
1). it is possible to have extensions with only the web part
2). creates the links in the www root, fixed the path

Index: /usr/home/pcbsd/svn_mono/freebsd6/phpconf/inc/system.inc
===================================================================
--- /usr/home/pcbsd/svn_mono/freebsd6/phpconf/inc/system.inc    (revision 161)
+++ /usr/home/pcbsd/svn_mono/freebsd6/phpconf/inc/system.inc    (working copy)
@@ -492,7 +492,7 @@
  function system_do_extensions($early = false) {
         global $config, $g;

-       if (!is_dir("{$g['etc_path']}/inc/ext"))
+       if (!(is_dir("{$g['etc_path']}/inc/ext") || is_dir("{$g['www_path']}/ext")) )
                return;

         $dh = @opendir("{$g['etc_path']}/inc/ext");
@@ -517,8 +517,8 @@
                              continue;
                       if (is_dir("{$g['www_path']}/ext/$extd")) {
                           // Create links
-                         symlink("{$g['www_path']}/.htpasswd",".htpasswd");
-                         symlink("{$g['www_path']}/gui.css","gui.css");
+                     
symlink("{$g['www_path']}/.htpasswd","{$g['www_path']}/ext/{$extd}/.htpasswd");
+                      symlink("{$g['www_path']}/gui.css","{$g['www_path']}/ext/{$extd}/gui.css");
                       }
                }
                closedir($dh);