mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -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.
[ From commit 3cd0fbe5f0
in ELinks
0.12.GIT. --KON ]
This commit is contained in:
parent
0bdbb983b8
commit
681f34d8d0
@ -241,6 +241,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;
|
||||
}
|
||||
|
||||
@ -252,6 +253,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;
|
||||
}
|
||||
|
||||
@ -263,6 +265,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;
|
||||
}
|
||||
|
||||
@ -281,6 +284,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;
|
||||
}
|
||||
|
||||
@ -299,6 +303,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