Vergleich private.php - 1.6.3 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: private.php 5380 2011-02-21 12:04:43Z Tomm $

 * $Id: private.php 5780 2012-04-19 11:46:06Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 15Zeile 15

$templatelist = "private_send,private_send_buddyselect,private_read,private_tracking,private_tracking_readmessage,private_tracking_unreadmessage";
$templatelist .= ",private_folders,private_folders_folder,private_folders_folder_unremovable,private,usercp_nav_changename,usercp_nav,private_empty_folder,private_empty,posticons";


$templatelist = "private_send,private_send_buddyselect,private_read,private_tracking,private_tracking_readmessage,private_tracking_unreadmessage";
$templatelist .= ",private_folders,private_folders_folder,private_folders_folder_unremovable,private,usercp_nav_changename,usercp_nav,private_empty_folder,private_empty,posticons";

$templatelist .= "usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,usercp_nav_messenger,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage";

$templatelist .= "usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,usercp_nav_messenger,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,usercp_nav_editsignature,private_read_action,postbit_away,postbit_avatar,postbit_warn,postbit_rep_button";

$templatelist .= ",private_messagebit,codebuttons,smilieinsert,posticons,private_send_autocomplete,private_messagebit_denyreceipt,private_read_to, postbit_online,postbit_find,postbit_pm, postbit_email,postbit_reputation,postbit_warninglevel,postbit_author_user,postbit_reply_pm,postbit_forward_pm,postbit_delete_pm,postbit,private_tracking_nomessage,private_nomessages";

require_once "./global.php";

$templatelist .= ",private_messagebit,codebuttons,smilieinsert,posticons,private_send_autocomplete,private_messagebit_denyreceipt,private_read_to, postbit_online,postbit_find,postbit_pm, postbit_email,postbit_reputation,postbit_warninglevel,postbit_author_user,postbit_reply_pm,postbit_forward_pm,postbit_delete_pm,postbit,private_tracking_nomessage,private_nomessages";

require_once "./global.php";

Zeile 122Zeile 122
	$mybb->input['action'] = "send";
}


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


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

if(($mybb->input['action'] == "do_search" || $mybb->input['action'] == "do_stuff" && ($mybb->input['quick_search'] || !$mybb->input['hop'] && !$mybb->input['moveto'] && !$mybb->input['delete'])) && $mybb->request_method == "post")

{
$plugins->run_hooks("private_do_search_start");


{
$plugins->run_hooks("private_do_search_start");


Zeile 484Zeile 484
		{
$message['message'] = my_substr($message['message'], 0, 200)."...";
}

		{
$message['message'] = my_substr($message['message'], 0, 200)."...";
}

		
// For my sanity...
$message['message'] = htmlspecialchars_uni($message['message']);

 
		
eval("\$messagelist .= \"".$templates->get("private_search_messagebit")."\";");
}

		
eval("\$messagelist .= \"".$templates->get("private_search_messagebit")."\";");
}

Zeile 505Zeile 502
if($mybb->input['action'] == "advanced_search")
{
$plugins->run_hooks("private_advanced_search");

if($mybb->input['action'] == "advanced_search")
{
$plugins->run_hooks("private_advanced_search");

	

	

	eval("\$advanced_search = \"".$templates->get("private_advanced_search")."\";");

output_page($advanced_search);

	eval("\$advanced_search = \"".$templates->get("private_advanced_search")."\";");

output_page($advanced_search);

Zeile 515Zeile 512
if($mybb->input['action'] == "dismiss_notice")
{
if($mybb->user['pmnotice'] != 2)

if($mybb->input['action'] == "dismiss_notice")
{
if($mybb->user['pmnotice'] != 2)

	{
exit;
}

	{
exit;
}


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


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

Zeile 535Zeile 532
	else
{
header("Location: index.php");

	else
{
header("Location: index.php");

		exit;
}
}

$send_errors = '';

		exit;
}
}

$send_errors = '';


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


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

Zeile 643Zeile 640
			$smilieinserter = build_clickable_smilies();
}
}

			$smilieinserter = build_clickable_smilies();
}
}

 

$lang->post_icon = $lang->message_icon;


$posticons = get_post_icons();
$previewmessage = $mybb->input['message'];


$posticons = get_post_icons();
$previewmessage = $mybb->input['message'];

Zeile 677Zeile 676
	{
$options = $mybb->input['options'];
$query = $db->query("

	{
$options = $mybb->input['options'];
$query = $db->query("

			SELECT u.username AS userusername, u.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.namestyle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.usereputationsystem

			SELECT u.username AS userusername, u.*, f.*

			FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)

			FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)

			LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup)

 
			WHERE u.uid='".$mybb->user['uid']."'
");

			WHERE u.uid='".$mybb->user['uid']."'
");

 


		$post = $db->fetch_array($query);

		$post = $db->fetch_array($query);

 


		$post['userusername'] = $mybb->user['username'];
$post['postusername'] = $mybb->user['username'];
$post['message'] = $previewmessage;

		$post['userusername'] = $mybb->user['username'];
$post['postusername'] = $mybb->user['username'];
$post['message'] = $previewmessage;

Zeile 691Zeile 691
		$post['icon'] = $mybb->input['icon'];
$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = TIME_NOW;

		$post['icon'] = $mybb->input['icon'];
$post['smilieoff'] = $options['disablesmilies'];
$post['dateline'] = TIME_NOW;

 


		if(!$options['signature'])

		if(!$options['signature'])

		{

		{

			$post['includesig'] = 0;
}
else
{
$post['includesig'] = 1;

			$post['includesig'] = 0;
}
else
{
$post['includesig'] = 1;

		}


















		}

// Merge usergroup data from the cache
$data_key = array(
'title' => 'grouptitle',
'usertitle' => 'groupusertitle',
'stars' => 'groupstars',
'starimage' => 'groupstarimage',
'image' => 'groupimage',
'namestyle' => 'namestyle',
'usereputationsystem' => 'usereputationsystem'
);

foreach($data_key as $field => $key)
{
$post[$key] = $groupscache[$post['usergroup']][$field];
}


		$postbit = build_postbit($post, 2);
eval("\$preview = \"".$templates->get("previewpost")."\";");
}

		$postbit = build_postbit($post, 2);
eval("\$preview = \"".$templates->get("previewpost")."\";");
}

Zeile 791Zeile 809
			$subject = preg_replace("#(FW|RE):( *)#is", '', $subject);
$postdate = my_date($mybb->settings['dateformat'], $pm['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $pm['dateline']);

			$subject = preg_replace("#(FW|RE):( *)#is", '', $subject);
$postdate = my_date($mybb->settings['dateformat'], $pm['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $pm['dateline']);

			$message = "[quote={$pm['quotename']}]\n$message\n[/quote]";

			$message = "[quote='{$pm['quotename']}']\n$message\n[/quote]";

			$message = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $message);

if($mybb->input['do'] == 'forward')

			$message = preg_replace('#^/me (.*)$#im', "* ".$pm['quotename']." \\1", $message);

if($mybb->input['do'] == 'forward')

Zeile 856Zeile 874
	}

if($send_errors)

	}

if($send_errors)

	{

	{

		$to = htmlspecialchars_uni($mybb->input['to']);
$bcc = htmlspecialchars_uni($mybb->input['bcc']);
}

// Load the auto complete javascript if it is enabled.
eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");

		$to = htmlspecialchars_uni($mybb->input['to']);
$bcc = htmlspecialchars_uni($mybb->input['bcc']);
}

// Load the auto complete javascript if it is enabled.
eval("\$autocompletejs = \"".$templates->get("private_send_autocomplete")."\";");





	$pmid = $mybb->input['pmid'];
$do = $mybb->input['do'];
if($do != "forward" && $do != "reply" && $do != "replyall")
{
$do = '';

	$pmid = $mybb->input['pmid'];
$do = $mybb->input['do'];
if($do != "forward" && $do != "reply" && $do != "replyall")
{
$do = '';

	}

	}

	
// See if it's actually worth showing the buddylist icon.
if($mybb->user['buddylist'] != '' && $mybb->settings['use_xmlhttprequest'] == 1)

	
// See if it's actually worth showing the buddylist icon.
if($mybb->user['buddylist'] != '' && $mybb->settings['use_xmlhttprequest'] == 1)

Zeile 894Zeile 912
	$pmid = intval($mybb->input['pmid']);

$query = $db->query("

	$pmid = intval($mybb->input['pmid']);

$query = $db->query("

		SELECT pm.*, u.*, f.*, g.title AS grouptitle, g.usertitle AS groupusertitle, g.stars AS groupstars, g.starimage AS groupstarimage, g.image AS groupimage, g.namestyle

		SELECT pm.*, u.*, f.*

		FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.fromid)
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)

		FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=pm.fromid)
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)

		LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup)

 
		WHERE pm.pmid='".intval($mybb->input['pmid'])."' AND pm.uid='".$mybb->user['uid']."'
");
$pm = $db->fetch_array($query);

		WHERE pm.pmid='".intval($mybb->input['pmid'])."' AND pm.uid='".$mybb->user['uid']."'
");
$pm = $db->fetch_array($query);

Zeile 911Zeile 928
	if(!$pm['pmid'])
{
error($lang->error_invalidpm);

	if(!$pm['pmid'])
{
error($lang->error_invalidpm);

 
	}

// If we've gotten a PM, attach the group info
$data_key = array(
'title' => 'grouptitle',
'usertitle' => 'groupusertitle',
'stars' => 'groupstars',
'starimage' => 'groupstarimage',
'image' => 'groupimage',
'namestyle' => 'namestyle'
);

foreach($data_key as $field => $key)
{
$pm[$key] = $groupscache[$pm['usergroup']][$field];

	}

if($pm['receipt'] == 1)

	}

if($pm['receipt'] == 1)

Zeile 1208Zeile 1240
			}
}
$plugins->run_hooks("private_do_tracking_end");

			}
}
$plugins->run_hooks("private_do_tracking_end");

		redirect("private.php", $lang->redirect_pmstrackingstopped);

		redirect("private.php?action=tracking", $lang->redirect_pmstrackingstopped);

	}
elseif($mybb->input['stoptrackingunread'])
{

	}
elseif($mybb->input['stoptrackingunread'])
{

Zeile 1223Zeile 1255
			}
}
$plugins->run_hooks("private_do_tracking_end");

			}
}
$plugins->run_hooks("private_do_tracking_end");

		redirect("private.php", $lang->redirect_pmstrackingstopped);

		redirect("private.php?action=tracking", $lang->redirect_pmstrackingstopped);

	}
elseif($mybb->input['cancel'])
{

	}
elseif($mybb->input['cancel'])
{

Zeile 1249Zeile 1281
			}
}
$plugins->run_hooks("private_do_tracking_end");

			}
}
$plugins->run_hooks("private_do_tracking_end");

		redirect("private.php", $lang->redirect_pmstrackingcanceled);

		redirect("private.php?action=tracking", $lang->redirect_pmstrackingcanceled);

	}
}


	}
}