archiving regardless of the view used
This commit is contained in:
parent
c1981b4cf2
commit
ab2271e6bf
|
@ -3,6 +3,7 @@
|
||||||
## 1.4 - Unreleased
|
## 1.4 - Unreleased
|
||||||
- Making python-readability optional
|
- Making python-readability optional
|
||||||
- Removing "next" and "previous" which are quite confusing and not obvious
|
- Removing "next" and "previous" which are quite confusing and not obvious
|
||||||
|
- Archiving now works regardless of the view you are in.
|
||||||
- Fixing a crash when accessing an empty html page
|
- Fixing a crash when accessing an empty html page
|
||||||
- Not trying to display non-image files to avoid errors. (this requires "file")
|
- Not trying to display non-image files to avoid errors. (this requires "file")
|
||||||
|
|
||||||
|
|
|
@ -3642,13 +3642,18 @@ archives, which is a special historical list limited in size. It is similar to `
|
||||||
lines = lf.readlines()
|
lines = lf.readlines()
|
||||||
lf.close()
|
lf.close()
|
||||||
to_write = []
|
to_write = []
|
||||||
|
# let’s remove the mode
|
||||||
|
url = url.split("##offpunk_mode=")[0]
|
||||||
for l in lines:
|
for l in lines:
|
||||||
# we separate components of the line
|
# we separate components of the line
|
||||||
# to ensure we identify a complete URL, not a part of it
|
# to ensure we identify a complete URL, not a part of it
|
||||||
splitted = l.split()
|
splitted = l.split()
|
||||||
if url not in splitted:
|
if url not in splitted and len(splitted) > 0:
|
||||||
|
current = splitted[1].split("##offpunk_mode=")[0]
|
||||||
#sometimes, we must remove the ending "/"
|
#sometimes, we must remove the ending "/"
|
||||||
if url.endswith("/") and url[:-1] in splitted:
|
if url == current:
|
||||||
|
to_return = True
|
||||||
|
elif url.endswith("/") and url[:-1] == current:
|
||||||
to_return = True
|
to_return = True
|
||||||
else:
|
else:
|
||||||
to_write.append(l)
|
to_write.append(l)
|
||||||
|
|
Loading…
Reference in New Issue