![]() |
[F] [pgsql] Report posts [C-StefanT] - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Community Archive (https://community.mybb.com/forum-106.html) +--- Forum: Archived Forums (https://community.mybb.com/forum-143.html) +---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html) +----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html) +------ Forum: MyBB 1.4.6 (https://community.mybb.com/forum-116.html) +------ Thread: [F] [pgsql] Report posts [C-StefanT] (/thread-49255.html) |
[F] [pgsql] Report posts [C-StefanT] - Michael S. - 2009-05-03 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. RE: [pgsql] Report posts - Ryan Gordon - 2009-05-07 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. RE: [pgsql] Report posts - Tomm M - 2009-05-13 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:
Above it, add:
That obviously sets it to the uid of the user reporting the post - setting it to 0 will set it to "MyBB Engine". RE: [pgsql] Report posts - Ryan Gordon - 2009-05-13 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. RE: [pgsql] Report posts - Tomm M - 2009-05-13 (2009-05-13, 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... RE: [pgsql] Report posts - Ryan Gordon - 2009-05-14 Well then what is the new SQL error? I can simply tell you what to change if you tell me the new SQL error RE: [pgsql] Report posts - Tomm M - 2009-05-14 Changes to ./inc/datahandlers/pm.php; around line 494...
Replace with:
Find (around line 510):
Replace with:
Find (around line 630):
Replace with:
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:
Query is found in report.php:
RE: [pgsql] Report posts - Ryan Gordon - 2009-05-14 (2009-05-14, 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. RE: [pgsql] Report posts - Tomm M - 2009-05-14 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 [F] [pgsql] Report posts - Tomm M - 2009-05-15 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 |