mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Bug 886: Set cookies_dirty if a cookie is edited via the manager.
If the appropriate option is set, this now causes the cookies to be immediately saved as well.
This commit is contained in:
parent
fad9c75cc6
commit
3cd0fbe5f0
@ -242,6 +242,7 @@ set_cookie_name(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
|
||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||
mem_free_set(&cookie->name, stracpy(value));
|
||||
set_cookies_dirty();
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
@ -253,6 +254,7 @@ set_cookie_value(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
|
||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||
mem_free_set(&cookie->value, stracpy(value));
|
||||
set_cookies_dirty();
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
@ -264,6 +266,7 @@ set_cookie_domain(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
|
||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||
mem_free_set(&cookie->domain, stracpy(value));
|
||||
set_cookies_dirty();
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
@ -282,6 +285,7 @@ set_cookie_expires(struct dialog_data *dlg_data, struct widget_data *widget_data
|
||||
if (errno || *end || number < 0) return EVENT_NOT_PROCESSED;
|
||||
|
||||
cookie->expires = (time_t) number;
|
||||
set_cookies_dirty();
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
@ -300,6 +304,7 @@ set_cookie_secure(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
if (errno || *end) return EVENT_NOT_PROCESSED;
|
||||
|
||||
cookie->secure = (number != 0);
|
||||
set_cookies_dirty();
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user