Vergleich inc/functions_post.php - 1.8.15 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 183Zeile 183
	$post['subject_title'] = $post['subject'];

// Get the usergroup

	$post['subject_title'] = $post['subject'];

// Get the usergroup

	if($post['userusername'])

	if($post['usergroup'])

	{

	{

		if(!$post['displaygroup'])
{
$post['displaygroup'] = $post['usergroup'];
}
$usergroup = $groupscache[$post['displaygroup']];









		$usergroup = usergroup_permissions($post['usergroup']);
}
else
{
$usergroup = usergroup_permissions(1);
}

// Fetch display group data.
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$post['displaygroup'])
{
$post['displaygroup'] = $post['usergroup'];

	}

	}

	else




$displaygroup = usergroup_displaygroup($post['displaygroup']);
if(is_array($displaygroup))

	{

	{

		$usergroup = $groupscache[1];

		$usergroup = array_merge($usergroup, $displaygroup);

	}

if(!is_array($titlescache))

	}

if(!is_array($titlescache))

Zeile 330Zeile 340
			eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");
}


			eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");
}


		if($mybb->settings['enablepms'] == 1 && (($post['receivepms'] != 0 && $usergroup['canusepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))

		if($mybb->settings['enablepms'] == 1 && $post['uid'] != $mybb->user['uid'] && (($post['receivepms'] != 0 && $usergroup['canusepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))

		{
eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";");
}

		{
eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";");
}

Zeile 356Zeile 366
			$post['button_www'] = "";
}


			$post['button_www'] = "";
}


		if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)

		if($post['hideemail'] != 1 && $post['uid'] != $mybb->user['uid'] && $mybb->usergroup['cansendemail'] == 1)

		{
eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";");
}

		{
eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";");
}

Zeile 598Zeile 608
					$display = "none";
}
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");

					$display = "none";
}
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");

			}

			}


// Restore Post
if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)


// Restore Post
if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)

Zeile 607Zeile 617
				if($post['visible'] == -1)
{
$display = '';

				if($post['visible'] == -1)
{
$display = '';

				}

				}

				$postbit_qrestore = $lang->postbit_qrestore_post;
eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
}

				$postbit_qrestore = $lang->postbit_qrestore_post;
eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
}

Zeile 622Zeile 632
				}
$postbit_qrestore = $lang->postbit_qrestore_thread;
eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");

				}
$postbit_qrestore = $lang->postbit_qrestore_thread;
eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");

			}
}


			}
}


		if(!isset($ismod))
{
$ismod = is_moderator($fid);

		if(!isset($ismod))
{
$ismod = is_moderator($fid);

Zeile 632Zeile 642

// Inline moderation stuff
if($ismod)


// Inline moderation stuff
if($ismod)

		{

		{

			if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|".$post['pid']."|") !== false)

			if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|".$post['pid']."|") !== false)

			{

			{

				$inlinecheck = "checked=\"checked\"";
$inlinecount++;
}
else
{
$inlinecheck = "";

				$inlinecheck = "checked=\"checked\"";
$inlinecount++;
}
else
{
$inlinecheck = "";

			}


			}


			eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");

if($post['visible'] == 0)
{
$invisiblepost = 1;
}

			eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");

if($post['visible'] == 0)
{
$invisiblepost = 1;
}

		}

		}

		else
{
$post['inlinecheck'] = "";

		else
{
$post['inlinecheck'] = "";

Zeile 658Zeile 668
		$post_number = my_number_format($postcounter);
eval("\$post['posturl'] = \"".$templates->get("postbit_posturl")."\";");
global $forum, $thread;

		$post_number = my_number_format($postcounter);
eval("\$post['posturl'] = \"".$templates->get("postbit_posturl")."\";");
global $forum, $thread;





		if($forum['open'] != 0 && ($thread['closed'] != 1 || is_moderator($forum['fid'], "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1))

		if($forum['open'] != 0 && ($thread['closed'] != 1 || is_moderator($forum['fid'], "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1))

		{

		{

			eval("\$post['button_quote'] = \"".$templates->get("postbit_quote")."\";");

			eval("\$post['button_quote'] = \"".$templates->get("postbit_quote")."\";");

		}


		}


		if($forumpermissions['canpostreplys'] != 0 && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1) && ($thread['closed'] != 1 || is_moderator($fid, "canpostclosedthreads")) && $mybb->settings['multiquote'] != 0 && $forum['open'] != 0 && !$post_type)

		if($forumpermissions['canpostreplys'] != 0 && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1) && ($thread['closed'] != 1 || is_moderator($fid, "canpostclosedthreads")) && $mybb->settings['multiquote'] != 0 && $forum['open'] != 0 && !$post_type)

		{

		{

			eval("\$post['button_multiquote'] = \"".$templates->get("postbit_multiquote")."\";");
}


			eval("\$post['button_multiquote'] = \"".$templates->get("postbit_multiquote")."\";");
}


		if($mybb->user['uid'] != "0")












		$skip_report = my_unserialize($post['reporters']);
if(is_array($skip_report))
{
$skip_report[] = 0;
}
else
{
$skip_report = array(0);
}

$reportable = user_permissions($post['uid']);
if(!in_array($mybb->user['uid'], $skip_report) && !empty($reportable['canbereported']))

		{
eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";");
}

		{
eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";");
}

Zeile 849Zeile 870
			{
$deleted_message = $lang->sprintf($lang->postbit_deleted_post_user, $post['username']);
eval("\$deleted_bit = \"".$templates->get("postbit_deleted")."\";");

			{
$deleted_message = $lang->sprintf($lang->postbit_deleted_post_user, $post['username']);
eval("\$deleted_bit = \"".$templates->get("postbit_deleted")."\";");

 
				$post_visibility = "display: none;";
}

// Is the user (not moderator) logged in and have unapproved posts?
if($mybb->user['uid'] && $post['visible'] == 0 && $post['uid'] == $mybb->user['uid'] && !is_moderator($fid, "canviewunapprove"))
{
$ignored_message = $lang->sprintf($lang->postbit_post_under_moderation, $post['username']);
eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");

				$post_visibility = "display: none;";
}


				$post_visibility = "display: none;";
}


Zeile 1010Zeile 1039
			eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");
}
}

			eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");
}
}

 
}

/**
* Returns bytes count from human readable string
* Used to parse ini_get human-readable values to int
*
* @param string $val Human-readable value
*/
function return_bytes($val) {
$val = trim($val);
if ($val == "")
{
return 0;
}

$last = strtolower($val[strlen($val)-1]);
switch($last)
{
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}

return intval($val);

}

}