|
[F] [pgsql] Report posts [C-StefanT]
|
|
05-03-2009, 05:07 PM
Post: #1
|
|||
|
|||
|
[F] [pgsql] Report posts [C-StefanT]
If the board is set to notify the moderators via PM about reported posts you get two SQL errors using PostgreSQL.
Quote:SQL Error:You can find the query in inc/datahandlers/pm.php in line 511. Quote:SQL Error:You can find the query in inc/datahandlers/pm.php in line 584. Greets, Michael -------------
|
|||
|
05-07-2009, 04:46 PM
Post: #2
|
|||
|
|||
|
RE: [pgsql] Report posts
I think this is the same: http://community.mybboard.net/thread-49258.html
They're just showing two different results for the same issue depending the SQL software. |
|||
|
05-13-2009, 04:02 PM
Post: #3
|
|||
|
|||
|
RE: [pgsql] Report posts
Not sure if this is the best way or not - I'm not too polished on pgSQL...
In ./inc/datahandlers/pm.php, around line 499, find: PHP Code: $this->pm_insert_data = array( Above it, add: Code: if(!$pm['sender']['uid'])That obviously sets it to the uid of the user reporting the post - setting it to 0 will set it to "MyBB Engine". |
|||
|
05-13-2009, 09:40 PM
Post: #4
|
|||
|
|||
|
RE: [pgsql] Report posts
No, that's a bad fix. It just needs to be intval'ed so that it shows up as 0 instead of a null value.
|
|||
|
05-13-2009, 09:54 PM
Post: #5
|
|||
|
|||
RE: [pgsql] Report posts
(05-13-2009 09:40 PM)Ryan Gordon Wrote: No, that's a bad fix. It just needs to be intval'ed so that it shows up as 0 instead of a null value. I tried that, and I just got a new SQL error (as said, not too polished on pgSQL errors!). I think there's a different bug that's on top of this one too which I think is the cause though. I'll revisit in the morning... |
|||
|
05-14-2009, 01:43 AM
Post: #6
|
|||
|
|||
|
RE: [pgsql] Report posts
Well then what is the new SQL error? I can simply tell you what to change if you tell me the new SQL error
|
|||
|
05-14-2009, 08:04 AM
(This post was last modified: 05-14-2009 08:04 AM by Tomm M.)
Post: #7
|
|||
|
|||
|
RE: [pgsql] Report posts
Changes to ./inc/datahandlers/pm.php; around line 494...
PHP Code: $this->pm_insert_data = array(Replace with: PHP Code: $this->pm_insert_data = array(Find (around line 510): PHP Code: $query = $db->simple_select("privatemessages", "pmid", "folder='3' AND uid='{$pm['sender']['uid']}' AND pmid='{$pm['pmid']}'"); Replace with: PHP Code: $query = $db->simple_select("privatemessages", "pmid", "folder='3' AND uid='".intval($pm['sender']['uid'])."' AND pmid='{$pm['pmid']}'"); Find (around line 630): PHP Code: $this->pm_insert_data['uid'] = $pm['sender']['uid'];Replace with: PHP Code: $this->pm_insert_data['uid'] = intval($pm['sender']['uid']);That will fix the 3 SQL errors that will appear when reporting a post. Not sure if you want me to make a new bug report for this, at it is a *slightly* different bug. If the setting is for PM or Email, and there is no set moderator for the forum, you receive this error: Code: SQL Error:Query is found in report.php: Code: $query = $db->query(" |
|||
|
05-14-2009, 03:20 PM
Post: #8
|
|||
|
|||
RE: [pgsql] Report posts
(05-14-2009 08:04 AM)Tomm M Wrote: Not sure if you want me to make a new bug report for this, at it is a *slightly* different bug. Yes, make a separate bug report. To fix that you need to use a switch statement and the proper form of the query for postgresql. I can fix it if you want. |
|||
|
05-14-2009, 03:37 PM
Post: #9
|
|||
|
|||
|
RE: [pgsql] Report posts
The switch statement is there, but pgsql uses the same as sqlite so it won't work.
Made a new report and posted a fix - it should work, but if it's wrong then please feel free to correct it! http://community.mybboard.net/thread-49838.html |
|||
|
05-15-2009, 11:17 AM
Post: #10
|
|||
|
|||
|
[F] [pgsql] Report posts
Thank you for your bug report.
This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated. With regards, MyBB Group |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help

![[Image: donation_drive_sig.png]](http://mybboard.net/assets/images/donation_drive_sig.png)

