Vergleich newthread.php - 1.4.1 - 1.4.3

  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 4081 2008-08-08 01:47:02Z Tikitiki $

 * $Id: newthread.php 4143 2008-08-22 02:47:25Z Tikitiki $

 */

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'])))
{

 
	if($mybb->input['action'] == "editdraft" || ($mybb->input['tid'] && $mybb->input['pid']))
{
$attachwhere = "pid='{$pid}'";
}
else
{
$attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";
}
$query = $db->simple_select("attachments", "COUNT(aid) as numattachs", $attachwhere);
$attachcount = $db->fetch_field($query, "numattachs");


	// If there's an attachment, check it and upload it

	// If there's an attachment, check it and upload it

	if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0)

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

	{
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']);