Vergleich newthread.php - 1.4.7 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: newthread.php 4352 2009-04-18 22:25:55Z Tikitiki $

 * $Id: newthread.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 127Zeile 127
// Handle attachments if we've got any.
if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_newthread" && $mybb->input['submit'] && $_FILES['attachment'])))
{

// Handle attachments if we've got any.
if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_newthread" && $mybb->input['submit'] && $_FILES['attachment'])))
{

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


	if($mybb->input['action'] == "editdraft" || ($mybb->input['tid'] && $mybb->input['pid']))
{
$attachwhere = "pid='{$pid}'";

	if($mybb->input['action'] == "editdraft" || ($mybb->input['tid'] && $mybb->input['pid']))
{
$attachwhere = "pid='{$pid}'";

Zeile 143Zeile 146
	{
require_once MYBB_ROOT."inc/functions_upload.php";
$attachedfile = upload_attachment($_FILES['attachment']);

	{
require_once MYBB_ROOT."inc/functions_upload.php";
$attachedfile = upload_attachment($_FILES['attachment']);

	}

	}

	
// Error with attachments - should use new inline errors?
if($attachedfile['error'])

	
// Error with attachments - should use new inline errors?
if($attachedfile['error'])

Zeile 160Zeile 163
}

// Are we removing an attachment from the thread?

}

// Are we removing an attachment from the thread?

if($mybb->input['attachmentaid'] && $mybb->input['posthash'])

if($mybb->input['attachmentaid'] && $mybb->input['attachmentact'] == "remove" && $mybb->input['posthash'])

{

{

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


	require_once MYBB_ROOT."inc/functions_upload.php";
remove_attachment(0, $mybb->input['posthash'], $mybb->input['attachmentaid']);
if(!$mybb->input['submit'])

	require_once MYBB_ROOT."inc/functions_upload.php";
remove_attachment(0, $mybb->input['posthash'], $mybb->input['attachmentaid']);
if(!$mybb->input['submit'])

Zeile 277Zeile 283
	if($uid > 0)
{
$user_check = "p.uid='{$uid}'";

	if($uid > 0)
{
$user_check = "p.uid='{$uid}'";

	}

	}

	else
{
$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";

	else
{
$user_check = "p.ipaddress='".$db->escape_string($session->ipaddress)."'";

Zeile 425Zeile 431
			if($mybb->input['quoted_ids'] == "all")
{
my_unsetcookie("multiquote");

			if($mybb->input['quoted_ids'] == "all")
{
my_unsetcookie("multiquote");

			}
}


			}
}


		$plugins->run_hooks("newthread_do_newthread_end");

// Hop to it! Send them to the next page.

		$plugins->run_hooks("newthread_do_newthread_end");

// Hop to it! Send them to the next page.

Zeile 474Zeile 480
			if(is_moderator($fid))
{
$visible_where = "AND p.visible != 2";

			if(is_moderator($fid))
{
$visible_where = "AND p.visible != 2";

			}

			}

			else
{
$visible_where = "AND p.visible > 0";

			else
{
$visible_where = "AND p.visible > 0";

Zeile 502Zeile 508
				}

$quoted_ids = "all";

				}

$quoted_ids = "all";

			}

			}

			else
{
$query = $db->query("

			else
{
$query = $db->query("

Zeile 588Zeile 594
			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
$icon = $post['icon'];

			$postoptionschecked['disablesmilies'] = " checked=\"checked\"";
}
$icon = $post['icon'];

		$posticons = get_post_icons();




		if($forum['allowpicons'] != 0)
{
$posticons = get_post_icons();
}

	}

// Otherwise, this is our initial visit to this page.

	}

// Otherwise, this is our initial visit to this page.

Zeile 729Zeile 738
	// Setup a unique posthash for attachment management
if(!$mybb->input['posthash'] && $mybb->input['action'] != "editdraft")
{

	// Setup a unique posthash for attachment management
if(!$mybb->input['posthash'] && $mybb->input['action'] != "editdraft")
{

	    mt_srand((double) microtime() * 1000000);
$posthash = md5($mybb->user['uid'].mt_rand());





	    $posthash = md5($mybb->user['uid'].random_str());
}
elseif($mybb->input['action'] == "editdraft")
{
// Drafts have posthashes, too...
$posthash = $post['posthash'];

	}
else
{

	}
else
{