fsf changes, meant to be rebased on upstream
authorIan Kelling <iank@fsf.org>
Mon, 27 Apr 2020 01:39:19 +0000 (21:39 -0400)
committerroot <root@mail.fsf.org>
Fri, 20 May 2022 11:21:19 +0000 (11:21 +0000)
commit19b46101c859d0760c4fb3fac2e635033e319b2f
tree4fb1c06340bf52c1beedc0478783969b32e299a3
parent660a647f8abb7477db1fed03e01951622b57b19d
fsf changes, meant to be rebased on upstream

As upstream changes, rebase this commit on top.

The change to read_body.php, documented here
https://sourceforge.net/p/squirrelmail/mailman/message/36992407/
copied here in case that link dies:

In the svn version, when viewing a message, if you click the move or
copy button, the page changes to the list of messages. In older versions
such as 1.4.13, that button was enabled by the delete_move_next plugin,
and when pressing move, the page would change to the next message. That
is clearly the way it should work. When using the preview panel, this
behavior especially makes no sense because you were already seeing the
message list and it just turns the preview panel into blank space.

After a quick look into the code, I was able to make a one line change
to the svn version so that the the page does not change at all when
pressing move, which helps workaround the problem so that I can then
press a key to go to the next message. I'm hoping someone here is
familiar with the code and can help identify the root cause and find a
proper fix so it goes to the next message.

Here is a comparison of the post request when clicking move in svn vs
old working 1.4.13:

SVN post:

https://webmail.fsf.org/src/read_body.php?mailbox=INBOX&sort=6&startMessage=1&passed_id=18
form data:
show_more "0"
move_id "19"
targetMailbox "INBOX.Trash"

Working 1.4.13 post:

https://mail1p.fsf.org/src/right_main.php
form data:
smtoken "EEZR1hS4cPUh"
mailbox "INBOX"
msg[0] "19"
targetMailbox "INBOX.Trash"
moveButton "Move"

I figured out that if the post url didn't have any path, or had a path
of "right_main.php", like the old version, it would stop changing the
page, and there was already an example in the code of not passing the
path, so I copied that to make this hacky patch.

I enabled level 2 debug mode, didnt result in any output in the logs.

Configtest shows no errors.
images/fsf.png [new file with mode: 0644]
plugins/squirrelspell/sqspell_config.php
src/read_body.php