summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2018-04-24 11:00:56 -0400
committerGitHub <noreply@github.com>2018-04-24 11:00:56 -0400
commitbb87aeab9a404af4313eb7a707d8911eb418b8b0 (patch)
treed37e896912ae07c4e09c1f11779e21f320b537df
parentce197c4e52aeb88befb331348a41502a7e7250d9 (diff)
parent11063e9720f3c3cdabb4be6f6898b162d4f4ad48 (diff)
downloadUXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar
UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar.gz
UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar.lz
UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar.xz
UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.zip
Merge pull request #254 from janekptacijarabaci/pm_sanitize_1
[PALEMOON] [frontend vs backend] Fix sanitize ("History" - "Clear Recent History...")
-rw-r--r--application/palemoon/base/content/sanitize.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/application/palemoon/base/content/sanitize.js b/application/palemoon/base/content/sanitize.js
index fccec6c98..f2eb24a55 100644
--- a/application/palemoon/base/content/sanitize.js
+++ b/application/palemoon/base/content/sanitize.js
@@ -148,7 +148,8 @@ Sanitizer.prototype = {
if (cookie.creationTime > this.range[0])
// This cookie was created after our cutoff, clear it
- cookieMgr.remove(cookie.host, cookie.name, cookie.path, false);
+ cookieMgr.remove(cookie.host, cookie.name, cookie.path,
+ false, cookie.originAttributes);
}
}
else {
@@ -213,10 +214,16 @@ Sanitizer.prototype = {
history: {
clear: function ()
{
- if (this.range)
- PlacesUtils.history.removeVisitsByTimeframe(this.range[0], this.range[1]);
- else
- PlacesUtils.history.removeAllPages();
+ if (this.range) {
+ PlacesUtils.history.removeVisitsByFilter({
+ beginDate: new Date(this.range[0] / 1000),
+ endDate: new Date(this.range[1] / 1000)
+ }).catch(Components.utils.reportError);;
+ } else {
+ // Remove everything.
+ PlacesUtils.history.clear()
+ .catch(Components.utils.reportError);
+ }
try {
var os = Components.classes["@mozilla.org/observer-service;1"]