fixed the coding fail from last commit
authorStricted <Stricted@nexus-irc.de>
Sat, 8 Sep 2012 11:59:47 +0000 (13:59 +0200)
committerStricted <Stricted@nexus-irc.de>
Sat, 8 Sep 2012 14:02:39 +0000 (16:02 +0200)
git_download.php
index.cgi

index 64f16ae613fc4de6c2d9cc79a877d95c8818c46d..7d360931d93d18fbf9d0f57ab0fc1364a35efad1 100644 (file)
@@ -37,14 +37,14 @@ if(isset($_GET['p'])){
        if(file_exists("/home/git/".$_GET['build'])){
                $name=substr($_GET['build'],0,strlen($_GET['build'])-4);
                if(file_exists("/usr/share/gitweb/dl/".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz")) {
-                       echo '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=downloads"> ';
+                       echo '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=download"> ';
                }else{
                        $hash = shell_exec("git --git-dir=/home/git/".$_GET['build']." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'");
                        $con= shell_exec('git --git-dir=/home/git/'.$_GET['build'].' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"');
                        $b = shell_exec("cd /usr/share/gitweb/dl; git clone git://git.nexus-irc.de/".$_GET['build']);
                        $c = shell_exec("cd /usr/share/gitweb/dl; tar czfv ".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz ".$name);
                        $d = shell_exec("rm -r /usr/share/gitweb/dl/".$name);
-                       echo '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=downloads"> ';
+                       echo '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=download"> ';
                }
        }else{
                echo "unknown project";
index cb675585fe01ae1acc6257c5fb78ff0bad9d9277..fe7ff60b710ea349d34d6742da51f4ad1cfcc183 100644 (file)
--- a/index.cgi
+++ b/index.cgi
@@ -3513,9 +3513,13 @@ EOF
                }
                print "\n";
        } else {
-               if (defined $action && $action != $home_link_str) {
-                       print " $action";
+               if (defined($action)) {
+                       if ($action eq 'project_list') {
+                       } else {
+                               print " $action";
+                       }
                }
+               print "\n";
        }
        print "</div>\n";
 
@@ -3580,7 +3584,8 @@ sub git_footer_html {
                                      -title => "$href_params{'-title'} $format feed",
                                      -class => $feed_class}, $format)."\n";
                }
-
+               print $cgi->a({-href => href(project=>$project, action=>"download"),
+                                       -class => $feed_class2}, "Downloads") . "\n";
        } else {
                print "<div class=\"page_footer_text\">Copyright &copy; 2012, <a href=\"http://nexus-irc.de\">Nexus-IRC.de</a></div>\n";
                print $cgi->a({-href => href(project=>undef, action=>"opml"),