Vergleich newthread.php - 1.2.4 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: newthread.php 2598 2007-01-02 17:17:32Z CraKteR $

 * $Id: newthread.php 3596 2008-01-20 08:27:39Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 66Zeile 66
{
error_no_permission();
}

{
error_no_permission();
}

// Check if this forum is password protected and if we've got the right password to access it.
check_forum_password($fid, $forum['password']);



// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);


// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.
if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))


// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.
if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))

Zeile 171Zeile 172
// Performing the posting of a new thread.
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")
{

// Performing the posting of a new thread.
if($mybb->input['action'] == "do_newthread" && $mybb->request_method == "post")
{

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


	$plugins->run_hooks("newthread_do_newthread_start");

// If this isn't a logged in user, then we need to do some special validation.

	$plugins->run_hooks("newthread_do_newthread_start");

// If this isn't a logged in user, then we need to do some special validation.

Zeile 439Zeile 443
			$postoptionschecked['signature'] = "checked=\"checked\"";
}
if($post['smilieoff'] == "yes")

			$postoptionschecked['signature'] = "checked=\"checked\"";
}
if($post['smilieoff'] == "yes")

		{

		{

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

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

Zeile 447Zeile 451
	
// Otherwise, this is our initial visit to this page.
else

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

	{

	{

		if($mybb->user['signature'] != '')

		if($mybb->user['signature'] != '')

		{

		{

			$postoptionschecked['signature'] = "checked=\"checked\"";
}
if($mybb->user['emailnotify'] == "yes")
{
$postoptionschecked['emailnotify'] = "checked=\"checked\"";

			$postoptionschecked['signature'] = "checked=\"checked\"";
}
if($mybb->user['emailnotify'] == "yes")
{
$postoptionschecked['emailnotify'] = "checked=\"checked\"";

		}

		}

		$numpolloptions = "2";
}


		$numpolloptions = "2";
}


Zeile 478Zeile 482
			"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']
);

			"ipaddress" => get_ip(),
"posthash" => $mybb->input['posthash']
);

		

		

		if($pid != '')
{
$new_thread['pid'] = $pid;

		if($pid != '')
{
$new_thread['pid'] = $pid;

Zeile 501Zeile 505
		if(count($post_errors) > 0)
{
$thread_errors = inline_error($post_errors);

		if(count($post_errors) > 0)
{
$thread_errors = inline_error($post_errors);

		}

		}

		else
{
if(!$mybb->input['username'])

		else
{
if(!$mybb->input['username'])

Zeile 509Zeile 513
				$mybb->input['username'] = $lang->guest;
}
if($mybb->input['username'] && !$mybb->user['uid'])

				$mybb->input['username'] = $lang->guest;
}
if($mybb->input['username'] && !$mybb->user['uid'])

			{

			{

				$mybb->user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
}
$query = $db->query("

				$mybb->user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
}
$query = $db->query("

Zeile 522Zeile 526
			if(!$mybb->user['uid'] || !$post['username'])
{
$post['username'] = htmlspecialchars_uni($mybb->input['username']);

			if(!$mybb->user['uid'] || !$post['username'])
{
$post['username'] = htmlspecialchars_uni($mybb->input['username']);

			}
else
{

			}
else
{

				$post['userusername'] = $mybb->user['username'];
$post['username'] = $mybb->user['username'];
}

				$post['userusername'] = $mybb->user['username'];
$post['username'] = $mybb->user['username'];
}

Zeile 538Zeile 542
			if($post['includesig'] != "yes")
{
$post['includesig'] = "no";

			if($post['includesig'] != "yes")
{
$post['includesig'] = "no";

			}



			}



			// Fetch attachments assigned to this post
if($mybb->input['pid'])
{

			// Fetch attachments assigned to this post
if($mybb->input['pid'])
{

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

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

			}
else
{

			}
else
{

Zeile 563Zeile 566
		$message = htmlspecialchars_uni($mybb->input['message']);
$subject = htmlspecialchars_uni($mybb->input['subject']);
}

		$message = htmlspecialchars_uni($mybb->input['message']);
$subject = htmlspecialchars_uni($mybb->input['subject']);
}

	



	// Removing an attachment or adding a new one, or showting thread errors.
else if($mybb->input['attachmentaid'] || $mybb->input['newattachment'] || $thread_errors)
{

	// Removing an attachment or adding a new one, or showting thread errors.
else if($mybb->input['attachmentaid'] || $mybb->input['newattachment'] || $thread_errors)
{

Zeile 625Zeile 628
	if($forumpermissions['canpostattachments'] != "no")
{ // Get a listing of the current attachments, if there are any
$attachcount = 0;

	if($forumpermissions['canpostattachments'] != "no")
{ // Get a listing of the current attachments, if there are any
$attachcount = 0;

		if($mybb->input['action'] == "editdraft")

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

		{
$attachwhere = "pid='$pid'";
}

		{
$attachwhere = "pid='$pid'";
}

Zeile 656Zeile 659
		}
$query = $db->simple_select(TABLE_PREFIX."attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);

		}
$query = $db->simple_select(TABLE_PREFIX."attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);

		if($usage['ausage'] > ($mybb->usergroup['attachquota']*1000) && $mybb->usergroup['attachquota'] != 0)

		if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)

		{
$noshowattach = 1;
}

		{
$noshowattach = 1;
}

Zeile 666Zeile 669
		}
else
{

		}
else
{

			$friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1000);

			$friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);

		}
$friendlyusage = get_friendly_size($usage['ausage']);
$lang->attach_quota = sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);

		}
$friendlyusage = get_friendly_size($usage['ausage']);
$lang->attach_quota = sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);