Move button changes page to list of messages instead of next message
Ian Kelling <[email protected]> Sat, 25 Apr 2020 11:15:14 -0400
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
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:
Index: read_body.php
===================================================================
--- read_body.php (revision 14855)
+++ read_body.php (working copy)
@@ -642,7 +642,7 @@
if (in_array('\\deleted', $aMailbox['PERMANENTFLAGS'],true)) {
$delete_url = $base_uri . "src/$where";
$oTemplate->assign('can_be_deleted', true);
- $oTemplate->assign('move_delete_form_action', $base_uri.'src/'.$where);
+ $oTemplate->assign('move_delete_form_action', '');
$oTemplate->assign('delete_form_extra', addHidden('mailbox', $aMailbox['NAME'])."\n" .
addHidden('msg[0]', $passed_id)."\n" .
addHidden('startMessage', $startMessage)."\n" );
All the relevant post guideline info:
squirrelmail version:
Last Changed Rev: 14848
Last Changed Date: 2020-03-24 13:38:48 -0400 (Tue, 24 Mar 2020)
plugins:
$plugins[] = 'change_password';
$plugins[] = 'newmail';
$plugins[] = 'sent_subfolders';
$plugins[] = 'calendar';
$plugins[] = 'message_details';
$plugins[] = 'fortune';
$plugins[] = 'squirrelspell';
$plugins[] = 'preview_pane';
php version: 7.2+60ubuntu1
apache version: 2.4.29
OS: trisquel 9 (derivative of ubuntu 18.04)
Browser: abrowser 75 (derivative of firefox 75)
I enabled level 2 debug mode, didnt result in any output in the logs.
Configtest shows no errors.
--
Ian Kelling | Senior Systems Administrator, Free Software Foundation
GPG Key: B125 F60B 7B28 7FF6 A2B7 DF8F 170A F0E2 9542 95DF
https://fsf.org | https://gnu.org
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel