Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] [pgsql] Report posts [C-StefanT]
#7
Changes to ./inc/datahandlers/pm.php; around line 494...

		$this->pm_insert_data = array(
			'fromid' => $pm['sender']['uid'],
			'folder' => $pm['folder'],

Replace with:

		$this->pm_insert_data = array(
			'fromid' => intval($pm['sender']['uid']),
			'folder' => $pm['folder'],

Find (around line 510):

$query = $db->simple_select("privatemessages", "pmid", "folder='3' AND uid='{$pm['sender']['uid']}' AND pmid='{$pm['pmid']}'");

Replace with:

$query = $db->simple_select("privatemessages", "pmid", "folder='3' AND uid='".intval($pm['sender']['uid'])."' AND pmid='{$pm['pmid']}'");

Find (around line 630):

			$this->pm_insert_data['uid'] = $pm['sender']['uid'];
			$this->pm_insert_data['folder'] = 2;
			$this->pm_insert_data['status'] = 1;
			$this->pm_insert_data['receipt'] = 0;

Replace with:

			$this->pm_insert_data['uid'] = intval($pm['sender']['uid']);
			$this->pm_insert_data['folder'] = 2;
			$this->pm_insert_data['status'] = 1;
			$this->pm_insert_data['receipt'] = 0;

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:

SQL Error:
42883 - ERROR: function concat(text) does not exist LINE 4: LEFT JOIN mybb_usergroups g ON (((CONCAT(','|| u.addit... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. 

Query is found in report.php:

					$query = $db->query("
						SELECT u.username, u.email, u.receivepms, u.uid
						FROM ".TABLE_PREFIX."users u
						LEFT JOIN ".TABLE_PREFIX."usergroups g ON (((CONCAT(','|| u.additionalgroups|| ',') LIKE CONCAT('%,'|| g.gid|| ',%')) OR u.usergroup = g.gid))
						WHERE (g.cancp=1 OR g.issupermod=1)
					");


Messages In This Thread
RE: [pgsql] Report posts - by Ryan Gordon - 2009-05-07, 04:46 PM
RE: [pgsql] Report posts - by Tomm M - 2009-05-13, 04:02 PM
RE: [pgsql] Report posts - by Ryan Gordon - 2009-05-13, 09:40 PM
RE: [pgsql] Report posts - by Tomm M - 2009-05-13, 09:54 PM
RE: [pgsql] Report posts - by Ryan Gordon - 2009-05-14, 01:43 AM
RE: [pgsql] Report posts - by Tomm M - 2009-05-14, 08:04 AM
RE: [pgsql] Report posts - by Ryan Gordon - 2009-05-14, 03:20 PM
RE: [pgsql] Report posts - by Tomm M - 2009-05-14, 03:37 PM
[F] [pgsql] Report posts - by Tomm M - 2009-05-15, 11:17 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)