Tuned up the 'logged in as' / 'not logged in' ...
[citadel.git] / webcit / preferences.c
index f337fb196a0549e2819a4a96a6b6104f81a4678b..b2606b938a4f5414172e96cb0247a7fe8a517fea 100644 (file)
@@ -1048,15 +1048,17 @@ void DeleteGVSNHash(HashList **KillMe)
 
 
 /*
- * Offer to make any page the user's "start page."
+ * Offer to make any page the user's "start page" (only if logged in)
  */
 void offer_start_page(StrBuf *Target, WCTemplputParams *TP)
 {
-       wc_printf("<a href=\"change_start_page?startpage=");
-       urlescputs(ChrPtr(WC->Hdr->this_page));
-       wc_printf("\">");
-       wc_printf(_("Make this my start page"));
-       wc_printf("</a>");
+       if (WC->logged_in) {
+               wc_printf("<a href=\"change_start_page?startpage=");
+               urlescputs(ChrPtr(WC->Hdr->this_page));
+               wc_printf("\">");
+               wc_printf(_("Make this my start page"));
+               wc_printf("</a>");
+       };
 }