"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/xmlhttp.php" between
mybb_1819.zip and mybb_1820.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

xmlhttp.php  (mybb_1819):xmlhttp.php  (mybb_1820)
skipping to change at line 486 skipping to change at line 486
else if($forum['open'] == 0 || $forumpermissions['caneditposts'] == 0 || $mybb->user['uid'] != $post['uid'] || $mybb->user['uid'] == 0 || $mybb-> user['suspendposting'] == 1) else if($forum['open'] == 0 || $forumpermissions['caneditposts'] == 0 || $mybb->user['uid'] != $post['uid'] || $mybb->user['uid'] == 0 || $mybb-> user['suspendposting'] == 1)
{ {
xmlhttp_error($lang->no_permission_edit_post); xmlhttp_error($lang->no_permission_edit_post);
} }
// If we're past the edit time limit - don't allow editing. // If we're past the edit time limit - don't allow editing.
else if($mybb->usergroup['edittimelimit'] != 0 && $post['dateline '] < (TIME_NOW-($mybb->usergroup['edittimelimit']*60))) else if($mybb->usergroup['edittimelimit'] != 0 && $post['dateline '] < (TIME_NOW-($mybb->usergroup['edittimelimit']*60)))
{ {
$lang->edit_time_limit = $lang->sprintf($lang->edit_time_ limit, $mybb->usergroup['edittimelimit']); $lang->edit_time_limit = $lang->sprintf($lang->edit_time_ limit, $mybb->usergroup['edittimelimit']);
xmlhttp_error($lang->edit_time_limit); xmlhttp_error($lang->edit_time_limit);
} }
// User can't edit unapproved post // User can't edit unapproved post unless permitted for own
if($post['visible'] == 0) if($post['visible'] == 0 && !($mybb->settings['showownunapproved'
] && $post['uid'] == $mybb->user['uid']))
{ {
xmlhttp_error($lang->post_moderation); xmlhttp_error($lang->post_moderation);
} }
} }
$plugins->run_hooks("xmlhttp_edit_post_end"); $plugins->run_hooks("xmlhttp_edit_post_end");
if($mybb->get_input('do') == "get_post") if($mybb->get_input('do') == "get_post")
{ {
// Send our headers. // Send our headers.
skipping to change at line 748 skipping to change at line 748
ORDER BY p.dateline ORDER BY p.dateline
"); ");
while($quoted_post = $db->fetch_array($query)) while($quoted_post = $db->fetch_array($query))
{ {
if( if(
(!is_moderator($quoted_post['fid'], "canviewunapprove") & & $quoted_post['visible'] == 0) || (!is_moderator($quoted_post['fid'], "canviewunapprove") & & $quoted_post['visible'] == 0) ||
(!is_moderator($quoted_post['fid'], "canviewdeleted") && $quoted_post['visible'] == -1) || (!is_moderator($quoted_post['fid'], "canviewdeleted") && $quoted_post['visible'] == -1) ||
(in_array($quoted_post['fid'], $onlyusfids) && (!$mybb->u ser['uid'] || $quoted_post['thread_uid'] != $mybb->user['uid'])) (in_array($quoted_post['fid'], $onlyusfids) && (!$mybb->u ser['uid'] || $quoted_post['thread_uid'] != $mybb->user['uid']))
) )
{ {
continue; // Allow quoting from own unapproved post
if($quoted_post['visible'] == 0 && !($mybb->settings['sho
wownunapproved'] && $quoted_post['uid'] == $mybb->user['uid']))
{
continue;
}
} }
$message .= parse_quoted_message($quoted_post, false); $message .= parse_quoted_message($quoted_post, false);
} }
if($mybb->settings['maxquotedepth'] != '0') if($mybb->settings['maxquotedepth'] != '0')
{ {
$message = remove_message_quotes($message); $message = remove_message_quotes($message);
} }
// Send our headers. // Send our headers.
skipping to change at line 1074 skipping to change at line 1078
$plugins->run_hooks("xmlhttp_get_buddyselect_end"); $plugins->run_hooks("xmlhttp_get_buddyselect_end");
eval("\$buddy_select = \"".$templates->get("xmlhttp_buddyselect") ."\";"); eval("\$buddy_select = \"".$templates->get("xmlhttp_buddyselect") ."\";");
echo $buddy_select; echo $buddy_select;
} }
else else
{ {
xmlhttp_error($lang->buddylist_error); xmlhttp_error($lang->buddylist_error);
} }
} }
else if($mybb->input['action'] == 'get_referrals')
{
$lang->load('member');
$uid = $mybb->get_input('uid', MYBB::INPUT_INT);
if (!$uid) {
xmlhttp_error($lang->referrals_no_user_specified);
}
$referrals = get_user_referrals($uid);
if (empty($referrals)) {
eval("\$referral_rows = \"".$templates->get('member_no_referrals'
)."\";");
} else {
foreach($referrals as $referral)
{
// Format user name link
$username = htmlspecialchars_uni($referral['username']);
$username = format_name($username, $referral['usergroup']
, $referral['displaygroup']);
$username = build_profile_link($username, $referral['uid'
]);
$regdate = my_date('normal', $referral['regdate']);
eval("\$referral_rows .= \"".$templates->get('member_refe
rral_row')."\";");
$bg_color = alt_trow();
}
}
$plugins->run_hooks('xmlhttp_referrals_end');
eval("\$referrals = \"".$templates->get('member_referrals_popup', 1, 0)."
\";");
// Send our headers and output.
header("Content-type: text/plain; charset={$charset}");
echo $referrals;
}
/** /**
* Spits an XML Http based error message back to the browser * Spits an XML Http based error message back to the browser
* *
* @param string $message The message to send back. * @param string $message The message to send back.
*/ */
function xmlhttp_error($message) function xmlhttp_error($message)
{ {
global $charset; global $charset;
 End of changes. 3 change blocks. 
3 lines changed or deleted 51 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)