forked from mirrors/treebird
Fix logged in text
FossilOrigin-Name: 4233634878d05019449e424f9bf1a1d0b1d44ef05e5fc33daf80248f98eea125
This commit is contained in:
parent
20f7b66142
commit
f321c4c5c5
4 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,9 @@ void render_base_page(struct base_page* page, struct session* ssn, mastodont_t*
|
|||
|
||||
read_config(ssn);
|
||||
|
||||
if (ssn->config.logged_in)
|
||||
login_string = "";
|
||||
|
||||
if (ssn->config.background_url)
|
||||
{
|
||||
easprintf(&background_url_css, BODY_STYLE, ssn->config.background_url);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
struct local_config
|
||||
{
|
||||
int changed;
|
||||
char* logged_in;
|
||||
char* theme;
|
||||
char* background_url;
|
||||
int themeclr;
|
||||
|
|
|
@ -102,6 +102,9 @@ void read_config(struct session* ssn)
|
|||
SET_COOKIE_CONFIG(ssn->post.jslive,
|
||||
ssn->cookies.jslive,
|
||||
ssn->config.jslive);
|
||||
SET_COOKIE_CONFIG(0,
|
||||
ssn->cookies.logged_in,
|
||||
ssn->config.logged_in);
|
||||
SET_COOKIE_CONFIG((ssn->post.files.content && ssn->post.files.content[0].content),
|
||||
ssn->cookies.background_url,
|
||||
ssn->config.background_url);
|
||||
|
|
|
@ -32,5 +32,6 @@ int set_config_int(int* ssn,
|
|||
char* value);
|
||||
|
||||
void load_config(struct session* ssn, mastodont_t* api);
|
||||
void read_config(struct session* ssn);
|
||||
|
||||
#endif // LOCAL_CONFIG_SET_H
|
||||
|
|
Loading…
Reference in a new issue