"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/global.php" between
mybb_1822.zip and mybb_1823.zip

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

global.php  (mybb_1822):global.php  (mybb_1823)
skipping to change at line 748 skipping to change at line 748
{ {
$lang->unread_reports = $lang->sprintf($l ang->unread_reports, my_number_format($unread)); $lang->unread_reports = $lang->sprintf($l ang->unread_reports, my_number_format($unread));
} }
eval('$moderation_queue[] = "'.$templates->get('g lobal_unreadreports', 1, 0).'";'); eval('$moderation_queue[] = "'.$templates->get('g lobal_unreadreports', 1, 0).'";');
} }
} }
} }
} }
// Get awaiting moderation queue stats // Get awaiting moderation queue stats, except if the page is editpost.php,
if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergrou // because that page can make changes - (un)approving attachments, or deleting
p['canmodcp'] == 1 && $mybb->usergroup['canmanagemodqueue'] == 1)) // unapproved attachments - that would invalidate anything generated here.
// Just leave this queue notification blank for editpost.php.
if(!(defined('THIS_SCRIPT') && THIS_SCRIPT == 'editpost.php') && ($can_access_mo
derationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] ==
1 && $mybb->usergroup['canmanagemodqueue'] == 1)))
{ {
$unapproved_posts = $unapproved_threads = 0; $unapproved_posts = $unapproved_threads = 0;
$query = $db->simple_select("posts", "replyto", "visible = 0"); $query = $db->simple_select("posts", "replyto", "visible = 0");
while($unapproved = $db->fetch_array($query)) while($unapproved = $db->fetch_array($query))
{ {
if($unapproved["replyto"] == 0){ if($unapproved["replyto"] == 0){
$unapproved_threads++; $unapproved_threads++;
} else { } else {
$unapproved_posts++; $unapproved_posts++;
} }
skipping to change at line 812 skipping to change at line 815
$charset = 'UTF-8'; $charset = 'UTF-8';
if(isset($lang->settings['charset']) && $lang->settings['charset']) if(isset($lang->settings['charset']) && $lang->settings['charset'])
{ {
$charset = $lang->settings['charset']; $charset = $lang->settings['charset'];
} }
// Is this user apart of a banned group? // Is this user apart of a banned group?
$bannedwarning = ''; $bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1) if($mybb->usergroup['isbannedgroup'] == 1)
{ {
// Fetch details on their ban // Format their ban lift date and reason appropriately
$query = $db->simple_select('banned', '*', "uid = '{$mybb->user['uid']}'" if(!empty($mybb->user['banned']))
, array('limit' => 1));
$ban = $db->fetch_array($query);
if($ban['uid'])
{ {
// Format their ban lift date and reason appropriately if(!empty($mybb->user['banlifted']))
$banlift = $lang->banned_lifted_never; {
$reason = htmlspecialchars_uni($ban['reason']); $banlift = my_date('normal', $mybb->user['banlifted']);
}
if($ban['lifted'] > 0) else
{ {
$banlift = my_date('normal', $ban['lifted']); $banlift = $lang->banned_lifted_never;
} }
} }
else
if(empty($reason))
{ {
$reason = $lang->unknown; $banlift = $lang->unknown;
} }
if(empty($banlift)) if(!empty($mybb->user['banreason']))
{ {
$banlift = $lang->unknown; $reason = htmlspecialchars_uni($mybb->user['banreason']);
}
else
{
$reason = $lang->unknown;
} }
// Display a nice warning to the user // Display a nice warning to the user
eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";'); eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');
} }
$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading); $lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);
// Check if this user has a new private message. // Check if this user has a new private message.
$pm_notice = ''; $pm_notice = '';
 End of changes. 8 change blocks. 
20 lines changed or deleted 23 lines changed or added

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