"Fossies" - the Fresh Open Source Software Archive  

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

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

global.php  (mybb_1819):global.php  (mybb_1820)
skipping to change at line 353 skipping to change at line 353
$stylesheet_url = str_replace('.css', '.m in.css', $stylesheet_url); $stylesheet_url = str_replace('.css', '.m in.css', $stylesheet_url);
} }
if(strpos($page_stylesheet, 'css.php') !== false) if(strpos($page_stylesheet, 'css.php') !== false)
{ {
// We need some modification to get it wo rking with the displayorder // We need some modification to get it wo rking with the displayorder
$query_string = parse_url($stylesheet_url , PHP_URL_QUERY); $query_string = parse_url($stylesheet_url , PHP_URL_QUERY);
$id = (int) my_substr($query_string, 11); $id = (int) my_substr($query_string, 11);
$query = $db->simple_select("themestylesh eets", "name", "sid={$id}"); $query = $db->simple_select("themestylesh eets", "name", "sid={$id}");
$real_name = $db->fetch_field($query, "na me"); $real_name = $db->fetch_field($query, "na me");
$theme_stylesheets[$real_name] = "<link t ype=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n"; $theme_stylesheets[$real_name] = $id;
} }
else else
{ {
$theme_stylesheets[basename($page_stylesh eet)] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" / >\n"; $theme_stylesheets[basename($page_stylesh eet)] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" / >\n";
} }
$already_loaded[$page_stylesheet] = 1; $already_loaded[$page_stylesheet] = 1;
} }
} }
} }
} }
unset($actions); unset($actions);
$css_php_script_stylesheets = array();
if(!empty($theme_stylesheets) && is_array($theme['disporder'])) if(!empty($theme_stylesheets) && is_array($theme['disporder']))
{ {
foreach($theme['disporder'] as $style_name => $order) foreach($theme['disporder'] as $style_name => $order)
{ {
if(!empty($theme_stylesheets[$style_name])) if(!empty($theme_stylesheets[$style_name]))
{ {
$stylesheets .= $theme_stylesheets[$style_name]; if(is_int($theme_stylesheets[$style_name]))
{
$css_php_script_stylesheets[] = $theme_stylesheet
s[$style_name];
}
else
{
$stylesheets .= $theme_stylesheets[$style_name];
}
} }
} }
} }
if(!empty($css_php_script_stylesheets))
{
$sheet = $mybb->settings['bburl'] . '/css.php?' . http_build_query(array(
'stylesheet' => $css_php_script_stylesheets
));
$stylesheets .= "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$shee
t}\" />\n";
}
// Are we linking to a remote theme server? // Are we linking to a remote theme server?
if(my_validate_url($theme['imgdir'])) if(my_validate_url($theme['imgdir']))
{ {
// If a language directory for the current language exists within the the me - we use it // If a language directory for the current language exists within the the me - we use it
if(!empty($mybb->user['language'])) if(!empty($mybb->user['language']))
{ {
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language ']; $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language '];
} }
else else
{ {
skipping to change at line 457 skipping to change at line 475
} }
else else
{ {
$templatelist = ''; $templatelist = '';
} }
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcom eblock_member,header_welcomeblock_member_user,header_welcomeblock_member_moderat or,header_welcomeblock_member_admin,error"; $templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcom eblock_member,header_welcomeblock_member_user,header_welcomeblock_member_moderat or,header_welcomeblock_member_admin,error";
$templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,na v_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themese lect,global_unreadreports,footer_contactus"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,na v_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themese lect,global_unreadreports,footer_contactus";
$templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline, error_inline_item,error_nopermission_loggedin,error_nopermission,global_pm_alert ,header_menu_search,header_menu_portal,redirect,footer_languageselect_option"; $templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline, error_inline_item,error_nopermission_loggedin,error_nopermission,global_pm_alert ,header_menu_search,header_menu_portal,redirect,footer_languageselect_option";
$templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_e mbed,video_metacafe_embed,video_myspacetv_embed,video_mixer_embed,video_vimeo_em bed,video_yahoo_embed,video_youtube_embed,debug_summary"; $templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_e mbed,video_metacafe_embed,video_myspacetv_embed,video_mixer_embed,video_vimeo_em bed,video_yahoo_embed,video_youtube_embed,debug_summary";
$templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smiliein sert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_themeselector ,task_image,usercp_themeselector_option,php_warnings"; $templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smiliein sert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_showteamlink, footer_themeselector,task_image,usercp_themeselector_option,php_warnings";
$templatelist .= ",mycode_code,mycode_email,mycode_img,mycode_php,mycode_quote_p ost,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_rea son,nav_dropdown,global_remote_avatar_notice"; $templatelist .= ",mycode_code,mycode_email,mycode_img,mycode_php,mycode_quote_p ost,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_rea son,nav_dropdown,global_remote_avatar_notice";
$templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_sea rch,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welco meblock_guest_login_modal_lockout"; $templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_sea rch,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welco meblock_guest_login_modal_lockout";
$templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detect ion,header_quicksearch,smilie"; $templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detect ion,header_quicksearch,smilie,modal,modal_button";
$templates->cache($db->escape_string($templatelist)); $templates->cache($db->escape_string($templatelist));
// Set the current date and time now // Set the current date and time now
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false); $datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
$timenow = my_date($mybb->settings['timeformat'], TIME_NOW); $timenow = my_date($mybb->settings['timeformat'], TIME_NOW);
$lang->welcome_current_time = $lang->sprintf($lang->welcome_current_time, $daten ow . $lang->comma . $timenow); $lang->welcome_current_time = $lang->sprintf($lang->welcome_current_time, $daten ow . $lang->comma . $timenow);
// Format the last visit date of this user appropriately // Format the last visit date of this user appropriately
if(isset($mybb->user['lastvisit'])) if(isset($mybb->user['lastvisit']))
{ {
skipping to change at line 639 skipping to change at line 657
{ {
$total_joinrequests = my_number_format($total_joi nrequests); $total_joinrequests = my_number_format($total_joi nrequests);
$lang->pending_joinrequests = $lang->sprintf($lan g->pending_joinrequests, $total_joinrequests); $lang->pending_joinrequests = $lang->sprintf($lan g->pending_joinrequests, $total_joinrequests);
} }
eval('$pending_joinrequests = "'.$templates->get('global_ pending_joinrequests').'";'); eval('$pending_joinrequests = "'.$templates->get('global_ pending_joinrequests').'";');
} }
} }
} }
$unreadreports = ''; $modnotice = '';
$moderation_queue = array();
// This user is a moderator, super moderator or administrator // This user is a moderator, super moderator or administrator
if($mybb->settings['reportmethod'] == "db" && ($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->user group['canmanagereportedcontent'] == 1))) if($mybb->settings['reportmethod'] == "db" && ($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->user group['canmanagereportedcontent'] == 1)))
{ {
// Only worth checking if we are here because we have ACP permissions and the other condition fails // Only worth checking if we are here because we have ACP permissions and the other condition fails
if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $myb b->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1)) if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $myb b->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
{ {
// First we check if the user's a super admin: if yes, we don't c are about permissions // First we check if the user's a super admin: if yes, we don't c are about permissions
$can_access_moderationqueue = true; $can_access_moderationqueue = true;
$is_super_admin = is_super_admin($mybb->user['uid']); $is_super_admin = is_super_admin($mybb->user['uid']);
if(!$is_super_admin) if(!$is_super_admin)
skipping to change at line 717 skipping to change at line 737
{ {
if($unread == 1) if($unread == 1)
{ {
$lang->unread_reports = $lang->unread_rep ort; $lang->unread_reports = $lang->unread_rep ort;
} }
else else
{ {
$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('$unreadreports = "'.$templates->get('global eval('$moderation_queue[] = "'.$templates->get('g
_unreadreports').'";'); lobal_unreadreports', 1, 0).'";');
}
}
}
}
// Get awaiting moderation queue stats
if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergrou
p['canmodcp'] == 1 && $mybb->usergroup['canmanagemodqueue'] == 1))
{
$unapproved_posts = $unapproved_threads = 0;
$query = $db->simple_select("posts", "replyto", "visible = 0");
while($unapproved = $db->fetch_array($query))
{
if($unapproved["replyto"] == 0){
$unapproved_threads++;
} else {
$unapproved_posts++;
}
}
$query = $db->simple_select("attachments", "COUNT(aid) AS unapprovedattac
hments", "visible=0");
$unapproved_attachments = $db->fetch_field($query, "unapprovedattachments
");
$modqueue_types = array('threads', 'posts', 'attachments');
foreach($modqueue_types as $modqueue_type)
{
if(!empty(${'unapproved_'.$modqueue_type}))
{
if(${'unapproved_'.$modqueue_type} == 1)
{
$modqueue_message = $lang->{'unapproved_'.substr(
$modqueue_type, 0, -1)};
} }
else
{
$modqueue_message = $lang->sprintf($lang->{'unapp
roved_'.$modqueue_type}, my_number_format(${'unapproved_'.$modqueue_type}));
}
eval('$moderation_queue[] = "'.$templates->get('global_mo
dqueue', 1, 0).'";');
} }
} }
} }
if(!empty($moderation_queue))
{
$moderation_queue_last = array_pop($moderation_queue);
if(empty($moderation_queue))
{
$moderation_queue = $moderation_queue_last;
}
else
{
$moderation_queue = implode($lang->comma, $moderation_queue).' '.
$lang->and.' '.$moderation_queue_last;
}
$moderation_queue = $lang->sprintf($lang->mod_notice, $moderation_queue);
eval('$modnotice = "'.$templates->get('global_modqueue_notice').'";');
}
// Got a character set? // Got a character set?
$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)
skipping to change at line 868 skipping to change at line 941
} }
eval('$awaitingusers = "'.$templates->get('global_awaiting_activa tion').'";'); eval('$awaitingusers = "'.$templates->get('global_awaiting_activa tion').'";');
} }
else else
{ {
$awaitingusers = ''; $awaitingusers = '';
} }
} }
$jsTemplates = array();
foreach (array('modal', 'modal_button') as $template) {
eval('$jsTemplates["'.$template.'"] = "'.$templates->get($template, 1, 0)
.'";');
$jsTemplates[$template] = str_replace("\n", "\\\n", addslashes($jsTemplat
es[$template]));
}
// Set up some of the default templates // Set up some of the default templates
eval('$headerinclude = "'.$templates->get('headerinclude').'";'); eval('$headerinclude = "'.$templates->get('headerinclude').'";');
eval('$gobutton = "'.$templates->get('gobutton').'";'); eval('$gobutton = "'.$templates->get('gobutton').'";');
eval('$htmldoctype = "'.$templates->get('htmldoctype', 1, 0).'";'); eval('$htmldoctype = "'.$templates->get('htmldoctype', 1, 0).'";');
eval('$header = "'.$templates->get('header').'";'); eval('$header = "'.$templates->get('header').'";');
$copy_year = my_date('Y', TIME_NOW); $copy_year = my_date('Y', TIME_NOW);
// Are we showing version numbers in the footer? // Are we showing version numbers in the footer?
$mybbversion = ''; $mybbversion = '';
skipping to change at line 946 skipping to change at line 1025
{ {
$theme_options = build_theme_select("theme", $mybb->user['style'], 0, '', false, true); $theme_options = build_theme_select("theme", $mybb->user['style'], 0, '', false, true);
if(!empty($theme_options)) if(!empty($theme_options))
{ {
$theme_redirect_url = get_current_location(true, 'theme'); $theme_redirect_url = get_current_location(true, 'theme');
eval('$theme_select = "'.$templates->get('footer_themeselect').'" ;'); eval('$theme_select = "'.$templates->get('footer_themeselect').'" ;');
} }
} }
$showteamlink = '';
if($mybb->settings['enableshowteam'] != 0)
{
eval('$showteamlink = "'.$templates->get('footer_showteamlink').'";');
}
// If we use the contact form, show 'Contact Us' link when appropriate // If we use the contact form, show 'Contact Us' link when appropriate
$contact_us = ''; $contact_us = '';
if(($mybb->settings['contactlink'] == "contact.php" && $mybb->settings['contact' ] == 1 && ($mybb->settings['contact_guests'] != 1 && $mybb->user['uid'] == 0 || $mybb->user['uid'] > 0)) || $mybb->settings['contactlink'] != "contact.php") if(($mybb->settings['contactlink'] == "contact.php" && $mybb->settings['contact' ] == 1 && ($mybb->settings['contact_guests'] != 1 && $mybb->user['uid'] == 0 || $mybb->user['uid'] > 0)) || $mybb->settings['contactlink'] != "contact.php")
{ {
if(!my_validate_url($mybb->settings['contactlink'], true) && my_substr($m ybb->settings['contactlink'], 0, 7) != 'mailto:') if(!my_validate_url($mybb->settings['contactlink'], true) && my_substr($m ybb->settings['contactlink'], 0, 7) != 'mailto:')
{ {
$mybb->settings['contactlink'] = $mybb->settings['bburl'].'/'.$my bb->settings['contactlink']; $mybb->settings['contactlink'] = $mybb->settings['bburl'].'/'.$my bb->settings['contactlink'];
} }
eval('$contact_us = "'.$templates->get('footer_contactus').'";'); eval('$contact_us = "'.$templates->get('footer_contactus').'";');
 End of changes. 12 change blocks. 
7 lines changed or deleted 103 lines changed or added

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