bagder: curl-www/dl Makefile, 1.3, 1.4 list_entry.cgi, 1.2, 1.3 mktable.pl, 1.5, 1.6 mod_entry.cgi, 1.2, 1.3 stuff.pm, 1.1, 1.2

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/dl
In directory labb.contactor.se:/var/tmp/cvs-serv3827/dl

Modified Files:
	Makefile list_entry.cgi mktable.pl mod_entry.cgi stuff.pm 
Log Message:
recent fixes


Index: Makefile
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Makefile	30 Aug 2004 16:58:13 -0000	1.3
+++ Makefile	8 Oct 2004 16:53:52 -0000	1.4
@@ -4,7 +4,7 @@
 
 all: $(TARGET) $(TARGE2)
 
-$(TARGET): data/databas.db ../Makefile
+$(TARGET): data/databas.db ../Makefile mktable.pl
 	perl mktable.pl > $(TARGET)
 
 $(TARGE2): data/databas.db ../Makefile

Index: list_entry.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/list_entry.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- list_entry.cgi	26 Apr 2004 06:56:15 -0000	1.2
+++ list_entry.cgi	8 Oct 2004 16:53:52 -0000	1.3
@@ -11,7 +11,7 @@
 $db->load($databasefilename);
 
 # Skriv ut huvudet
-header("List Entries");
+lheader("List Entries");
 
 my $per;
 
@@ -95,10 +95,10 @@
            $$per{'ssl'}eq"Yes"?"<b>SSL</b>":
            $$per{'ssl'}eq"No"?"&nbsp;":$$per{'ssl'});
     printf("<td>%s</td>", show($$per{'date'}));
-    my $em = show($$per{'email'});
-    printf("<td><a href=\"%s\">%s</a></td>",
-           $em?"mailto:".$em:"",
-           show($$per{'name'}));
+
+    printf("<td>%s %s</a></td>",
+           ($$per{'name'} && $$per{'name'} ne "-")?show($$per{'name'}):"[no name]",
+           $$per{'email'}?"[email]":"[no email]");
     printf("<td>%s</td>", show($$per{'size'}));
     printf("<td>%s</td>",
            $$per{'img'}?"<img src=\"/pix/".$$per{'img'}."\">":"&nbsp;");
@@ -109,5 +109,5 @@
     "<p> $i entries, $utd is up-to-date\n";
 
 # Skriv ut sidfoten
-footer();
+lfooter();
 

Index: mktable.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/mktable.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- mktable.pl	30 Aug 2004 13:24:20 -0000	1.5
+++ mktable.pl	8 Oct 2004 16:53:52 -0000	1.6
@@ -38,7 +38,7 @@
         $r = $$a{'curl'} cmp $$b{'curl'};
     }
     if(!$r) {
-        # type (bin/devel/source)
+        # type (bin/devel/source/lib)
         $r = $$a{'type'} cmp $$b{'type'};
     }
     if(!$r) {
@@ -54,15 +54,11 @@
 sub top {
     my ($os, $aname, $img)=@_;
 
-    print "<tr class=\"os\">";
+    print "<tr class=\"os\"><td class=\"ostitle\" colspan=\"6\">";
     if($img) {
-        print "<td class=\"ostitleleft\" colspan=\"4\">",
-        "$aname$os</td>",
-        "<td class=\"ostitleright\" colspan=\"3\">\n",
-        "$img</td></tr>\n";
+        print "$img$aname$os</td></tr>\n";
     }
     else {
-        print "<td class=\"ostitle2\" colspan=\"7\">",
         "$aname$os</td></tr>\n";
     }
     $shownprev = 1;
@@ -105,7 +101,7 @@
              'Version',
              'Type',
              'SSL',
-             'Date',
+#             'Date',
              'Provider',
              'Size')) {
         print "<th>$h</th>\n";
@@ -118,6 +114,11 @@
 
 my %shown;
 
+my %typelong=('bin' => '<b>binary</b>',
+              'devel' => 'devel',
+              'source' => 'source',
+              'lib', => 'libcurl');
+
 my $numcpu; # for this particular OS
 my $numpack; # for this particular OS
 my $numflav; # for this particular OS
@@ -171,7 +172,7 @@
             my $alt = "$os";
             $alt =~ s/-//g;
             $alt =~ s/  / /g;
-            $img="<img width=\"200\" height=\"30\" alt=\"$alt\" src=\"/pix/".$$per{'img'}."\" border=\"0\">";
+            $img="<img width=\"200\" height=\"30\" alt=\"$alt\" src=\"/pix/".$$per{'img'}."\" border=\"0\" align=\"right\">";
         }
         if($numflav>1) {
             my $show = $os;
@@ -227,22 +228,29 @@
     }
     printf("<td class=\"col2\"><a href=\"%s\">%s</a></td>\n",
            $fi, $$per{'curl'});
-    printf("<td class=\"col3\">%s</td>\n", $$per{'type'}eq"bin"?
-           "<b>bin</b>":show($$per{'type'}));
+    printf("<td class=\"col3\">%s</td>\n",
+           show($typelong{$$per{'type'}}));
     printf("<td class=\"col4\">%s</td>\n",
            $$per{'ssl'}eq"Yes"?"<img width=\"27\" height=\"12\" alt=\"SSL enabled\" src=\"/ssl.png\">":
            $$per{'ssl'}eq"No"?"<img width=\"27\" height=\"12\" alt=\"SSL disabled\" src=\"/nossl.png\">":$$per{'ssl'});
-    printf("<td class=\"col5\">%s</td>\n", show($$per{'date'}));
+#    printf("<td class=\"col5\">%s</td>\n", show($$per{'date'}));
     my $em = show($$per{'email'});
+    if($em =~ /:\/\//) {
+        # email is a plain URL
+    }
+    elsif($em =~ /@/) { 
     $em =~ s/\@/ at /g;
     $em =~ s/\./ dot /g;
+        $em = "mailto:$em";
+    }
 
     printf("<td class=\"col6\">%s%s%s</td>\n",
-           $em?"<a href=\"mailto:$em\">":"",
+           $em?"<a href=\"$em\">":"",
            show($$per{'name'}),
            $em?"</a>":"");
     my $size = show($$per{'size'});
-    printf("<td class=\"col7\">%s</td>\n", $size?$size:"&nbsp;");
+    $size = int($size/1024);
+    printf("<td class=\"col7\">%s</td>\n", $size?"$size KB":"&nbsp;");
     print "</tr>\n";
     $i++;
 }

Index: mod_entry.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/mod_entry.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- mod_entry.cgi	26 Apr 2004 06:56:15 -0000	1.2
+++ mod_entry.cgi	8 Oct 2004 16:53:52 -0000	1.3
@@ -41,7 +41,7 @@
     $title="Add Entry";
 }
 # Skriv ut huvudet
-header($title);
+lheader($title);
 
 if (CGI::param("action")) {
     # get the pre- values if they're set instead of the "original" ones
@@ -65,7 +65,7 @@
 &inputstuff::form_footer();
 
 # Skriv ut sidfoten
-footer();
+lfooter();
 
 sub alternative {
     my ($desc, $short, $explain)=@_;
@@ -162,13 +162,13 @@
     alternative("Packager Name", "name",
                 "Full name");
 
-    alternative("Packager Email", "email",
-                "name\@somwhere.come");
+    alternative("Packager Email/URL", "email",
+                "name\@somwhere.come or URL");
 
     alternative("Regex-name", "re",
                 "name of the package regex, see latest.cgi");
 
-    alternative("Responsible", "resp",
+    alternative("Uploader", "resp",
                 "username of the person responsible for this package");
 
     alternative("Hide from download page", "hide",

Index: stuff.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/stuff.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- stuff.pm	14 Jan 2004 07:28:24 -0000	1.1
+++ stuff.pm	8 Oct 2004 16:53:52 -0000	1.2
@@ -6,7 +6,7 @@
 
 $databasefilename = "data/databas.db";
 
-sub header {
+sub lheader {
     my ($title)=@_;
 
     if ($title eq "") {
@@ -39,7 +39,7 @@
     "<div class=\"pagetitle\">$title</div>";
 }
 
-sub footer {
+sub lfooter {
     print <<FOOT
 </td></tr></table>
 </body></html>
@@ -70,7 +70,7 @@
         } else {
             my $newid=$db->add(%data);
             if ($db->save() == -1) {
-                $warning_message="Faield while saving database!";
+                $warning_message="Failed saving database!";
             } else {
                 $result_message="Added entry";
             }

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
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.