Firefox PHP

Phorum 5.2.23 released

Phorum 5.2.23 released
January 31, 2017 08:34AM
I'm happy to announce our latest stable release Phorum 5.2.23.

It is a bug fix release over 5.2.22 fixing some issues reported since the last release.

You can download this new release from our downloads page or our github page.

  • Missing column force_password_change added.
  • Quoted text lines truncated after 50 characters (fixing #1020).


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Phorum 5.2.23 released
August 10, 2017 08:00PM
I updated my forum to 5.2.23, but quoted text lines are still truncated - see the picture:

[www.dropbox.com]

Am I missing something?

Quote
Oliver Riesen-Mallmann
[*] Quoted text lines truncated after 50 characters (fixing #1020).
Re: Phorum 5.2.23 released
August 19, 2017 06:42AM
Hi Andrej,

I'll check after my vacations... I'm back on monday...

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Phorum 5.2.23 released
August 22, 2017 07:54AM
Hi Andrej,

can you check please that the corresponding php file on your server includes the change from this commit:
[github.com]

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Phorum 5.2.23 released
August 22, 2017 01:20PM
Hi Oliver,
Thank you for your response!

Yes, in request_first.php file the string was:
$quoted = phorum_wordwrap(trim($quoted), 50, "\n> ", false);

But in my forum, the quoted text was still truncated.

Just for now, I changed the value to 9999:
$quoted = phorum_wordwrap(trim($quoted), 9999, "\n> ", false);

Now only very large quotes get truncated.

Best regards,
Andrej

Quote
Oliver Riesen-Mallmann
Hi Andrej,

can you check please that the corresponding php file on your server includes the change from this commit:
[github.com]

Regards
Oliver
Re: Phorum 5.2.23 released
August 23, 2017 03:52AM
Hi Andrej,

ok, next question: does your Phorum installation use the internal PHP function wordwrap or our internal function _phorum_wordwrap? See /include/format_functions.php starting at line 395...

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Phorum 5.2.23 released
August 23, 2017 06:05AM
Hi Oliver,

These are the lines from 395:

function phorum_wordwrap( $text, $width = 72, $break = "\n", $cut = false )
{
// Unfortunately, mbstring is a non-default extension and we can therefore
// not be sure that it is available in the PHP installation.
if (function_exists('mb_internal_encoding')) {
$paragraphs = explode($break, $text);
foreach ($paragraphs as &$paragraph) {
$paragraph = _phorum_wordwrap($paragraph, $width, $break, $cut);
}
return implode($break, $paragraphs);
} else {
return wordwrap($text, $width, $break, $cut);
}
}

Best regards,
Andrej
Re: Phorum 5.2.23 released
August 23, 2017 06:23AM
Hi Andrej,

yes, i know...

But which part of the "if" uses YOUR specific Phorum installation?

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Phorum 5.2.23 released
August 23, 2017 06:27AM
I'm afraid I don't know what to look at because I am not a programmer.
Help me out, please.

Regards,
Andrej
Re: Phorum 5.2.23 released
June 17, 2020 11:59AM
well, old stuff, but anyway:

I could reproduce the issue with the report-function. Long lines were cut off in the mail in the parts "explanations" and "body" (i.e the message body of the post you are reporting).

Problem is indeed in include/format_functions.php, function _phorum_wordwrap():

NULL as a parameter for length in mb_substr() means a length of zero (i.e. "0") for PHP version prior to PHP 5.4.8.
As Phorum says it's requirements are 5.2, this can result in the wrong behavior ;-) And as there are still enterprise level distributions like CentOS 6 alive and supported, which run only PHP 5.3.3, it might be useful to fix it ;-)

Fix:
Replace
Quote

$text = trim(mb_substr($text, mb_strlen($part, $encoding), NULL, $encoding));
with
Quote

$text = trim(mb_substr($text, mb_strlen($part, $encoding), mb_strlen($text,$encoding), $encoding));
in file include/format_functions.php
Re: Phorum 5.2.23 released
June 17, 2020 02:41PM
Hi Barcino,

Thank you for letting me know of your solution.

But before I make your suggested change I have a question:

In the file format_functions.php there are two instances of
$text = trim(mb_substr($text, mb_strlen($part, $encoding), NULL, $encoding));

Should I replace them both?

Regards,
Andrej
Bugfix _phorum_wordwrap {was:Re: Phorum 5.2.23 released]
June 19, 2020 07:05AM
yes, in both instances.
Re: Bugfix _phorum_wordwrap {was:Re: Phorum 5.2.23 released]
July 12, 2020 11:01AM
Hi Barcino,

I did as you proposed and now quoting works as it should.

Thanks a lot!
Sorry, only registered users may post in this forum.

Click here to login