You'd need to call parse_message() on it, if I remember correctly.

SuperMAG wrote:

ok you used some difficult english words ... i will translate that words now ...

I'll put it in easier terms. smile It'll be ready when there are no more complaints or useful suggestions. big_smile

678

(14 replies, posted in Programming)

I'm on PgSQL. big_smile Not sure if it's implemented the same way as MySQL.

Btw, the lack of an error message for the db error was a self inflicted coding injury. big_smile

679

(14 replies, posted in Programming)

Just checked. The get_current_url() function is unaltered from how it is in 1.3, (other than removing the hooks, obviously), big_smile and I put the same varchar(255) setting on the column, so it may be worthwhile instituting a length check/strip on the URI before it's returned by the function, or removing the 255 characters limitation on the column.

680

(14 replies, posted in Programming)

I backported the prev_url setup to 1.2*, but it is with the same function & column setup as 1.3, in that regard. (I'll just double check to make sure I haven't made any changes to the basic premise, though). The prev_url column is varchar(255). A pagination link or suchlike with more than that length fails to insert due to the 255 max setting.

SuperMAG wrote:

how can you know that all the bugs have been found and fixed ...

Question: Why do you think stable is now on version 1.2.17? A period of beta testing with no new reports constitutes considering going to stable. That does not mean everything is sorted. However, until that quiet point arrives, then stable is an unknown timeframe.

682

(14 replies, posted in Programming)

Just thought to check the SQL logs. big_smile It's the new get_current_url function combined with the online table which is causing the problem. The URI is too long to go in the prev_url column. (The error message wasn't displaying).

Edit: Just whilst on the subject, would there be a better way to supply the id's to the script other than in the pagination links?

kure wrote:

OK, dumb question - I don't need to hear "When it's done".

There is no other answer. When quirks/bugs have been found and sorted.

684

(14 replies, posted in Programming)

Are there any normal circumstances that can lead to the $pun_user array not being set? Having a problem with one of the search scripts, (not core), which is clapping out due to the pun_user array not being defined. The common.php include is at the top of the file, as normal, and the script works fine until it's specifically called with a set of id's for multiple page listings. I'll honestly be damned if I can see where the problem lay, however. big_smile It appears when the $_GET['dsid'] array is set, on the second+ page of a search. The script itself is here:

Cheers.

I'll have a look at doing it if I get a chance. smile

wobo wrote:

Sorry, but I disagree. Why should /include/email.php bypass any errors?

That's not disagreeing. I just made a poor word choice. smile To rephrase somewhat. As you mention, it should continue looping. That is what I was meaning when I used the term bypass. To report the error is easy enough. It can easily be added to an anrray and reported after completion. For example, this is the mail looping I used in the email_topic form:

        foreach ($rclist as $recipient)
        {
                $recipient = trim($recipient);

                if (is_valid_email($recipient))
                {
                        $rcptlist[] = $recipient;
                        $recipient = $recipient.' <'.$recipient.'>';

                        if ($pun_config['o_smtp_host'] != '')
                        {
                                smtp_mail($recipient, $subject, $message, $headers);
                        }
                        else
                        {
                                mail($recipient, $subject, $message, $headers);
                        }
                }
                else
                {
                        $failedlist[] = $recipient;
                }
        }

with the recipient failure notice:

                if (isset($failedlist) && $failedlist != null)
                {
                        echo "\t\t\t".'<p>'.$lang['email']['Failed recipients'].' '.pun_htmlspecialchars(implode(', ', $failedlist)).'</p>'."\n";
                }

That type of code, added to the e-mail broadcast plugin inplace of the existing, would most likely, (with a bit of tweaking to explicitly catch the smtp errors too), do the job.

You need to have a delve in: include/email.php. That's the file responsible for the mail functions. You should be able to modify it to bypass a 450 error. If I remember correctly, a 4** code shouldn't be treated as terminal failure anyhow. It signifies a soft failure, not a permanent one.

Whichever files where the I.P address is displayed. Off the top of my head, there is viewtopic.php, userlist.php, profile.php, but probably more.

689

(16 replies, posted in PunBB 1.2 troubleshooting)

You're welcome. smile

690

(16 replies, posted in PunBB 1.2 troubleshooting)

er0k wrote:

I'm having the same problem. I applied the patch for 1.2.17, and my logout link does not include the csrf_token.

Then the patch hasn't applied correctly, (which will happen if your forums are modified). Manually look at the patch and apply the changes in functions.php for the logout link.

I would have thought that a http_referrer check along with an if/else statement in header.php should do it. I may be wrong though. big_smile Of course, that would also only work if the referrer wasn't empty or faked.

wobo wrote:

I guess so because after fixing that prefix there was no error related to the banned user patch.

Good to hear. smile


wobo wrote:

The problem with the whole thing is, there is no way to test such a thing as mass mailings. I already received mails from people who complained that they received the mail twice. sad

wobo

Create a test group, add a few test accounts to it and modify the db query in the plugin to only pull that and the banned groups info. Then you'll easily be able to tell that it is both doing the ban list bit correctly, and that it is indeed sending the e-mails correctly. smile

I think Quaker was more referring to the general OpSys stability, rather than errant configs or setup. big_smile M$ do, after all, hardly have a clean, shiny record where stability, (or security), are concerned. big_smile

wobo wrote:

The problem with the banned users was the database prefix, we use only 'pun_'. While everywhere the prefix is called by its variable ($db->prefix) you named it 'punbb_' in your line starting with '$idcheck.....'. Although, I wonder why I did not get any error message (Unable to fetch banned users)?

I'd not noticed the hard coded prefix. Thanks for pointing it out. smile I've updated the original code again accordingly. smile Is it working okay now, that code?

Btw, not sure on the other failure, offhand. I'll have a peek when I've chance.

Apologies. I had cocked up that code above. big_smile (I've edited it so it's now correct).

Any chance you could post a copy of the code as it was when you modified that code? I'm curious now. big_smile

Plus, for the failure bit, changing this line:

pun_mail($mail_to, $mail_subject, $mail_message);

to

@pun_mail($mail_to, $mail_subject, $mail_message);

should, I believe, cause it to ignore/suppress the errors and continue.

wobo wrote:

The patch to avoid banned users only left a blank page but not a single mail was sent.

It should have worked fine if you applied the changes correctly.

698

(16 replies, posted in PunBB 1.2 troubleshooting)

lee.a wrote:

but it doesnt log me out

Obviously, otherwise you wouldn't have created this thread. Again, post the link to your forum.

If he said it has, then it won't be apparently, but fact.

700

(16 replies, posted in PunBB 1.2 troubleshooting)

lee.a wrote:

Is the link i posted what it is supposed to be?

That's fine.