mhonarc-commits
[Top] [All Lists]

CVS: mharc/bin web-archive,1.37,1.38

2002-09-19 20:45:04
Update of /cvsroot/mhonarc/mharc/bin
In directory subversions:/tmp/cvs-serv6488/bin

Modified Files:
	web-archive 
Log Message:
Added auto-creation of .htaccess in raw mailbox directory for each list
that has no-raw-link enabled.


Index: web-archive
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/web-archive,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** web-archive	18 Sep 2002 18:50:24 -0000	1.37
--- web-archive	20 Sep 2002 03:45:00 -0000	1.38
***************
*** 253,256 ****
--- 253,257 ----
        # create .noraw file indicator if no-raw-link specified
        my $no_raw_file = join('/', $dir, '.noraw');
+       my $no_raw_htaccess = join('/', $dir, '.htaccess');
        if ($listdef->{$listname}{'no-raw-link'}[0]) {
  	if (! -e $no_raw_file) {
***************
*** 260,263 ****
--- 261,274 ----
  	  } else {
  	    close(NORAW);
+ 	  }
+ 	}
+ 	if (! -e $no_raw_htaccess) {
+ 	  local(*HTACCESS);
+ 	  if (!open(HTACCESS, ">$no_raw_htaccess")) {
+ 	    warn qq/Warning: Unable to create "$no_raw_htaccess": $!\n/;
+ 	  } else {
+ 	    print HTACCESS 'Order allow,deny', "\n",
+ 			   'Deny from all', "\n";
+ 	    close(HTACCESS);
  	  }
  	}

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV