Vergleich inc/functions_post.php - 1.8.15 - 1.8.18

  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 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 609Zeile 619
					$display = '';
}
$postbit_qrestore = $lang->postbit_qrestore_post;

					$display = '';
}
$postbit_qrestore = $lang->postbit_qrestore_post;

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


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


			// Restore Thread
else if(is_moderator($fid, "canrestorethreads") && $postcounter == 1)
{

			// Restore Thread
else if(is_moderator($fid, "canrestorethreads") && $postcounter == 1)
{

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))

		if(!isset($ismod))

		{

		{

			$ismod = is_moderator($fid);
}


			$ismod = is_moderator($fid);
}


Zeile 637Zeile 647
			{
$inlinecheck = "checked=\"checked\"";
$inlinecount++;

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

			}

			}

			else
{
$inlinecheck = "";

			else
{
$inlinecheck = "";

Zeile 662Zeile 672
		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")."\";");

		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")."\";");

		}


		}


		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")."\";");

		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")."\";");

Zeile 689Zeile 699

// Show post IP addresses... PMs now can have IP addresses too as of 1.8!
if($post_type == 2)


// Show post IP addresses... PMs now can have IP addresses too as of 1.8!
if($post_type == 2)

	{

	{

		$show_ips = $mybb->settings['showpmip'];
}
if(!$post_type || $post_type == 2)

		$show_ips = $mybb->settings['showpmip'];
}
if(!$post_type || $post_type == 2)

Zeile 701Zeile 711
				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
}
else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod']))

				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
}
else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod']))

			{

			{

				$action = 'getip';
$javascript = 'getIP';


				$action = 'getip';
$javascript = 'getIP';


Zeile 1010Zeile 1020
			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);

}

}