about summary refs log tree commit diff stats
path: root/ui-refs.c
diff options
context:
space:
mode:
authorJason A. Donenfeld2014-01-13 16:24:40 +0100
committerJason A. Donenfeld2014-01-14 02:00:07 +0100
commit786609bd36c07b85dbf905fc8c36eba7132122d7 (patch)
tree03d3a49c01b89e7122bdde4ad088fc225a819e7b /ui-refs.c
parentfilter: add gravatar scripts (diff)
downloadcgit-786609bd36c07b85dbf905fc8c36eba7132122d7.tar.gz
cgit-786609bd36c07b85dbf905fc8c36eba7132122d7.zip
filter: add page source to email filter
Since the email filter is called from lots of places, the script might
benefit from knowing the origin. That way it can modify its contents
and/or size depending.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui-refs.c')
-rw-r--r--ui-refs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-refs.c b/ui-refs.c index d125459..147b665 100644 --- a/ui-refs.c +++ b/ui-refs.c
@@ -77,7 +77,7 @@ static int print_branch(struct refinfo *ref)
77 if (ref->object->type == OBJ_COMMIT) { 77 if (ref->object->type == OBJ_COMMIT) {
78 cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL, 0); 78 cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL, 0);
79 html("</td><td>"); 79 html("</td><td>");
80 cgit_open_filter(ctx.repo->email_filter, info->author_email); 80 cgit_open_filter(ctx.repo->email_filter, info->author_email, "refs");
81 html_txt(info->author); 81 html_txt(info->author);
82 cgit_close_filter(ctx.repo->email_filter); 82 cgit_close_filter(ctx.repo->email_filter);
83 html("</td><td colspan='2'>"); 83 html("</td><td colspan='2'>");
@@ -157,12 +157,12 @@ static int print_tag(struct refinfo *ref)
157 html("</td><td>"); 157 html("</td><td>");
158 if (info) { 158 if (info) {
159 if (info->tagger) { 159 if (info->tagger) {
160 cgit_open_filter(ctx.repo->email_filter, info->tagger_email); 160 cgit_open_filter(ctx.repo->email_filter, info->tagger_email, "refs");
161 html_txt(info->tagger); 161 html_txt(info->tagger);
162 cgit_close_filter(ctx.repo->email_filter); 162 cgit_close_filter(ctx.repo->email_filter);
163 } 163 }
164 } else if (ref->object->type == OBJ_COMMIT) { 164 } else if (ref->object->type == OBJ_COMMIT) {
165 cgit_open_filter(ctx.repo->email_filter, ref->commit->author_email); 165 cgit_open_filter(ctx.repo->email_filter, ref->commit->author_email, "refs");
166 html_txt(ref->commit->author); 166 html_txt(ref->commit->author);
167 cgit_close_filter(ctx.repo->email_filter); 167 cgit_close_filter(ctx.repo->email_filter);
168 } 168 }