Vergleich global.php - 1.8.19 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 350Zeile 350
					$id = (int) my_substr($query_string, 11);
$query = $db->simple_select("themestylesheets", "name", "sid={$id}");
$real_name = $db->fetch_field($query, "name");

					$id = (int) my_substr($query_string, 11);
$query = $db->simple_select("themestylesheets", "name", "sid={$id}");
$real_name = $db->fetch_field($query, "name");

					$theme_stylesheets[$real_name] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";

					$theme_stylesheets[$real_name] = $id;

				}
else
{

				}
else
{

Zeile 363Zeile 363
	}
}
unset($actions);

	}
}
unset($actions);

 

$css_php_script_stylesheets = array();


if(!empty($theme_stylesheets) && is_array($theme['disporder']))
{
foreach($theme['disporder'] as $style_name => $order)
{
if(!empty($theme_stylesheets[$style_name]))


if(!empty($theme_stylesheets) && is_array($theme['disporder']))
{
foreach($theme['disporder'] as $style_name => $order)
{
if(!empty($theme_stylesheets[$style_name]))

		{
$stylesheets .= $theme_stylesheets[$style_name];
}
}
}

















		{
if(is_int($theme_stylesheets[$style_name]))
{
$css_php_script_stylesheets[] = $theme_stylesheets[$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=\"{$sheet}\" />\n";
}


// Are we linking to a remote theme server?
if(my_validate_url($theme['imgdir']))
{
// If a language directory for the current language exists within the theme - we use it
if(!empty($mybb->user['language']))


// Are we linking to a remote theme server?
if(my_validate_url($theme['imgdir']))
{
// If a language directory for the current language exists within the theme - we use it
if(!empty($mybb->user['language']))

	{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}

	{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}

	else
{
// Check if a custom language directory exists for this theme
if(!empty($mybb->settings['bblanguage']))
{

	else
{
// Check if a custom language directory exists for this theme
if(!empty($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'].'/'.$mybb->settings['bblanguage'];
}
// Otherwise, the image language directory is the same as the language directory for the theme
else
{

			$theme['imglangdir'] = $theme['imgdir'];
}
}

			$theme['imglangdir'] = $theme['imgdir'];
}
}

Zeile 400Zeile 418
else
{
$img_directory = $theme['imgdir'];

else
{
$img_directory = $theme['imgdir'];





	if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath']))

	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';

		$img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($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']))


// 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']))

Zeile 436Zeile 454

// Theme logo - is it a relative URL to the forum root? Append bburl
if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != '/')


// Theme logo - is it a relative URL to the forum root? Append bburl
if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != '/')

{

{

	$theme['logo'] = $mybb->get_asset_url($theme['logo']);
}


	$theme['logo'] = $mybb->get_asset_url($theme['logo']);
}


Zeile 454Zeile 472
$templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,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 .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_mixer_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed,debug_summary";

$templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,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 .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_mixer_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed,debug_summary";

$templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smilieinsert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_themeselector,task_image,usercp_themeselector_option,php_warnings";

$templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smilieinsert_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_post,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_reason,nav_dropdown,global_remote_avatar_notice";
$templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_search,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welcomeblock_guest_login_modal_lockout";

$templatelist .= ",mycode_code,mycode_email,mycode_img,mycode_php,mycode_quote_post,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_reason,nav_dropdown,global_remote_avatar_notice";
$templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_search,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welcomeblock_guest_login_modal_lockout";

$templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie";

$templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie,modal,modal_button";

$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 636Zeile 654
	}
}


	}
}


$unreadreports = '';



$modnotice = '';
$moderation_queue = array();


// 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->usergroup['canmanagereportedcontent'] == 1)))
{

// 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->usergroup['canmanagereportedcontent'] == 1)))
{

Zeile 652Zeile 672
			if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
{
$can_access_moderationqueue = false;

			if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
{
$can_access_moderationqueue = false;

			}


			}


			require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";

// Verify if we have permissions to access forum-moderation_queue

			require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";

// Verify if we have permissions to access forum-moderation_queue

Zeile 662Zeile 682
			{
// Get admin permissions
$adminperms = get_admin_permissions($mybb->user['uid']);

			{
// Get admin permissions
$adminperms = get_admin_permissions($mybb->user['uid']);





				$permissions = forum_admin_permissions();
if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1)
{
$can_access_moderationqueue = false;

				$permissions = forum_admin_permissions();
if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1)
{
$can_access_moderationqueue = false;

				}
}
}
}
else

				}
}
}
}
else

	{
$can_access_moderationqueue = false;
}

	{
$can_access_moderationqueue = false;
}

Zeile 679Zeile 699
	if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
{
// Read the reported content cache

	if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
{
// Read the reported content cache

		$reported = $cache->read('reportedcontent');


		$reported = $cache->read('reportedcontent');


		// 0 or more reported items currently exist
if($reported['unread'] > 0)
{

		// 0 or more reported items currently exist
if($reported['unread'] > 0)
{

Zeile 688Zeile 708
			if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])
{
$unread = (int)$reported['unread'];

			if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])
{
$unread = (int)$reported['unread'];

			}
else

			}
else

			{
$unread = 0;
$query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");

			{
$unread = 0;
$query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");

Zeile 713Zeile 733
				{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, my_number_format($unread));
}

				{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, my_number_format($unread));
}


eval('$unreadreports = "'.$templates->get('global_unreadreports').'";');

				
eval('$moderation_queue[] = "'.$templates->get('global_unreadreports', 1, 0).'";');

			}
}
}

			}
}
}

}























































}

// Get awaiting moderation queue stats
if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['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 unapprovedattachments", "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->{'unapproved_'.$modqueue_type}, my_number_format(${'unapproved_'.$modqueue_type}));
}

eval('$moderation_queue[] = "'.$templates->get('global_modqueue', 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?
$charset = 'UTF-8';
if(isset($lang->settings['charset']) && $lang->settings['charset'])
{
$charset = $lang->settings['charset'];

// Got a character set?
$charset = 'UTF-8';
if(isset($lang->settings['charset']) && $lang->settings['charset'])
{
$charset = $lang->settings['charset'];

}


}


// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)

// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)

Zeile 753Zeile 826
	}

if(empty($banlift))

	}

if(empty($banlift))

	{

	{

		$banlift = $lang->unknown;
}

		$banlift = $lang->unknown;
}





	// Display a nice warning to the user
eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');
}

$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);

	// Display a nice warning to the user
eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');
}

$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);





// Check if this user has a new private message.
$pm_notice = '';
if(isset($mybb->user['pmnotice']) && $mybb->user['pmnotice'] == 2 && $mybb->user['pms_unread'] > 0 && $mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->usergroup['canview'] != 0 && ($current_page != "private.php" || $mybb->get_input('action') != "read"))

// Check if this user has a new private message.
$pm_notice = '';
if(isset($mybb->user['pmnotice']) && $mybb->user['pmnotice'] == 2 && $mybb->user['pms_unread'] > 0 && $mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->usergroup['canview'] != 0 && ($current_page != "private.php" || $mybb->get_input('action') != "read"))

Zeile 771Zeile 844
	{
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;

	{
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;

	}

	}


$query = $db->query("
SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid


$query = $db->query("
SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid

Zeile 789Zeile 862
	{
$pm['fromusername'] = $lang->mybb_engine;
$user_text = $pm['fromusername'];

	{
$pm['fromusername'] = $lang->mybb_engine;
$user_text = $pm['fromusername'];

	}

	}

	else
{
$pm['fromusername'] = htmlspecialchars_uni($pm['fromusername']);

	else
{
$pm['fromusername'] = htmlspecialchars_uni($pm['fromusername']);

Zeile 797Zeile 870
	}

if($mybb->user['pms_unread'] == 1)

	}

if($mybb->user['pms_unread'] == 1)

	{

	{

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));

	}

	}

	else
{
$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));
}
eval('$pm_notice = "'.$templates->get('global_pm_alert').'";');

	else
{
$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));
}
eval('$pm_notice = "'.$templates->get('global_pm_alert').'";');

}


}


$remote_avatar_notice = '';
if(($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars'])
{

$remote_avatar_notice = '';
if(($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars'])
{

Zeile 821Zeile 894
	{
$cache->update_awaitingactivation();
$awaitingusers = $cache->read('awaitingactivation');

	{
$cache->update_awaitingactivation();
$awaitingusers = $cache->read('awaitingactivation');

	}


	}


	if(!empty($awaitingusers['users']))

	if(!empty($awaitingusers['users']))

	{

	{

		$awaitingusers = (int)$awaitingusers['users'];

		$awaitingusers = (int)$awaitingusers['users'];

	}
else
{
$awaitingusers = 0;
}

	}
else
{
$awaitingusers = 0;
}


if($awaitingusers < 1)
{


if($awaitingusers < 1)
{

Zeile 846Zeile 919
		if($awaitingusers == 1)
{
$awaiting_message = $lang->awaiting_message_single;

		if($awaitingusers == 1)
{
$awaiting_message = $lang->awaiting_message_single;

		}

		}

		else
{
$awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);

		else
{
$awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);

Zeile 863Zeile 936
	{
$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($jsTemplates[$template]));

}

// Set up some of the default templates

}

// Set up some of the default templates

Zeile 941Zeile 1020
		$theme_redirect_url = get_current_location(true, 'theme');
eval('$theme_select = "'.$templates->get('footer_themeselect').'";');
}

		$theme_redirect_url = get_current_location(true, 'theme');
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