From 721d99ae85f31529cca14acba020b7a8431828fa Mon Sep 17 00:00:00 2001 From: Stricted Date: Sat, 8 Sep 2012 13:59:47 +0200 Subject: [PATCH] fixed the coding fail from last commit --- git_download.php | 4 ++-- index.cgi | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) 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 ' '; + echo ' '; }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 ' '; + echo ' '; } }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 "\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 "\n"; print $cgi->a({-href => href(project=>undef, action=>"opml"), -- 2.20.1