From 95b6083b24ccb653f5be76f8b47e1abb6548b926 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 19 Oct 2022 01:09:41 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- pwiki/page.js | 5 +++++ pwiki/store/base.js | 5 ----- pwiki2.js | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pwiki/page.js b/pwiki/page.js index c54b68f..73aa440 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -2130,6 +2130,11 @@ module.System = { target.delete() : target.delete('**') + // XXX + if(this.referrer == this.path){ + this.renderer.path = '..' + return '' } + // redirect... this.renderer && (this.renderer.location = this.referrer) diff --git a/pwiki/store/base.js b/pwiki/store/base.js index 3334af9..b64a6b0 100755 --- a/pwiki/store/base.js +++ b/pwiki/store/base.js @@ -425,12 +425,7 @@ module.BaseStore = { return this.data[key] }, get: async function(path, strict=false, energetic=false){ var that = this - /* XXX ENERGETIC... - path = await this.resolve(path, strict) - /*/ - // XXX SANITIZE... path = pwpath.sanitize(path, 'string') - //*/ var path = pwpath.splitArgs(path).path path = path.includes('*') && (energetic == true ? diff --git a/pwiki2.js b/pwiki2.js index f21071f..8b20509 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -17,10 +17,15 @@ * - CLI * * -* XXX CachedStore seems to be broken (see: pwiki/store/base.js:837) * XXX BUG: when editing the root page of a substore the page's .cache is * not reset for some reason... -* ...can't dependably reproduce... +* ...the problem is in that .names() cache is not reset when a new +* page is created... +* ...this does not appear to affect normal pages... +* ...the root issue is that .__cache_add(..)/.__cache_remove(..) +* are called relative to the nested store and not the root... +* ...feels like we need to rethink the cache/index strategy globally... +* XXX CachedStore seems to be broken (see: pwiki/store/base.js:837) * XXX might be a good idea to create memory store (sandbox) from the * page API -- action?? * XXX Chrome started spamming CORS error: