"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/modcp.php" between
mybb_1821.zip and mybb_1822.zip

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

modcp.php  (mybb_1821):modcp.php  (mybb_1822)
skipping to change at line 2590 skipping to change at line 2590
require_once MYBB_ROOT."inc/datahandlers/user.php"; require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler('update'); $userhandler = new UserDataHandler('update');
// Set the data for the new user. // Set the data for the new user.
$updated_user = array( $updated_user = array(
"uid" => $user['uid'], "uid" => $user['uid'],
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPU T_ARRAY), "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPU T_ARRAY),
"profile_fields_editable" => true, "profile_fields_editable" => true,
"website" => $mybb->get_input('website'), "website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'), "icq" => $mybb->get_input('icq'),
"yahoo" => $mybb->get_input('yahoo'),
"skype" => $mybb->get_input('skype'), "skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'), "google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'), "signature" => $mybb->get_input('signature'),
"usernotes" => $mybb->get_input('usernotes'), "usernotes" => $mybb->get_input('usernotes'),
"away" => $away "away" => $away
); );
$updated_user['birthday'] = array( $updated_user['birthday'] = array(
"day" => $mybb->get_input('birthday_day', MyBB::INPUT_INT), "day" => $mybb->get_input('birthday_day', MyBB::INPUT_INT),
"month" => $mybb->get_input('birthday_month', MyBB::INPUT_INT), "month" => $mybb->get_input('birthday_month', MyBB::INPUT_INT),
skipping to change at line 2692 skipping to change at line 2691
} }
else else
{ {
if($mybb->input[$option['time']] == 0 && $mybb->i nput[$option['period']] != "never" && $user[$option['update_field']] != 1) if($mybb->input[$option['time']] == 0 && $mybb->i nput[$option['period']] != "never" && $user[$option['update_field']] != 1)
{ {
// User has selected a type of ban, but n ot entered a valid time frame // User has selected a type of ban, but n ot entered a valid time frame
$string = $option['action']."_error"; $string = $option['action']."_error";
$errors[] = $lang->$string; $errors[] = $lang->$string;
} }
else
if(!is_array($errors))
{ {
$suspend_length = fetch_time_length((int) $mybb->input[$option['time']], $mybb->input[$option['period']]); $suspend_length = fetch_time_length((int) $mybb->input[$option['time']], $mybb->input[$option['period']]);
if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{ {
// We already have a suspension, but entered a new time // We already have a suspension, but entered a new time
if($suspend_length == "-1") if($suspend_length == "-1")
{ {
// Permanent ban on actio n // Permanent ban on actio n
$extra_user_updates[$opti on['update_length']] = 0; $extra_user_updates[$opti on['update_length']] = 0;
skipping to change at line 2735 skipping to change at line 2733
} }
} }
// Those with javascript turned off will be able to select both - cheeky! // Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting // Check to make sure we're not moderating AND suspending posting
if(isset($extra_user_updates) && $extra_user_updates['moderatepos ts'] && $extra_user_updates['suspendposting']) if(isset($extra_user_updates) && $extra_user_updates['moderatepos ts'] && $extra_user_updates['suspendposting'])
{ {
$errors[] = $lang->suspendmoderate_error; $errors[] = $lang->suspendmoderate_error;
} }
if(is_array($errors)) if(is_array($errors) && !empty($errors))
{ {
$mybb->input['action'] = "editprofile"; $mybb->input['action'] = "editprofile";
} }
else else
{ {
$plugins->run_hooks("modcp_do_editprofile_update"); $plugins->run_hooks("modcp_do_editprofile_update");
// Continue with the update if there is no errors // Continue with the update if there is no errors
$user_info = $userhandler->update_user(); $user_info = $userhandler->update_user();
if(!empty($extra_user_updates)) if(!empty($extra_user_updates))
skipping to change at line 2825 skipping to change at line 2823
$birthday[2] = ''; $birthday[2] = '';
} }
list($mybb->input['birthday_day'], $mybb->input['birthday_month'] , $mybb->input['birthday_year']) = $birthday; list($mybb->input['birthday_day'], $mybb->input['birthday_month'] , $mybb->input['birthday_year']) = $birthday;
} }
else else
{ {
$errors = inline_error($errors); $errors = inline_error($errors);
} }
// Sanitize all input // Sanitize all input
foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field) foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signatur e', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
{ {
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($fie ld)); $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($fie ld));
} }
// Custom user title // Custom user title
if(!empty($userperms['usertitle'])) if(!empty($userperms['usertitle']))
{ {
$defaulttitle = htmlspecialchars_uni($userperms['usertitle']); $defaulttitle = htmlspecialchars_uni($userperms['usertitle']);
} }
else else
skipping to change at line 3292 skipping to change at line 3290
if(!isset($newtitle)) if(!isset($newtitle))
{ {
$newtitle = ''; $newtitle = '';
} }
$birthday_year = $mybb->input['birthday_year']; $birthday_year = $mybb->input['birthday_year'];
$user_website = $mybb->input['website']; $user_website = $mybb->input['website'];
$user_icq = $mybb->input['icq']; $user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype']; $user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google']; $user_google = $mybb->input['google'];
$user_yahoo = $mybb->input['yahoo'];
$plugins->run_hooks("modcp_editprofile_end"); $plugins->run_hooks("modcp_editprofile_end");
eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";"); eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");
output_page($edituser); output_page($edituser);
} }
if($mybb->input['action'] == "finduser") if($mybb->input['action'] == "finduser")
{ {
if($mybb->usergroup['caneditprofiles'] == 0) if($mybb->usergroup['caneditprofiles'] == 0)
 End of changes. 5 change blocks. 
6 lines changed or deleted 3 lines changed or added

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