flushedpancake
Senior Member   
Posts: 162
Registered: 4-1-2024 Location: England
Member Is Offline
Mood: UwU
|
|
The message can be blank.
|
|
|
flushedpancake
Senior Member   
Posts: 162
Registered: 4-1-2024 Location: England
Member Is Offline
Mood: UwU
|
|
Deleting the actual content of a post (and its subject) while "! Delete this message !" is checked, then submitting will also return an
error. If that particular option is checked we should probably just ignore the contents of the message/subject input. ()
(You can probably just spam empty BBCode tags to get around any kind of word/character limit, so please, bear that in mind if implementing any such
checks. The return key shouldn't count towards the minimum, either.)
|
|
|
miqrogroove
|
|
Sounds like there is a minor bug in the delete post option.
|
|
|
flushedpancake
Senior Member   
Posts: 162
Registered: 4-1-2024 Location: England
Member Is Offline
Mood: UwU
|
|
Using the 'delete message' option on the first post in the thread comes up "thank you, your post has been edited" lol.
Either way, not sure if it even works, but I did make an attempt to rearrange the logic that handles this functionality to get it to actually... yeah.
See PR
|
|
|
miqrogroove
|
|
|
|
|
miqrogroove
|
|
|
|
|
miqrogroove
|
|
Regarding the PR, we don't commit untested code here so I'm not sure what is the expectation for an untested PR.
Disallowing users from deleting their own posts is not the direction I want to take for resolving the text change issue.
|
|
|
flushedpancake
Senior Member   
Posts: 162
Registered: 4-1-2024 Location: England
Member Is Offline
Mood: UwU
|
|
Quote: Originally posted by miqrogroove  | | Disallowing users from deleting their own posts is not the direction I want to take for resolving the text change issue. |
You already can't delete the first post in a thread, even if there's no other posts. Pretty sure you were able to at one point. Just kind of
assumed it was changed to prevent some havoc
Also, unrelated but:
https://github.com/marketplace/actions/composer-php-actions
Could be useful, for what it's worth. 
|
|
|
miqrogroove
|
|
I agree it's broken for empty forms, but it does allow deleting the first post in a thread otherwise. If you've found more bugs theb we can
keep adding them.
|
|
|
flushedpancake
Senior Member   
Posts: 162
Registered: 4-1-2024 Location: England
Member Is Offline
Mood: UwU
|
|
|
|
|
miqrogroove
|
|
|
|
|
miqrogroove
|
|
Yeah I can see why that happened. The old code was terrible for readability:
| Code: | if ( $status1 != 'Moderator' && ( $self['username'] !== $orig['author'] || $thread['closed'] != '' ) ) { |
I'm going to rewrite that logic without the triple negative:
| Code: | $canEdit = $isMod || $vars->self['username'] === $orig['author'] && $thread['closed'] == ''; |
|
|
|
miqrogroove
|
|
I'm caught up on bugs now. There were some changes to the upgrade script that I'll have to test more before it can be packaged.
|
|
|