Vergleich editpost.php - 1.00 - 1.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

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

 * $Id$

 * $Id: editpost.php 919 2005-12-04 19:19:17Z Kilroy $

 */

define("KILL_GLOBALS", 1);

 */

define("KILL_GLOBALS", 1);

Zeile 152Zeile 152
//	die($removeattachment);
}


//	die($removeattachment);
}


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

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

{

$plugins->run_hooks("editpost_deletepost");

{

$plugins->run_hooks("editpost_deletepost");

Zeile 162Zeile 162
		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."posts WHERE tid='$tid' ORDER BY dateline ASC LIMIT 0,1");
$firstcheck = $db->fetch_array($query);
if($firstcheck['pid'] == $pid)

		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."posts WHERE tid='$tid' ORDER BY dateline ASC LIMIT 0,1");
$firstcheck = $db->fetch_array($query);
if($firstcheck['pid'] == $pid)

		{

		{

			$firstpost = 1;

			$firstpost = 1;

		}
else
{

		}
else
{

			$firstpost = 0;
}
$modlogdata['fid'] = $fid;

			$firstpost = 0;
}
$modlogdata['fid'] = $fid;

Zeile 236Zeile 236
	else
{
$firstpost = 0;

	else
{
$firstpost = 0;

	}

	}


if(strlen(trim($mybb->input['subject'])) == 0 && $firstpost)
{
error($lang->error_nosubject);
}
elseif(strlen(trim($mybb->input['subject'])) == 0)


if(strlen(trim($mybb->input['subject'])) == 0 && $firstpost)
{
error($lang->error_nosubject);
}
elseif(strlen(trim($mybb->input['subject'])) == 0)

	{

	{

		$mybb->input['subject'] = "RE: " . $thread['subject'];
}

if (strlen(trim($mybb->input['message'])) == 0)
{
error($lang->error_nomessage);

		$mybb->input['subject'] = "RE: " . $thread['subject'];
}

if (strlen(trim($mybb->input['message'])) == 0)
{
error($lang->error_nomessage);

	}

	}


if(strlen(trim($mybb->input['message'])) > $mybb->settings['messagelength'] && $mybb->settings['messagelength'] != 0)
{
error($lang->error_messagelength);


if(strlen(trim($mybb->input['message'])) > $mybb->settings['messagelength'] && $mybb->settings['messagelength'] != 0)
{
error($lang->error_messagelength);

	}

$db->query("DELETE FROM ".TABLE_PREFIX."attachments WHERE filename='' AND filesize < 1");

	}

$db->query("DELETE FROM ".TABLE_PREFIX."attachments WHERE filename='' AND filesize < 1");


if(!$mybb->input['icon'] || $mybb->input['icon'] == -1)
{
$mybb->input['icon'] = "0";
}



if(!$mybb->input['icon'] || $mybb->input['icon'] == -1)
{
$mybb->input['icon'] = "0";
}


 
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."posts WHERE tid='$tid' ORDER BY dateline ASC LIMIT 0,1");
$firstcheck = $db->fetch_array($query);

	if($firstpost)
{
$newpost = array(
"subject" => addslashes($mybb->input['subject']),

	if($firstpost)
{
$newpost = array(
"subject" => addslashes($mybb->input['subject']),

			"icon" => $mybb->input['icon'],

			"icon" => intval($mybb->input['icon']),

			);
$db->update_query(TABLE_PREFIX."threads", $newpost, "tid='$tid'");
}

			);
$db->update_query(TABLE_PREFIX."threads", $newpost, "tid='$tid'");
}