Vergleich editpost.php - 1.4.1 - 1.4.2

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

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 145Zeile 145

if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment'])))
{


if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment'])))
{

 
	if($mybb->input['posthash'])
{
$posthash_query = "posthash='".$db->escape_string($mybb->input['posthash'])."' OR ";
}
else
{
$posthash_query = "";
}
$query = $db->simple_select("attachments", "COUNT(aid) as numattachs", "{$posthash_query}pid='{$pid}'");
$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']))

	{
$attachedfile = upload_attachment($_FILES['attachment']);
}

	{
$attachedfile = upload_attachment($_FILES['attachment']);
}