Vergleich search.php - 1.4.7 - 1.4.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright © 2008 MyBB Group, All Rights Reserved

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: search.php 4352 2009-04-18 22:25:55Z Tikitiki $

 * $Id: search.php 4375 2009-05-26 12:06:03Z Tomm $

 */



 */



Zeile 629Zeile 629
				$test_moderated_forums[$forum['fid']] = $forum['fid'];
}
$p_unapproved_where = "visible >= 0";

				$test_moderated_forums[$forum['fid']] = $forum['fid'];
}
$p_unapproved_where = "visible >= 0";

			$t_unapproved_where = "visible < 0 OR fid NOT IN ({$moderated_forums})";

			$t_unapproved_where = "visible < 0 AND fid NOT IN ({$moderated_forums})";

		}
else
{
// Normal users
$p_unapproved_where = 'visible=1';
$t_unapproved_where = 'visible < 1';

		}
else
{
// Normal users
$p_unapproved_where = 'visible=1';
$t_unapproved_where = 'visible < 1';

		}	








		}

$post_cache_options = array('LIMIT' => intval($mybb->settings['searchhardlimit']));
if(strpos($sortfield, 'p.') !== false)
{
$post_cache_options['order_by'] = str_replace('p.', '', $sortfield);
$post_cache_options['order_dir'] = $order;
}


$tids = array();
$pids = array();
// Make sure the posts we're viewing we have permission to view.


$tids = array();
$pids = array();
// Make sure the posts we're viewing we have permission to view.

		$query = $db->simple_select("posts", "pid, tid", "pid IN(".$db->escape_string($search['posts']).") AND {$p_unapproved_where} {$limitsql}");

		$query = $db->simple_select("posts", "pid, tid", "pid IN(".$db->escape_string($search['posts']).") AND {$p_unapproved_where}", $post_cache_options);

		while($post = $db->fetch_array($query))
{
$pids[$post['pid']] = $post['tid'];

		while($post = $db->fetch_array($query))
{
$pids[$post['pid']] = $post['tid'];

Zeile 766Zeile 773
					{
$last_read = 1;
}

					{
$last_read = 1;
}

				}

				}

			}

if($dot_icon[$post['tid']])

			}

if($dot_icon[$post['tid']])

Zeile 852Zeile 859
			if(my_strlen($post['message']) > 200)
{
$prev = my_substr($post['message'], 0, 200)."...";

			if(my_strlen($post['message']) > 200)
{
$prev = my_substr($post['message'], 0, 200)."...";

			}

			}

			else
{
$prev = $post['message'];

			else
{
$prev = $post['message'];

Zeile 933Zeile 940
		$where_sql .= " AND fid NOT IN ($inactiveforums)";
}


		$where_sql .= " AND fid NOT IN ($inactiveforums)";
}


 
	$options = array(
'LIMIT' => intval($mybb->settings['searchhardlimit']),
'order_by' => 'dateline',
'order_dir' => 'DESC'
);


	$pids = '';
$comma = '';

	$pids = '';
$comma = '';

	$query = $db->simple_select("posts", "pid", "{$where_sql} {$limitsql}");

	$query = $db->simple_select("posts", "pid", "{$where_sql}", $options);

	while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;

	while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;

			$comma = ',';

			$comma = ',';

	}

$tids = '';

	}

$tids = '';

Zeile 949Zeile 962
	{
$tids .= $comma.$tid;
$comma = ',';

	{
$tids .= $comma.$tid;
$comma = ',';

	}


	}


	$sid = md5(uniqid(microtime(), 1));
$searcharray = array(
"sid" => $db->escape_string($sid),

	$sid = md5(uniqid(microtime(), 1));
$searcharray = array(
"sid" => $db->escape_string($sid),

Zeile 981Zeile 994
	{
$where_sql .= " AND fid NOT IN ($inactiveforums)";
}

	{
$where_sql .= " AND fid NOT IN ($inactiveforums)";
}

	








$options = array(
'LIMIT' => intval($mybb->settings['searchhardlimit']),
'order_by' => 'dateline',
'order_dir' => 'DESC'
);


	$pids = '';
$comma = '';

	$pids = '';
$comma = '';

	$query = $db->simple_select("posts", "pid", "{$where_sql} {$limitsql}");

	$query = $db->simple_select("posts", "pid", "{$where_sql}", $options);

	while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;

	while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;