Vergleich editpost.php - 1.6.3 - 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 5380 2011-02-21 12:04:43Z Tomm $

 * $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");

if($mybb->input['delete'] == 1)

	$plugins->run_hooks("editpost_deletepost");

if($mybb->input['delete'] == 1)

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

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

		}
else
{

		}
else
{

			$firstpost = 0;
}


			$firstpost = 0;
}


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

				}
else

				{
$redirect = get_thread_link($tid);
}

				{
$redirect = get_thread_link($tid);
}

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