From: Stricted <Stricted@nexus-irc.de> Date: Sat, 8 Sep 2012 11:59:47 +0000 (+0200) Subject: fixed the coding fail from last commit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=721d99ae85f31529cca14acba020b7a8431828fa;p=gitweb.git fixed the coding fail from last commit --- diff --git a/git_download.php b/git_download.php index 64f16ae..7d36093 100644 --- a/git_download.php +++ b/git_download.php @@ -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"; diff --git a/index.cgi b/index.cgi index cb67558..fe7ff60 100644 --- 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 © 2012, <a href=\"http://nexus-irc.de\">Nexus-IRC.de</a></div>\n"; print $cgi->a({-href => href(project=>undef, action=>"opml"),