Vergleich showthread.php - 1.6.12 - 1.6.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1001Zeile 1001
	$similarthreads = '';
if($mybb->settings['showsimilarthreads'] != 0)
{

	$similarthreads = '';
if($mybb->settings['showsimilarthreads'] != 0)
{

 
		$own_perm = '';
if($forumpermissions['canonlyviewownthreads'] == 1)
{
$own_perm = " AND t.uid={$mybb->user['uid']}";
}


		switch($db->type)
{
case "pgsql":

		switch($db->type)
{
case "pgsql":

Zeile 1008Zeile 1014
					SELECT t.*, t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid), plainto_tsquery ('".$db->escape_string($thread['subject'])."') AS query

					SELECT t.*, t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid), plainto_tsquery ('".$db->escape_string($thread['subject'])."') AS query

					WHERE t.fid='{$thread['fid']}' AND t.tid!='{$thread['tid']}' AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.subject @@ query

					WHERE t.fid='{$thread['fid']}' AND t.tid!='{$thread['tid']}' AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.subject @@ query{$own_perm}

					ORDER BY t.lastpost DESC
OFFSET 0 LIMIT {$mybb->settings['similarlimit']}
");

					ORDER BY t.lastpost DESC
OFFSET 0 LIMIT {$mybb->settings['similarlimit']}
");

Zeile 1018Zeile 1024
					SELECT t.*, t.username AS threadusername, u.username, MATCH (t.subject) AGAINST ('".$db->escape_string($thread['subject'])."') AS relevance
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)

					SELECT t.*, t.username AS threadusername, u.username, MATCH (t.subject) AGAINST ('".$db->escape_string($thread['subject'])."') AS relevance
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)

					WHERE t.fid='{$thread['fid']}' AND t.tid!='{$thread['tid']}' AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND MATCH (t.subject) AGAINST ('".$db->escape_string($thread['subject'])."') >= '{$mybb->settings['similarityrating']}'

					WHERE t.fid='{$thread['fid']}' AND t.tid!='{$thread['tid']}' AND t.visible='1' AND t.closed NOT LIKE 'moved|%'{$own_perm} AND MATCH (t.subject) AGAINST ('".$db->escape_string($thread['subject'])."') >= '{$mybb->settings['similarityrating']}'

					ORDER BY t.lastpost DESC
LIMIT 0, {$mybb->settings['similarlimit']}
");

					ORDER BY t.lastpost DESC
LIMIT 0, {$mybb->settings['similarlimit']}
");