git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: use href() when generating URLs in OPML

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 2, 2009, 13:09 UTC
Message-ID
<200901021409.07695.jnareb@gmail.com>
In-Reply-To
<1230898528-24187-1-git-send-email-giuseppe.bilotta@gmail.com>
Giuseppe Bilotta wrote:
> Since the OPML project list view was hand-coding the RSS and HTML URLs,
> it didn't respect global options such as use_pathinfo. Make it use
> href() to ensure consistency with the rest of the gitweb setup.
Good catch. I guess it was before href(..., -full=>1)...
> 
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Show 23 quoted lines
> ---
>  gitweb/gitweb.perl |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index fa7d8ad..b164001 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -6146,8 +6146,8 @@ XML
>  		}
>  
>  		my $path = esc_html(chop_str($proj{'path'}, 25, 5));
> -		my $rss  = "$my_url?p=$proj{'path'};a=rss";
> -		my $html = "$my_url?p=$proj{'path'};a=summary";
> +		my $rss  = href('project' => $proj{'path'}, 'action' => 'rss', -full => 1);
> +		my $html = href('project' => $proj{'path'}, 'action' => 'summary', -full => 1);
>  		print "<outline type=\"rss\" text=\"$path\" title=\"$path\" xmlUrl=\"$rss\" htmlUrl=\"$html\"/>\n";
>  	}
>  	print <<XML;
> -- 
> 1.5.6.5
> 
> 
-- 
Jakub Narebski
Poland
Previous: Giuseppe BilottaNext: Junio C Hamano
Message 2 of 3 in “gitweb: use href() when generating URLs in OPML”
  1. gitweb: use href() when generating URLs in OPMLGiuseppe Bilotta, Jan 2, 2009
  2. Jakub NarebskiJan 2, 2009
  3. Junio C HamanoJan 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.