Fix diff mode switching when side-by-side-diffs=1

When side-by-side-diffs=1 was set in cgitrc, specyfing 'ss=0' in the query-
string would not switch to unified diffs. This patch fixes the issue by
introducing a separate variable to track the occurrence of "ss" in the
querystring.
Tá an tiomantas seo le fáil i:
Tim Chen
2012-01-03 16:02:14 +00:00
tiomanta ag Lars Hjemli
tuismitheoir 0b6a716d1b
tiomantas f2ced535e9
D'athraigh 3 comhad le 3 breiseanna agus 2 scriosta

Féach ar an gComhad

@ -372,8 +372,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi
}
}
if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff))
use_ssdiff = 1;
use_ssdiff = ctx.qry.has_ssdiff ? ctx.qry.ssdiff : ctx.cfg.ssdiff;
print_ssdiff_link();
cgit_print_diffstat(old_rev_sha1, new_rev_sha1, prefix);