Vergleich inc/functions_post.php - 1.8.16 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 194Zeile 194

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


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

 

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


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

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

Zeile 206Zeile 212
		if(!empty($cached_titles))
{
foreach($cached_titles as $usertitle)

		if(!empty($cached_titles))
{
foreach($cached_titles as $usertitle)

			{

			{

				$titlescache[$usertitle['posts']] = $usertitle;
}
}

				$titlescache[$usertitle['posts']] = $usertitle;
}
}

Zeile 294Zeile 300
			for($i = 0; $i < $post['stars']; ++$i)
{
eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";");

			for($i = 0; $i < $post['stars']; ++$i)
{
eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";");

			}


			}


			$post['userstars'] .= "<br />";
}


			$post['userstars'] .= "<br />";
}


Zeile 308Zeile 314
		if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive'])
{
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_online")."\";");

		if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive'])
{
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_online")."\";");

		}

		}

		else
{
if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)

		else
{
if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)

Zeile 332Zeile 338
		if($mybb->usergroup['cansearch'] == 1)
{
eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");

		if($mybb->usergroup['cansearch'] == 1)
{
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 358Zeile 364
		else
{
$post['button_www'] = "";

		else
{
$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")."\";");
}
else

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

Zeile 398Zeile 404
			{
eval("\$post['button_warn'] = \"".$templates->get("postbit_warn")."\";");
$warning_link = "warnings.php?uid={$post['uid']}";

			{
eval("\$post['button_warn'] = \"".$templates->get("postbit_warn")."\";");
$warning_link = "warnings.php?uid={$post['uid']}";

			}
else

			}
else

			{
$post['button_warn'] = '';
$warning_link = "usercp.php";

			{
$post['button_warn'] = '';
$warning_link = "usercp.php";

Zeile 602Zeile 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 645Zeile 651
			else
{
$inlinecheck = "";

			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

		}
else

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

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

Zeile 662Zeile 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 853Zeile 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 1012Zeile 1037
		if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist'])
{
eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");

		if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist'])
{
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);
}

/**
* Detects whether an attachment removal/approval/unapproval
* submit button was pressed (without triggering an AJAX request)
* and sets inputs accordingly (as for an AJAX request).
*/
function detect_attachmentact()
{
global $mybb;

foreach($mybb->input as $key => $val)
{
if(strpos($key, 'rem_') === 0)
{
$mybb->input['attachmentaid'] = (int)substr($key, 4);
$mybb->input['attachmentact'] = 'remove';
break;
}
elseif(strpos($key, 'approveattach_') === 0)
{
$mybb->input['attachmentaid'] = (int)substr($key, 14);
$mybb->input['attachmentact'] = 'approve';
break;
}
elseif(strpos($key, 'unapproveattach_') === 0)
{
$mybb->input['attachmentaid'] = (int)substr($key, 16);
$mybb->input['attachmentact'] = 'unapprove';
break;

		}
}
}

		}
}
}