Vergleich editpost.php - 1.6.0 - 1.6.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: editpost.php 5087 2010-07-11 11:46:40Z Huji $

 * $Id: editpost.php 5487 2011-07-12 13:16:58Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 33Zeile 33
$pid = intval($mybb->input['pid']);

// if we already have the post information...

$pid = intval($mybb->input['pid']);

// if we already have the post information...

if(isset($style) && $style['pid'] == $pid)

if(isset($style) && $style['pid'] == $pid && $style['type'] != 'f')

{
$post = &$style;
}

{
$post = &$style;
}

Zeile 73Zeile 73

// Add prefix to breadcrumb
$query = $db->simple_select('threadprefixes', 'displaystyle', "pid='{$thread['prefix']}'");


// Add prefix to breadcrumb
$query = $db->simple_select('threadprefixes', 'displaystyle', "pid='{$thread['prefix']}'");

$breadcrumbprefix = $db->fetch_field($query, 'displaystyle').' ';






$breadcrumbprefix = $db->fetch_field($query, 'displaystyle');

if($breadcrumbprefix)
{
$breadcrumbprefix .= ' ';
}


// Make navigation
build_forum_breadcrumb($fid);


// Make navigation
build_forum_breadcrumb($fid);

Zeile 92Zeile 97
}

if(!$mybb->input['action'] || $mybb->input['previewpost'])

}

if(!$mybb->input['action'] || $mybb->input['previewpost'])

{

{

	$mybb->input['action'] = "editpost";
}

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")
{
if(!is_moderator($fid, "candeleteposts"))

	$mybb->input['action'] = "editpost";
}

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")
{
if(!is_moderator($fid, "candeleteposts"))

	{
if($thread['closed'] == 1)
{
error($lang->redirect_threadclosed);
}
if($forumpermissions['candeleteposts'] == 0)
{
error_no_permission();
}

	{
if($thread['closed'] == 1)
{
error($lang->redirect_threadclosed);
}
if($forumpermissions['candeleteposts'] == 0)
{
error_no_permission();
}

		if($mybb->user['uid'] != $post['uid'])
{
error_no_permission();

		if($mybb->user['uid'] != $post['uid'])
{
error_no_permission();

		}

		}

	}
}
else

	}
}
else

Zeile 121Zeile 126
		if($thread['closed'] == 1)
{
error($lang->redirect_threadclosed);

		if($thread['closed'] == 1)
{
error($lang->redirect_threadclosed);

		}

		}

		if($forumpermissions['caneditposts'] == 0)
{
error_no_permission();

		if($forumpermissions['caneditposts'] == 0)
{
error_no_permission();

Zeile 168Zeile 173
	if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0 && ($mybb->settings['maxattachments'] == 0 || $attachcount < $mybb->settings['maxattachments']))
{
$update_attachment = false;

	if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0 && ($mybb->settings['maxattachments'] == 0 || $attachcount < $mybb->settings['maxattachments']))
{
$update_attachment = false;

		if($mybb->input['updateattachment'])

		if($mybb->input['updateattachment'] && ($mybb->usergroup['caneditattachments'] || $forumpermissions['caneditattachments']))

		{
$update_attachment = true;
}

		{
$update_attachment = true;
}

Zeile 212Zeile 217
}

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")

}

if($mybb->input['action'] == "deletepost" && $mybb->request_method == "post")

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


$plugins->run_hooks("editpost_deletepost");



$plugins->run_hooks("editpost_deletepost");


Zeile 225Zeile 230
		if($firstcheck['pid'] == $pid)
{
$firstpost = 1;

		if($firstcheck['pid'] == $pid)
{
$firstpost = 1;

		}
else

		}
else

		{
$firstpost = 0;
}

		{
$firstpost = 0;
}

Zeile 243Zeile 248
				redirect(get_forum_link($fid), $lang->redirect_threaddeleted);
}
else

				redirect(get_forum_link($fid), $lang->redirect_threaddeleted);
}
else

			{

			{

				error_no_permission();
}
}

				error_no_permission();
}
}

Zeile 260Zeile 265
				if($next_post['pid'])
{
$redirect = get_post_link($next_post['pid'], $tid)."#pid{$next_post['pid']}";

				if($next_post['pid'])
{
$redirect = get_post_link($next_post['pid'], $tid)."#pid{$next_post['pid']}";

				}

				}

				else
{
$redirect = get_thread_link($tid);

				else
{
$redirect = get_thread_link($tid);

Zeile 353Zeile 358
			$url = get_post_link($pid, $tid)."#pid{$pid}";
}
$plugins->run_hooks("editpost_do_editpost_end");

			$url = get_post_link($pid, $tid)."#pid{$pid}";
}
$plugins->run_hooks("editpost_do_editpost_end");





		redirect($url, $lang->redirect_postedited);
}
}

		redirect($url, $lang->redirect_postedited);
}
}

Zeile 382Zeile 387
	}

// Setup a unique posthash for attachment management

	}

// Setup a unique posthash for attachment management

	$posthash = $post['posthash'];

	$posthash = htmlspecialchars_uni($post['posthash']);


$bgcolor = "trow1";
if($forumpermissions['canpostattachments'] != 0)


$bgcolor = "trow1";
if($forumpermissions['canpostattachments'] != 0)

Zeile 419Zeile 424
					eval("\$attach_mod_options = \"".$templates->get("post_attachments_attachment_mod_approve")."\";");
}
}

					eval("\$attach_mod_options = \"".$templates->get("post_attachments_attachment_mod_approve")."\";");
}
}

 

// Remove Attachment
eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");


			if($attachment['visible'] != 1)
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");

			if($attachment['visible'] != 1)
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");

			}

			}

			else
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");

			else
{
eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");

Zeile 432Zeile 441
		$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);
if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)

		$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);
if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)

		{

		{

			$noshowattach = 1;
}
if($mybb->usergroup['attachquota'] == 0)

			$noshowattach = 1;
}
if($mybb->usergroup['attachquota'] == 0)

		{

		{

			$friendlyquota = $lang->unlimited;
}
else

			$friendlyquota = $lang->unlimited;
}
else

Zeile 447Zeile 456
		$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
{

		$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
{

 
			if($mybb->usergroup['caneditattachments'] || $forumpermissions['caneditattachments'])
{
eval("\$attach_update_options = \"".$templates->get("post_attachments_update")."\";");
}


			eval("\$newattach = \"".$templates->get("post_attachments_new")."\";");
}
eval("\$attachbox = \"".$templates->get("post_attachments")."\";");

			eval("\$newattach = \"".$templates->get("post_attachments_new")."\";");
}
eval("\$attachbox = \"".$templates->get("post_attachments")."\";");