[ previous ] [ next ] [ threads ]
 
 From:  sil <silverjp1 at gazeta dot pl>
 To:  m0n0wall dash dev at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall-dev] fix for system_do_extensions() in system.inc
 Date:  Fri, 08 Sep 2006 23:40:43 +0200
> if (=1
> !is_dir(=2' "{$g['etc_path']}/inc/ext")=2'
> || is_dir(=3"{$g['www_path']}/ext")=3'
> 
> 
> 
> 
> )=1'


you say
if
(=1
  !is_dir(=2' "{$g['etc_path']}/inc/ext")=2'
  || is_dir(=3"{$g['www_path']}/ext")=3'
)=1
return;
with this if condition as long there is an ext dir in the www root all the
rest of the function is skipped.

I say
if
(=1
  !
   (=2
   is_dir (=3 "{$g['etc_path']}/inc/ext")=3
   ||
   is_dir(=4 "{$g['www_path']}/ext")=4
   )=2
=1)
return;

You want to return from the function in the case there are no /inc/ext and /ext,
so you could have an extension that have only an rc part or only a web part or both rc and web.
If you prefer you could write ( !isdir && !isdir )