"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/admin/modules/user/users.php" between
mybb_1822.zip and mybb_1823.zip

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

users.php  (mybb_1822):users.php  (mybb_1823)
skipping to change at line 933 skipping to change at line 933
$profile_fields['optional'][] = $profile_field; $profile_fields['optional'][] = $profile_field;
} }
} }
$page->add_breadcrumb_item($lang->edit_user.": ".htmlspecialchars_uni($us er['username'])); $page->add_breadcrumb_item($lang->edit_user.": ".htmlspecialchars_uni($us er['username']));
$page->extra_header .= <<<EOF $page->extra_header .= <<<EOF
<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type=" text/css" media="all" /> <link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type=" text/css" media="all" />
<script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor. bbcode.min.js?ver=1822"></script> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor. bbcode.min.js?ver=1822"></script>
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1 822"></script> <script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1 823"></script>
<script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js? ver=1805"></script> <script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js? ver=1805"></script>
EOF; EOF;
$page->output_header($lang->edit_user); $page->output_header($lang->edit_user);
$sub_tabs['edit_user'] = array( $sub_tabs['edit_user'] = array(
'title' => $lang->edit_user, 'title' => $lang->edit_user,
'description' => $lang->edit_user_desc 'description' => $lang->edit_user_desc
); );
$form = new Form("index.php?module=user-users&amp;action=edit&amp;uid={$u ser['uid']}", "post", "", 1); $form = new Form("index.php?module=user-users&amp;action=edit&amp;uid={$u ser['uid']}", "post", "", 1);
skipping to change at line 1996 skipping to change at line 1996
$db->update_query("warnings", array("revokedby" => $desti nation_user['uid']), "revokedby='{$source_user['uid']}'"); $db->update_query("warnings", array("revokedby" => $desti nation_user['uid']), "revokedby='{$source_user['uid']}'");
$db->update_query("warnings", array("issuedby" => $destin ation_user['uid']), "issuedby='{$source_user['uid']}'"); $db->update_query("warnings", array("issuedby" => $destin ation_user['uid']), "issuedby='{$source_user['uid']}'");
// Thread ratings // Thread ratings
merge_thread_ratings($source_user['uid'], $destination_us er['uid']); merge_thread_ratings($source_user['uid'], $destination_us er['uid']);
// Banning // Banning
$db->update_query("banned", array('admin' => $destination _user['uid']), "admin = '{$source_user['uid']}'"); $db->update_query("banned", array('admin' => $destination _user['uid']), "admin = '{$source_user['uid']}'");
// Carry over referrals // Carry over referrals
$db->update_query("users", array("referrer" => ((int)$sou $db->update_query("users", array("referrer" => $destinati
rce_user['referrer'] + (int)$destination_user['referrer'])), "uid='{$destination on_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user[
_user['uid']}'"); 'uid']}'");
$db->update_query("users", array("referrals" => ((int)$so // If destination user has no referrer but source does an
urce_user['referrals'] + (int)$destination_user['referrals'])), "uid='{$destinat d source user was not referred by destination user
ion_user['uid']}'"); // or destination user was referred by the source user
if(($destination_user['referrer'] == 0 && $source_user['r
eferrer'] > 0 && $source_user['referrer'] != $destination_user['uid']) || $desti
nation_user['referrer'] == $source_user['uid'])
{
$db->update_query("users", array("referrer" => $s
ource_user['referrer']), "uid='{$destination_user['uid']}'");
}
$query = $db->simple_select("users", "COUNT(uid) as total
_referrals", "referrer='{$destination_user['uid']}' AND uid!='{$source_user['uid
']}'");
$new_referrals = $db->fetch_field($query, "total_referral
s");
$db->update_query("users", array("referrals" => (int)$new
_referrals), "uid='{$destination_user['uid']}'");
// Merging Reputation // Merging Reputation
// First, let's change all the details over to our new us er... // First, let's change all the details over to our new us er...
$db->update_query("reputation", array("adduid" => $destin ation_user['uid']), "adduid = '".$source_user['uid']."'"); $db->update_query("reputation", array("adduid" => $destin ation_user['uid']), "adduid = '".$source_user['uid']."'");
$db->update_query("reputation", array("uid" => $destinati on_user['uid']), "uid = '".$source_user['uid']."'"); $db->update_query("reputation", array("uid" => $destinati on_user['uid']), "uid = '".$source_user['uid']."'");
// Now that all the repuation is merged, figure out what to do with this user's comments... // Now that all the repuation is merged, figure out what to do with this user's comments...
$options = array( $options = array(
"order_by" => "uid", "order_by" => "uid",
"order_dir" => "ASC" "order_dir" => "ASC"
skipping to change at line 2532 skipping to change at line 2540
{ {
$updated_group = array( $updated_group = array(
"usergroup" => $ban['oldgroup'], "usergroup" => $ban['oldgroup'],
"additionalgroups" => $ban['oldad ditionalgroups'], "additionalgroups" => $ban['oldad ditionalgroups'],
"displaygroup" => $ban['olddispla ygroup'] "displaygroup" => $ban['olddispla ygroup']
); );
$db->update_query("users", $updated_group , "uid = '".$ban['uid']."'"); $db->update_query("users", $updated_group , "uid = '".$ban['uid']."'");
$db->delete_query("banned", "uid = '".$ba n['uid']."'"); $db->delete_query("banned", "uid = '".$ba n['uid']."'");
} }
$cache->update_banned();
$cache->update_moderators(); $cache->update_moderators();
$mybb->input['action'] = "inline_lift"; $mybb->input['action'] = "inline_lift";
log_admin_action($to_be_unbanned); log_admin_action($to_be_unbanned);
my_unsetcookie("inlinemod_useracp"); my_unsetcookie("inlinemod_useracp");
$lang->success_ban_lifted = $lang->sprintf($lang- >success_ban_lifted, my_number_format($to_be_unbanned)); $lang->success_ban_lifted = $lang->sprintf($lang- >success_ban_lifted, my_number_format($to_be_unbanned));
flash_message($lang->success_ban_lifted, 'success '); flash_message($lang->success_ban_lifted, 'success ');
admin_redirect("index.php?module=user-users".$vid _url); admin_redirect("index.php?module=user-users".$vid _url);
} }
skipping to change at line 2626 skipping to change at line 2633
$update_array = array( $update_array = array(
'usergroup' => 7, 'usergroup' => 7,
'displaygroup' => 0, 'displaygroup' => 0,
'additionalgroups' => '', 'additionalgroups' => '',
); );
$db->update_query('users', $update_array, "uid = '{$user['uid']}'"); $db->update_query('users', $update_array, "uid = '{$user['uid']}'");
$db->delete_query("forumsubscriptions", " uid = '{$user['uid']}'"); $db->delete_query("forumsubscriptions", " uid = '{$user['uid']}'");
$db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");
$cache->update_banned();
++$banned_count; ++$banned_count;
} }
$mybb->input['action'] = "inline_banned"; $mybb->input['action'] = "inline_banned";
log_admin_action($banned_count, $lifted); log_admin_action($banned_count, $lifted);
my_unsetcookie("inlinemod_useracp"); // Remove th e cookie of selected users as we've finished with them my_unsetcookie("inlinemod_useracp"); // Remove th e cookie of selected users as we've finished with them
$lang->users_banned = $lang->sprintf($lang->users _banned, $banned_count); $lang->users_banned = $lang->sprintf($lang->users _banned, $banned_count);
flash_message($lang->users_banned, 'success'); flash_message($lang->users_banned, 'success');
admin_redirect("index.php?module=user-users".$vid _url); admin_redirect("index.php?module=user-users".$vid _url);
} }
skipping to change at line 3903 skipping to change at line 3909
if($i == 1) if($i == 1)
{ {
$float = "left"; $float = "left";
} }
else else
{ {
$float = "right"; $float = "right";
} }
// And build the final card // And build the final card
$uname = "";
if(in_array('username', $view['fields']))
{
$uname = $user['view']['username'];
}
$card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: { $float};\">\n"; $card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: { $float};\">\n";
$card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inli nemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$(' #uid_{$user['uid']}').toggleClass('inline_selected');\" /> {$user['view']['usern ame']}</legend>\n"; $card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inli nemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$(' #uid_{$user['uid']}').toggleClass('inline_selected');\" /> {$uname}</legend>\n";
if($avatar) if($avatar)
{ {
$card .= "<div class=\"user_avatar\">{$avatar}</div>\n"; $card .= "<div class=\"user_avatar\">{$avatar}</div>\n";
} }
if($user_details) if($user_details)
{ {
$card .= "<div class=\"user_details\">".implode("<br />", $user_d etails)."</div>\n"; $card .= "<div class=\"user_details\">".implode("<br />", $user_d etails)."</div>\n";
} }
if($controls) if($controls)
{ {
skipping to change at line 3973 skipping to change at line 3984
/** /**
* @param array $fields * @param array $fields
* @param array $values * @param array $values
* @param DefaultFormContainer $form_container * @param DefaultFormContainer $form_container
* @param DefaultForm $form * @param DefaultForm $form
* @param bool $search * @param bool $search
*/ */
function output_custom_profile_fields($fields, $values, &$form_container, &$form , $search=false) function output_custom_profile_fields($fields, $values, &$form_container, &$form , $search=false)
{ {
global $lang; global $lang, $mybb;
if(!is_array($fields)) if(!is_array($fields))
{ {
return; return;
} }
foreach($fields as $profile_field) foreach($fields as $profile_field)
{ {
$profile_field['name'] = htmlspecialchars_uni($profile_field['nam e']); $profile_field['name'] = htmlspecialchars_uni($profile_field['nam e']);
$profile_field['description'] = htmlspecialchars_uni($profile_fie ld['description']); $profile_field['description'] = htmlspecialchars_uni($profile_fie ld['description']);
list($type, $options) = explode("\n", $profile_field['type'], 2); list($type, $options) = explode("\n", $profile_field['type'], 2);
 End of changes. 7 change blocks. 
11 lines changed or deleted 28 lines changed or added

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