Vergleich newreply.php - 1.2.5 - 1.2.12

  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: newreply.php 2598 2007-01-02 17:17:32Z CraKteR $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 22Zeile 22
// Load global language phrases
$lang->load("newreply");


// Load global language phrases
$lang->load("newreply");


// Get the pid and tid from the input.
$pid = $mybb->input['pid'];

// Get the pid and tid and replyto from the input.
$pid = $replyto = $mybb->input['pid'];

$tid = $mybb->input['tid'];

$tid = $mybb->input['tid'];

 
if(isset($mybb->input['replyto']))
{
$replyto = intval($mybb->input['replyto']);
}


// Edit a draft post.
$draft_pid = 0;


// Edit a draft post.
$draft_pid = 0;

Zeile 84Zeile 88
if($forumpermissions['canview'] == "no" || $forumpermissions['canpostreplys'] == "no")
{
error_no_permission();

if($forumpermissions['canview'] == "no" || $forumpermissions['canpostreplys'] == "no")
{
error_no_permission();

}

// Password protected forums ......... yhummmmy!
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($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
$codebuttons = build_mycode_inserter();

if($mybb->settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
$codebuttons = build_mycode_inserter();

Zeile 127Zeile 131

// No weird actions allowed, show new reply form if no regular action.
if($mybb->input['action'] != "do_newreply" && $mybb->input['action'] != "editdraft")


// No weird actions allowed, show new reply form if no regular action.
if($mybb->input['action'] != "do_newreply" && $mybb->input['action'] != "editdraft")

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


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


// Even if we are previewing, still show the new reply form.
if($mybb->input['previewpost'])

// Even if we are previewing, still show the new reply form.
if($mybb->input['previewpost'])

{

{

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


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


Zeile 148Zeile 152
	if($attachedfile['error'])
{
eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");

	if($attachedfile['error'])
{
eval("\$attacherror = \"".$templates->get("error_attacherror")."\";");

		$mybb->input['action'] = "newreply";
}
if(!$mybb->input['submit'])

		$mybb->input['action'] = "newreply";
}
if(!$mybb->input['submit'])

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

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

Zeile 192Zeile 196

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


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

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


	$plugins->run_hooks("newreply_do_newreply_start");

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

	$plugins->run_hooks("newreply_do_newreply_start");

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

Zeile 502Zeile 509
					$quoted_post['message'] = preg_replace('#(^|\r|\n)/me ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} \\2", $quoted_post['message']);
$quoted_post['message'] = preg_replace('#(^|\r|\n)/slap ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} {$lang->slaps} \\2 {$lang->with_trout}", $quoted_post['message']);
$quoted_post['message'] = preg_replace("#\[attachment=([0-9]+?)\]#i", '', $quoted_post['message']);

					$quoted_post['message'] = preg_replace('#(^|\r|\n)/me ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} \\2", $quoted_post['message']);
$quoted_post['message'] = preg_replace('#(^|\r|\n)/slap ([^\r\n<]*)#i', "\\1* {$quoted_post['username']} {$lang->slaps} \\2 {$lang->with_trout}", $quoted_post['message']);
$quoted_post['message'] = preg_replace("#\[attachment=([0-9]+?)\]#i", '', $quoted_post['message']);

 
					$quoted_post['message'] = $parser->parse_badwords($quoted_post['message']);

					$message .= "[quote={$quoted_post['username']}]\n{$quoted_post['message']}\n[/quote]\n\n";
$quoted_ids[] = $quoted_post['pid'];
}

					$message .= "[quote={$quoted_post['username']}]\n{$quoted_post['message']}\n[/quote]\n\n";
$quoted_ids[] = $quoted_post['pid'];
}

Zeile 723Zeile 731
	if($forumpermissions['canpostattachments'] != "no")
{
$attachcount = 0;

	if($forumpermissions['canpostattachments'] != "no")
{
$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 754Zeile 762
		}
$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 764Zeile 772
		}
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);