bagder: curl-www/libcurl/php/examples mkindex.pl,1.4,1.5

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/libcurl/php/examples
In directory labb:/tmp/cvs-serv6717

Modified Files:
	mkindex.pl 
Log Message:
cut off the .php extension when showing the example name


Index: mkindex.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl/php/examples/mkindex.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mkindex.pl	9 Nov 2005 09:00:09 -0000	1.4
+++ mkindex.pl	9 Nov 2005 09:03:23 -0000	1.5
@@ -19,7 +19,7 @@
     my @ex = grep { /\.php$/ && -f "$some_dir/$_" } readdir(DIR);
     closedir DIR;
 
-    print "<p><table border=\"0\" cellpadding=\"1\" cellspacing=\"0\"><tr class=\"tabletop\">",
+    print "<p><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr class=\"tabletop\">",
     "<th>Example</th>",
     "<th>Description</th>",
     "</tr>\n";
@@ -38,8 +38,12 @@
         my $exfile = $filename;
 
         $exfile =~ s/\.php$/.html/;
+
+        my $fileshow = $filename;
+
+        $fileshow =~ s/\.php$//;
         
-        print "<a href=\"./$exfile\">$filename</a></td><td>\n";
+        print "<a href=\"./$exfile\">$fileshow</a></td><td>\n";
         if( -r "$filename.html") {
             &catfile("$filename.html");
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.