Zeile 17 | Zeile 17 |
---|
// Load main MyBB core file which begins all of the magic require_once $working_dir.'/inc/init.php';
|
// Load main MyBB core file which begins all of the magic require_once $working_dir.'/inc/init.php';
|
$shutdown_queries = array();
| $shutdown_queries = $shutdown_functions = array();
|
// Read the usergroups cache as well as the moderators cache $groupscache = $cache->read('usergroups');
| // Read the usergroups cache as well as the moderators cache $groupscache = $cache->read('usergroups');
|
Zeile 361 | Zeile 361 |
---|
} else {
|
} else {
|
$img_directory = $theme['imgdir'];
| $img_directory = $theme['imgdir'];
|
|
|
if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath'])) { $img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($theme['imgdir'], '/'); }
if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images'; }
| if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath'])) { $img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($theme['imgdir'], '/'); }
|
|
|
// If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']) && is_dir($img_directory.'/'.$mybb->user['language'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else { // Check if a custom language directory exists for this theme if(is_dir($img_directory.'/'.$mybb->settings['bblanguage'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } }
| if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images'; }
// If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']) && is_dir($img_directory.'/'.$mybb->user['language'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else { // Check if a custom language directory exists for this theme if(is_dir($img_directory.'/'.$mybb->settings['bblanguage'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } }
|
|
|
$theme['imgdir'] = $mybb->get_asset_url($theme['imgdir']); $theme['imglangdir'] = $mybb->get_asset_url($theme['imglangdir']);
| $theme['imgdir'] = $mybb->get_asset_url($theme['imgdir']); $theme['imglangdir'] = $mybb->get_asset_url($theme['imglangdir']);
|
}
// Theme logo - is it a relative URL to the forum root? Append bburl
| }
// Theme logo - is it a relative URL to the forum root? Append bburl
|
Zeile 414 | Zeile 414 |
---|
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports,error,footer_languageselect_option,footer_contactus"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,header_welcomeblock_member_moderator,redirect,header_menu_calendar,nav_dropdown,footer_themeselector,task_image";
|
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports,error,footer_languageselect_option,footer_contactus"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,header_welcomeblock_member_moderator,redirect,header_menu_calendar,nav_dropdown,footer_themeselector,task_image";
|
$templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline,error_nopermission_loggedin,error_nopermission,debug_summary,header_quicksearch,header_menu_search,header_menu_portal,header_menu_memberlist,usercp_themeselector_option,smilie";
| $templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline,error_nopermission_loggedin,error_nopermission,debug_summary,header_quicksearch,header_menu_search,header_menu_portal,header_menu_memberlist,usercp_themeselector_option,smilie,global_board_offline_modal"; $templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_veoh_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed";
|
$templates->cache($db->escape_string($templatelist));
// Set the current date and time now
| $templates->cache($db->escape_string($templatelist));
// Set the current date and time now
|
Zeile 719 | Zeile 720 |
---|
eval('$pm_notice = "'.$templates->get('global_pm_alert').'";'); }
|
eval('$pm_notice = "'.$templates->get('global_pm_alert').'";'); }
|
if($mybb->usergroup['cancp'] == 1)
| if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
|
{ $awaitingusers = $cache->read('awaitingactivation');
|
{ $awaitingusers = $cache->read('awaitingactivation');
|
| if(isset($awaitingusers['time']) && $awaitingusers['time'] + 86400 < TIME_NOW) { $cache->update_awaitingactivation(); $awaitingusers = $cache->read('awaitingactivation'); }
|
if(!empty($awaitingusers['users'])) { $awaitingusers = (int)$awaitingusers['users'];
|
if(!empty($awaitingusers['users'])) { $awaitingusers = (int)$awaitingusers['users'];
|
} else { $awaitingusers = 0; }
| } else { $awaitingusers = 0; }
|
if($awaitingusers < 1) { $awaitingusers = 0;
|
if($awaitingusers < 1) { $awaitingusers = 0;
|
} else
| } else
|
{ $awaitingusers = my_number_format($awaitingusers); }
| { $awaitingusers = my_number_format($awaitingusers); }
|
Zeile 751 | Zeile 758 |
---|
{ $awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers); }
|
{ $awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers); }
|
| if($admincplink) { $awaiting_message .= $lang->sprintf($lang->awaiting_message_link, $mybb->settings['bburl'], $admin_dir); }
|
eval('$awaitingusers = "'.$templates->get('global_awaiting_activation').'";'); } else { $awaitingusers = '';
|
eval('$awaitingusers = "'.$templates->get('global_awaiting_activation').'";'); } else { $awaitingusers = '';
|
} }
| } }
|
// Set up some of the default templates eval('$headerinclude = "'.$templates->get('headerinclude').'";'); eval('$gobutton = "'.$templates->get('gobutton').'";');
| // Set up some of the default templates eval('$headerinclude = "'.$templates->get('headerinclude').'";'); eval('$gobutton = "'.$templates->get('gobutton').'";');
|
Zeile 862 | Zeile 875 |
---|
if(is_banned_ip($session->ipaddress, true)) { if($mybb->user['uid'])
|
if(is_banned_ip($session->ipaddress, true)) { if($mybb->user['uid'])
|
{
| {
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip)." OR uid='{$mybb->user['uid']}'");
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip)." OR uid='{$mybb->user['uid']}'");
|
} else {
| } else {
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip));
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip));
|
}
| }
|
error($lang->error_banned); }
|
error($lang->error_banned); }
|
|
|
$closed_bypass = array( 'member.php' => array( 'login',
| $closed_bypass = array( 'member.php' => array( 'login',
|
Zeile 885 | Zeile 898 |
---|
if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['canviewboardclosed'] != 1 && !in_array($current_page, $closed_bypass) && (!is_array($closed_bypass[$current_page]) || !in_array($mybb->get_input('action'), $closed_bypass[$current_page]))) { // Show error
|
if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['canviewboardclosed'] != 1 && !in_array($current_page, $closed_bypass) && (!is_array($closed_bypass[$current_page]) || !in_array($mybb->get_input('action'), $closed_bypass[$current_page]))) { // Show error
|
| if(!$mybb->settings['boardclosed_reason']) { $mybb->settings['boardclosed_reason'] = $lang->boardclosed_reason; }
|
$lang->error_boardclosed .= "<blockquote>{$mybb->settings['boardclosed_reason']}</blockquote>";
|
$lang->error_boardclosed .= "<blockquote>{$mybb->settings['boardclosed_reason']}</blockquote>";
|
error($lang->error_boardclosed);
| if(!$mybb->get_input('modal')) { error($lang->error_boardclosed); } else { $output = ''; eval('$output = "'.$templates->get('global_board_offline_modal', 1, 0).'";'); echo($output); }
|
exit; }
| exit; }
|
Zeile 931 | Zeile 959 |
---|
} else {
|
} else {
|
$condition = "uid = '".$mybb->get_input('referrer', 1)."'";
| $condition = "uid = '".$mybb->get_input('referrer', MyBB::INPUT_INT)."'";
|
}
$query = $db->simple_select('users', 'uid', $condition, array('limit' => 1));
| }
$query = $db->simple_select('users', 'uid', $condition, array('limit' => 1));
|