unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [BUG] public-inbox-httpd: messages without subject are not viewable
@ 2018-03-11  9:19 Nicolás Ojeda Bär
  2018-03-14  7:21 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolás Ojeda Bär @ 2018-03-11  9:19 UTC (permalink / raw)
  To: meta

Hello,

When browsing messages in the web interface, there is no link
displayed for messages without subject. Using a "(no subject)" dummy
subject like in the git repository would work well enough.

Thanks!

Best wishes,
Nicolás

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] public-inbox-httpd: messages without subject are not viewable
  2018-03-11  9:19 [BUG] public-inbox-httpd: messages without subject are not viewable Nicolás Ojeda Bär
@ 2018-03-14  7:21 ` Eric Wong
  2018-03-14 10:04   ` Nicolás Ojeda Bär
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2018-03-14  7:21 UTC (permalink / raw)
  To: Nicolás Ojeda Bär; +Cc: meta

Nicolás Ojeda Bär <n.oje.bar@gmail.com> wrote:
> Hello,
> 
> When browsing messages in the web interface, there is no link
> displayed for messages without subject. Using a "(no subject)" dummy
> subject like in the git repository would work well enough.

The following probably does it (untested).

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 590a76a..b8b2a5f 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -966,6 +966,7 @@ sub dump_topics {
 			obfuscate_addrs($obfs_ibx, $subj) if $obfs_ibx;
 			$href = mid_escape($mid);
 			$s .= indent_for($level) . TCHILD;
+			$subj = '(no subject)' if $subj eq '';
 			$s .= "<a\nhref=\"$href/T/#u\">$subj</a>$omit\n";
 		}
 		push @out, $s;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [BUG] public-inbox-httpd: messages without subject are not viewable
  2018-03-14  7:21 ` Eric Wong
@ 2018-03-14 10:04   ` Nicolás Ojeda Bär
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolás Ojeda Bär @ 2018-03-14 10:04 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

On Wed, Mar 14, 2018 at 8:21 AM, Eric Wong <e@80x24.org> wrote:
> Nicolás Ojeda Bär <n.oje.bar@gmail.com> wrote:
>> Hello,
>>
>> When browsing messages in the web interface, there is no link
>> displayed for messages without subject. Using a "(no subject)" dummy
>> subject like in the git repository would work well enough.
>
> The following probably does it (untested).
>
> diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
> index 590a76a..b8b2a5f 100644
> --- a/lib/PublicInbox/View.pm
> +++ b/lib/PublicInbox/View.pm
> @@ -966,6 +966,7 @@ sub dump_topics {
>                         obfuscate_addrs($obfs_ibx, $subj) if $obfs_ibx;
>                         $href = mid_escape($mid);
>                         $s .= indent_for($level) . TCHILD;
> +                       $subj = '(no subject)' if $subj eq '';
>                         $s .= "<a\nhref=\"$href/T/#u\">$subj</a>$omit\n";
>                 }
>                 push @out, $s;

Thanks, I will try it out.

Nicolás

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-14 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-11  9:19 [BUG] public-inbox-httpd: messages without subject are not viewable Nicolás Ojeda Bär
2018-03-14  7:21 ` Eric Wong
2018-03-14 10:04   ` Nicolás Ojeda Bär

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).