summaryrefslogtreecommitdiff
path: root/www/WebMagick/files/patch-aa
blob: d9fef43457e56e973f1d9e00c19960c8449003c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
--- webmagick.in.orig	Sun Dec 20 01:03:12 1998
+++ webmagick.in	Sun Feb 21 21:54:48 1999
@@ -128,6 +128,7 @@
     $opt_dircolorlink,
     $opt_dircolorvlink,
     $opt_dirfmt,
+    $opt_dirhtmlext,
     $opt_dirindexname,
     $opt_forcecache,
     $opt_forcegif,
@@ -268,6 +269,7 @@
 $opt_pageindexname	= '.index';	# Base name of secondary index files
 $opt_dirindexname	= '.dirindex';	# Subdirectory Title cross-reference
 					#  dirname   Directory Title
+$opt_dirhtmlext         = '.html';      # Use .shtml for SSI
 $opt_imgindexname	= '.imgindex';	# Image name to label cross-reference file
 
 #
@@ -660,6 +662,7 @@
 		'dircolorfore=s'	=> \$opt_dircolorfore,
 		'dircolorlink=s'	=> \$opt_dircolorlink,
 		'dircolorvlink=s'	=> \$opt_dircolorvlink,
+		'dirhtmlext=s'          => \$opt_dirhtmlext,
 		'dirindexname=s'	=> \$opt_dirindexname,
 		'footer=s'              => \$opt_footer,
 		'forcecache!'		=> \$opt_forcecache,
@@ -936,7 +939,7 @@
 sub wanted {
     my($dev,$ino,$mode,$nlink,$uid,$gid);
     ($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_);
-    if ( -d $_ && !/^\..+/ ) {
+    if ( -d $_ && -w $_ && !/^\..+/ ) {
         if( $_ ne '.' && get_rc_var('.', 'opt_prune', 0) ) {
             $File::Find::prune=1;
 	    # following funny logic is to avoid warnings about $prune
@@ -1426,6 +1429,7 @@
 	 'dircolorfore'		=> $opt_dircolorfore,
 	 'dircolorlink'		=> $opt_dircolorlink,
 	 'dircolorvlink'	=> $opt_dircolorvlink,
+	 'dirhtmlext'           => $opt_dirhtmlext,
 	 'dirindexname'		=> $opt_dirindexname,
 	 'footer'               => $opt_footer,
 	 'framemarginwidth'	=> $opt_framemarginwidth,
@@ -1695,7 +1699,7 @@
 sub writeTopIndexes {
 
     print( STDERR "Writing Index Files ${opt_indexname} & ",
-                "${opt_pageindexname}dir.html ...\n" )
+		"${opt_pageindexname}dir${opt_dirhtmlext} ...\n" )
                 if $opt_debug;
 
     #---- Generate the Variables for Format Options ----
@@ -1806,7 +1810,7 @@
     # Pull README into thumbnail frame if it exists, and is
     # either marked always visible or there are no images.
     #
-    $dirframelink = "${opt_pageindexname}dir.html";
+    $dirframelink = "${opt_pageindexname}dir${opt_dirhtmlext}";
 
     if( $opt_framefmt_frames{$opt_framestyle} <= 2 ) {
 	if( $haveReadme && ( $opt_readmevisible || ! $haveImages ) ) {
@@ -1924,8 +1928,8 @@
 
     # ----- Output Frame Directory File (usally ".indexdir.html") ------
     #
-    open( INDEX, ">${opt_pageindexname}dir.html")
-	|| die("$0: Failed to open file \"${opt_pageindexname}dir.html\"",
+    open( INDEX, ">${opt_pageindexname}dir${opt_dirhtmlext}")
+	|| die("$0: Failed to open file \"${opt_pageindexname}dir${opt_dirhtmlext}\"",
                 " for output\n$@\n");
     print( INDEX "<HTML>\n<HEAD>\n" );
     print( INDEX "  <TITLE>${pageTitle}</TITLE>\n" );
@@ -3412,6 +3416,7 @@
   --dircolorfore     Foreground color (directory frame)
   --dircolorlink     Link (unvisited) color (directory frame)
   --dircolorvlink    Link (visited) color (directory frame)
+  --dirhtmlext       Extension for directories frame
 
   --javascript	     Enable JavaScript output
   --header           Page header (imagemap frame)