From: Art Cancro Date: Sun, 18 Mar 2012 16:55:27 +0000 (-0400) Subject: VILE SLEAZY HACK. If anyone had their start page configured as '/do_template?templat... X-Git-Tag: v8.11~127^2~14 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=69def7a51fd280872e70b517d8c58d47f13979c5;p=citadel.git VILE SLEAZY HACK. If anyone had their start page configured as '/do_template?template=summary_page' set it to '/summary' during preferences load. The correct page will be saved back to the preferences setting when the user logs out, so when we come across this code again in a couple of years we can remove it :) --- diff --git a/webcit/preferences.c b/webcit/preferences.c index f0a1776c1..bcec00d89 100644 --- a/webcit/preferences.c +++ b/webcit/preferences.c @@ -184,6 +184,20 @@ void ParsePref(HashList **List, StrBuf *ReadBuf) Data->Val = NewStrBuf(); StrBufExtract_token(Data->Key, ReadBuf, 0, '|'); StrBufExtract_token(Data->Val, ReadBuf, 1, '|'); + + /***************** BEGIN VILE SLEAZY HACK ************************/ + + /* some users might still have this start page configured, which now breaks */ + + if ( (!strcasecmp(ChrPtr(Data->Key), "startpage")) + && (!strcasecmp(ChrPtr(Data->Val), "/do_template?template=summary_page")) + ) { + FreeStrBuf(&Data->Val); + Data->Val = NewStrBufPlain(HKEY("/summary")); + } + + /******************* END VILE SLEAZY HACK ************************/ + if (!IsEmptyStr(ChrPtr(Data->Key))) { Put(*List,