Vergleich misc.php - 1.8.16 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 268Zeile 268
	{
$mybb->settings['threadsperpage'] = 20;
}

	{
$mybb->settings['threadsperpage'] = 20;
}

 

$query = $db->simple_select("helpdocs", "COUNT(*) AS total", "hid IN(".$db->escape_string($search['querycache']).")");
$helpcount = $db->fetch_field($query, "total");


// Work out pagination, which page we're at, as well as the limits.
$perpage = $mybb->settings['threadsperpage'];
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page > 0)


// Work out pagination, which page we're at, as well as the limits.
$perpage = $mybb->settings['threadsperpage'];
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page > 0)

	{

	{

		$start = ($page-1) * $perpage;

		$start = ($page-1) * $perpage;

 
		$pages = ceil($helpcount / $perpage);
if($pages > $page)
{
$start = 0;
$page = 1;
}

	}
else
{
$start = 0;
$page = 1;

	}
else
{
$start = 0;
$page = 1;

	}

	}

	$end = $start + $perpage;
$lower = $start+1;
$upper = $end;

	$end = $start + $perpage;
$lower = $start+1;
$upper = $end;

Zeile 293Zeile 302
	}

// Do Multi Pages

	}

// Do Multi Pages

	$query = $db->simple_select("helpdocs", "COUNT(*) AS total", "hid IN(".$db->escape_string($search['querycache']).")");
$helpcount = $db->fetch_array($query);


 
	if($upper > $helpcount)
{
$upper = $helpcount;
}

	if($upper > $helpcount)
{
$upper = $helpcount;
}

	$multipage = multipage($helpcount['total'], $perpage, $page, "misc.php?action=helpresults&sid='".htmlspecialchars_uni($mybb->get_input('sid'))."'");

	$multipage = multipage($helpcount, $perpage, $page, "misc.php?action=helpresults&sid='".htmlspecialchars_uni($mybb->get_input('sid'))."'");

	$helpdoclist = '';

require_once MYBB_ROOT."inc/class_parser.php";

	$helpdoclist = '';

require_once MYBB_ROOT."inc/class_parser.php";

Zeile 354Zeile 360
		eval("\$helpdoclist = \"".$templates->get("misc_helpresults_noresults")."\";");
}


		eval("\$helpdoclist = \"".$templates->get("misc_helpresults_noresults")."\";");
}


	$plugins->run_hooks("misc_helpresults_end");


	$plugins->run_hooks("misc_helpresults_end");


	eval("\$helpresults = \"".$templates->get("misc_helpresults")."\";");
output_page($helpresults);
}

	eval("\$helpresults = \"".$templates->get("misc_helpresults")."\";");
output_page($helpresults);
}

Zeile 365Zeile 371
	$lang->load("helpsections");
$lang->load("customhelpdocs");
$lang->load("customhelpsections");

	$lang->load("helpsections");
$lang->load("customhelpdocs");
$lang->load("customhelpsections");





	$hid = $mybb->get_input('hid', MyBB::INPUT_INT);
add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");


	$hid = $mybb->get_input('hid', MyBB::INPUT_INT);
add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");


Zeile 388Zeile 394
			{
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser();

			{
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser();





				$highlight = $mybb->input['highlight'];
$helpdoc['name'] = $parser->highlight_message($helpdoc['name'], $highlight);
$helpdoc['document'] = $parser->highlight_message($helpdoc['document'], $highlight);

				$highlight = $mybb->input['highlight'];
$helpdoc['name'] = $parser->highlight_message($helpdoc['name'], $highlight);
$helpdoc['document'] = $parser->highlight_message($helpdoc['document'], $highlight);

Zeile 399Zeile 405
				$langnamevar = "d".$helpdoc['hid']."_name";
$langdescvar = "d".$helpdoc['hid']."_desc";
$langdocvar = "d".$helpdoc['hid']."_document";

				$langnamevar = "d".$helpdoc['hid']."_name";
$langdescvar = "d".$helpdoc['hid']."_desc";
$langdocvar = "d".$helpdoc['hid']."_document";

				if($lang->$langnamevar)
{

				if($lang->$langnamevar)
{

					$helpdoc['name'] = $lang->$langnamevar;
}
if($lang->$langdescvar)

					$helpdoc['name'] = $lang->$langnamevar;
}
if($lang->$langdescvar)

				{

				{

					$helpdoc['description'] = $lang->$langdescvar;
}
if($lang->$langdocvar)
{
$helpdoc['document'] = $lang->$langdocvar;

					$helpdoc['description'] = $lang->$langdescvar;
}
if($lang->$langdocvar)
{
$helpdoc['document'] = $lang->$langdocvar;

				}
}


				}
}


			if($helpdoc['hid'] == 3)
{
$helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code);
}

			if($helpdoc['hid'] == 3)
{
$helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code);
}





			add_breadcrumb($helpdoc['name']);

$plugins->run_hooks("misc_help_helpdoc_end");

eval("\$helppage = \"".$templates->get("misc_help_helpdoc")."\";");
output_page($helppage);

			add_breadcrumb($helpdoc['name']);

$plugins->run_hooks("misc_help_helpdoc_end");

eval("\$helppage = \"".$templates->get("misc_help_helpdoc")."\";");
output_page($helppage);

		}

		}

		else
{
error($lang->error_invalidhelpdoc);

		else
{
error($lang->error_invalidhelpdoc);

Zeile 436Zeile 442

$query = $db->simple_select("helpdocs", "*", "", array('order_by' => 'sid, disporder'));
while($helpdoc = $db->fetch_array($query))


$query = $db->simple_select("helpdocs", "*", "", array('order_by' => 'sid, disporder'));
while($helpdoc = $db->fetch_array($query))

		{

		{

			$helpdocs[$helpdoc['sid']][$helpdoc['disporder']][$helpdoc['hid']] = $helpdoc;
}
unset($helpdoc);

			$helpdocs[$helpdoc['sid']][$helpdoc['disporder']][$helpdoc['hid']] = $helpdoc;
}
unset($helpdoc);

Zeile 461Zeile 467
			{
$helpbits = '';
foreach($helpdocs[$section['sid']] as $key => $bit)

			{
$helpbits = '';
foreach($helpdocs[$section['sid']] as $key => $bit)

				{

				{

					foreach($bit as $key => $helpdoc)
{
if($helpdoc['enabled'] != 0)

					foreach($bit as $key => $helpdoc)
{
if($helpdoc['enabled'] != 0)

Zeile 506Zeile 512
		if($mybb->settings['helpsearch'] == 1)
{
eval("\$search = \"".$templates->get("misc_help_search")."\";");

		if($mybb->settings['helpsearch'] == 1)
{
eval("\$search = \"".$templates->get("misc_help_search")."\";");

		}

$plugins->run_hooks("misc_help_section_end");

		}

$plugins->run_hooks("misc_help_section_end");


eval("\$help = \"".$templates->get("misc_help")."\";");
output_page($help);


eval("\$help = \"".$templates->get("misc_help")."\";");
output_page($help);

Zeile 557Zeile 563
			$buddy['username'] = htmlspecialchars_uni($buddy['username']);
$buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
$profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank', 'if(window.opener) { window.opener.location = this.href; return false; }');

			$buddy['username'] = htmlspecialchars_uni($buddy['username']);
$buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
$profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank', 'if(window.opener) { window.opener.location = this.href; return false; }');





			$send_pm = '';
if($mybb->user['receivepms'] != 0 && $buddy['receivepms'] != 0 && $groupscache[$buddy['usergroup']]['canusepms'] != 0)

			$send_pm = '';
if($mybb->user['receivepms'] != 0 && $buddy['receivepms'] != 0 && $groupscache[$buddy['usergroup']]['canusepms'] != 0)

			{

			{

				eval("\$send_pm = \"".$templates->get("misc_buddypopup_user_sendpm")."\";");

				eval("\$send_pm = \"".$templates->get("misc_buddypopup_user_sendpm")."\";");

			}

			}


if($buddy['lastactive'])
{
$last_active = $lang->sprintf($lang->last_active, my_date('relative', $buddy['lastactive']));


if($buddy['lastactive'])
{
$last_active = $lang->sprintf($lang->last_active, my_date('relative', $buddy['lastactive']));

			}
else

			}
else

			{
$last_active = $lang->sprintf($lang->last_active, $lang->never);
}

			{
$last_active = $lang->sprintf($lang->last_active, $lang->never);
}

Zeile 601Zeile 607
		}

eval("\$buddies = \"".$templates->get("misc_buddypopup_user")."\";");

		}

eval("\$buddies = \"".$templates->get("misc_buddypopup_user")."\";");

	}
else
{

	}
else
{

		// No buddies? :(
$colspan = '';
$error = $lang->no_buddies;

		// No buddies? :(
$colspan = '';
$error = $lang->no_buddies;

Zeile 638Zeile 644
	}

if(is_moderator($thread['fid'], "canviewdeleted") || is_moderator($thread['fid'], "canviewunapprove"))

	}

if(is_moderator($thread['fid'], "canviewdeleted") || is_moderator($thread['fid'], "canviewunapprove"))

	{

	{

		if(is_moderator($thread['fid'], "canviewunapprove") && !is_moderator($thread['fid'], "canviewdeleted"))

		if(is_moderator($thread['fid'], "canviewunapprove") && !is_moderator($thread['fid'], "canviewdeleted"))

		{

		{

			$show_posts = "p.visible IN (0,1)";
}
elseif(is_moderator($thread['fid'], "canviewdeleted") && !is_moderator($thread['fid'], "canviewunapprove"))

			$show_posts = "p.visible IN (0,1)";
}
elseif(is_moderator($thread['fid'], "canviewdeleted") && !is_moderator($thread['fid'], "canviewunapprove"))

		{

		{

			$show_posts = "p.visible IN (-1,1)";
}
else
{
$show_posts = "p.visible IN (-1,0,1)";

			$show_posts = "p.visible IN (-1,1)";
}
else
{
$show_posts = "p.visible IN (-1,0,1)";

		}
}
else
{

		}
}
else
{

		$show_posts = "p.visible = 1";
}


		$show_posts = "p.visible = 1";
}


Zeile 770Zeile 776
			$extra_class = ' smilie_pointer';
foreach($smilies_cache as $smilie)
{

			$extra_class = ' smilie_pointer';
foreach($smilies_cache as $smilie)
{

				if($smilie['showclickable'] != 1)
{
continue;
}

 
				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

Zeile 822Zeile 824
		$smilies_cache = $cache->read("smilies");

if(is_array($smilies_cache))

		$smilies_cache = $cache->read("smilies");

if(is_array($smilies_cache))

		{

		{

			$extra_class = $onclick = '';
foreach($smilies_cache as $smilie)
{

			$extra_class = $onclick = '';
foreach($smilies_cache as $smilie)
{

				if($smilie['showclickable'] != 1)
{
continue;
}

 
				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

Zeile 854Zeile 852
{
$mybb->input['imtype'] = $mybb->get_input('imtype');
if($mybb->input['imtype'] != "skype" && $mybb->input['imtype'] != "yahoo")

{
$mybb->input['imtype'] = $mybb->get_input('imtype');
if($mybb->input['imtype'] != "skype" && $mybb->input['imtype'] != "yahoo")

	{

	{

		$message = $lang->error_invalidimtype;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;

		$message = $lang->error_invalidimtype;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;

Zeile 875Zeile 873
	if(empty($user[$mybb->input['imtype']]))
{
$message = $lang->error_invalidimtype;

	if(empty($user[$mybb->input['imtype']]))
{
$message = $lang->error_invalidimtype;

		eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;
exit;
}

		eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;
exit;
}


$settingkey = 'allow'.$mybb->input['imtype'].'field';
if(!is_member($mybb->settings[$settingkey], $user))


$settingkey = 'allow'.$mybb->input['imtype'].'field';
if(!is_member($mybb->settings[$settingkey], $user))

Zeile 924Zeile 922

$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$version = $mybb->get_input('version');


$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$version = $mybb->get_input('version');

	$new_limit = $mybb->get_input('limit', MyBB::INPUT_INT);

 
	$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);

	$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);

	$limit = 15;
if(!empty($new_limit) && $new_limit != $limit)
{
$limit = $new_limit;
}
$feedurl = '';
$add = false;

	$limit = $mybb->get_input('limit', MyBB::INPUT_INT);
$url = $mybb->settings['bburl']."/syndication.php";
$syndicate = $urlquery = array();






add_breadcrumb($lang->nav_syndication);
$unviewable = get_unviewable_forums();
$inactiveforums = get_inactive_forums();


add_breadcrumb($lang->nav_syndication);
$unviewable = get_unviewable_forums();
$inactiveforums = get_inactive_forums();

	$unexp1 = explode(',', $unviewable);
$unexp2 = explode(',', $inactiveforums);
$unexp = array_merge($unexp1, $unexp2);

	$unexp = explode(',', $unviewable . ',' . $inactiveforums);







	if(is_array($forums))

	if(is_array($forums) && !in_array('all', $forums))

	{

	{

		foreach($unexp as $fid)
{
$unview[$fid] = true;
}

$syndicate = '';
$comma = '';
$all = false;

 
		foreach($forums as $fid)
{

		foreach($forums as $fid)
{

			if($fid == "all")
{
$all = true;
break;
}
elseif(ctype_digit($fid))
{
if(!isset($unview[$fid]))
{
$syndicate .= $comma.$fid;
$comma = ",";
$flist[$fid] = true;
}
}
}
$url = $mybb->settings['bburl']."/syndication.php";
if(!$all)
{
$url .= "?fid=$syndicate";
$add = true;
}

// If the version is not RSS2.0, set the type to Atom1.0.
if($version != "rss2.0")
{
if(!$add)
{
$url .= "?";
}
else
{
$url .= "&";
}
$url .= "type=atom1.0";
$add = true;
}
if((int)$limit > 0)
{
if($limit > 50)

			if(ctype_digit($fid) && !in_array($fid, $unexp))







































			{

			{

				$limit = 50;
}
if(!$add)
{
$url .= "?";
}
else
{
$url .= "&";
}
if(is_numeric($limit))
{
$url .= "limit=$limit";

				$syndicate[] = $fid;
$flist[$fid] = true;












			}
}

			}
}

		eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");
}
unset($GLOBALS['forumcache']);





if(!empty($syndicate))
{
$urlquery[] = "fid=". implode(",", $syndicate);
}
}


// If there is no version in the input, check the default (RSS2.0).


// If there is no version in the input, check the default (RSS2.0).

	if($version == "atom1.0")
{







	$json1check = $atom1check = $rss2check = "";
if($version == "json")
{
$json1check = "checked=\"checked\"";
$urlquery[] = "type=".$version;
}
elseif($version == "atom1.0")
{

		$atom1check = "checked=\"checked\"";

		$atom1check = "checked=\"checked\"";

		$rss2check = '';
}

		$urlquery[] = "type=".$version;
}

	else
{

	else
{

		$atom1check = '';

 
		$rss2check = "checked=\"checked\"";
}

		$rss2check = "checked=\"checked\"";
}

 
	// Evaluate, reset and set limit (Drive through settings?)
$limit = empty($limit) ? 15 : (($limit > 50) ? 50 : $limit);
$urlquery[] = "limit=" . $limit;

// Generate feed url
if(!empty($urlquery)){
$url .= "?" . implode('&', $urlquery);
}
eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");

unset($GLOBALS['forumcache']);


	$forumselect = makesyndicateforums();

	$forumselect = makesyndicateforums();





	$plugins->run_hooks("misc_syndication_end");

eval("\$syndication = \"".$templates->get("misc_syndication")."\";");

	$plugins->run_hooks("misc_syndication_end");

eval("\$syndication = \"".$templates->get("misc_syndication")."\";");

Zeile 1033Zeile 987
elseif($mybb->input['action'] == "clearcookies")
{
verify_post_check($mybb->get_input('my_post_key'));

elseif($mybb->input['action'] == "clearcookies")
{
verify_post_check($mybb->get_input('my_post_key'));





	$plugins->run_hooks("misc_clearcookies");

$remove_cookies = array('mybbuser', 'mybb[announcements]', 'mybb[lastvisit]', 'mybb[lastactive]', 'collapsed', 'mybb[forumread]', 'mybb[threadsread]', 'mybbadmin',

	$plugins->run_hooks("misc_clearcookies");

$remove_cookies = array('mybbuser', 'mybb[announcements]', 'mybb[lastvisit]', 'mybb[lastactive]', 'collapsed', 'mybb[forumread]', 'mybb[threadsread]', 'mybbadmin',

Zeile 1087Zeile 1041
				if($perms['canview'] == 1 || $mybb->settings['hideprivateforums'] == 0)
{
$optionselected = '';

				if($perms['canview'] == 1 || $mybb->settings['hideprivateforums'] == 0)
{
$optionselected = '';

					if(isset($flist[$forum['fid']]))
{

					if(isset($flist[$forum['fid']]))
{

						$optionselected = 'selected="selected"';

						$optionselected = 'selected="selected"';

						$selecteddone = "1";

 
					}


					}


					if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && $mybb->cookies['forumpass'][$forum['fid']] === md5($mybb->user['uid'].$forum['password']))

					if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password'])))

					{
eval("\$forumlistbits .= \"".$templates->get("misc_syndication_forumlist_forum")."\";");
}

					{
eval("\$forumlistbits .= \"".$templates->get("misc_syndication_forumlist_forum")."\";");
}

Zeile 1102Zeile 1055
					{
$newdepth = $depth."    ";
$forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);

					{
$newdepth = $depth."    ";
$forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);

 
					}
}
else
{
if(isset($flist[$forum['fid']]))
{
unset($flist[$forum['fid']]);

					}
}
}

					}
}
}

Zeile 1110Zeile 1070

if($addselect)
{


if($addselect)
{

		$addsel = '';
if(empty($selecteddone))
{
$addsel = ' selected="selected"';
}


		$addsel = empty($flist) ? ' selected="selected"' : '';






		eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
}


		eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
}