diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions.php | 12 | ||||
| -rw-r--r-- | phpBB/includes/functions_admin.php | 16 | ||||
| -rw-r--r-- | phpBB/includes/functions_module.php | 2 | 
3 files changed, 23 insertions, 7 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ebd676b17a..aa868c5431 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2679,7 +2679,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo  	}  	else  	{ -		page_header(((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]), false); +		page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);  	}  	$template->set_filenames(array( @@ -2956,7 +2956,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa  		'PASSWORD_CREDENTIAL'	=> ($admin) ? 'password_' . $credential : 'password',  	)); -	page_header($user->lang['LOGIN'], false); +	page_header($user->lang['LOGIN']);  	$template->set_filenames(array(  		'body' => 'login_body.html') @@ -3032,7 +3032,7 @@ function login_forum_box($forum_data)  		$template->assign_var('LOGIN_ERROR', $user->lang['WRONG_PASSWORD']);  	} -	page_header($user->lang['LOGIN'], false); +	page_header($user->lang['LOGIN']);  	$template->assign_vars(array(  		'FORUM_NAME'			=> isset($forum_data['forum_name']) ? $forum_data['forum_name'] : '', @@ -3945,7 +3945,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)  				}  				else  				{ -					page_header($msg_title, false); +					page_header($msg_title);  				}  			} @@ -4622,7 +4622,7 @@ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null)  /**  * Generate page header  */ -function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum') +function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum')  {  	global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;  	global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path; @@ -4883,7 +4883,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0  		'U_SEARCH_UNREAD'		=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unreadposts'),  		'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),  		'U_DELETE_COOKIES'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'), -		'U_TEAM'				=> ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'), +		'U_TEAM'				=> ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),  		'U_TERMS_USE'			=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),  		'U_PRIVACY'				=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),  		'U_RESTORE_PERMISSIONS'	=> ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index b31b268db7..81a381b326 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2920,8 +2920,24 @@ function get_database_size()  		case 'mssql':  		case 'mssql_odbc':  		case 'mssqlnative': +			$sql = 'SELECT @@VERSION AS mssql_version'; +			$result = $db->sql_query($sql); +			$row = $db->sql_fetchrow($result); +			$db->sql_freeresult($result); +			  			$sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize  				FROM sysfiles'; + +			if ($row) +			{ +				// Azure stats are stored elsewhere +				if (strpos($row['mssql_version'], 'SQL Azure') !== false) +				{ +					$sql = 'SELECT ((SUM(reserved_page_count) * 8.0) * 1024.0) as dbsize  +					FROM sys.dm_db_partition_stats'; +				} +			} +  			$result = $db->sql_query($sql, 7200);  			$database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false;  			$db->sql_freeresult($result); diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index e043883145..ef2e009a6e 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -956,7 +956,7 @@ class p_master  	/**  	* Display module  	*/ -	function display($page_title, $display_online_list = true) +	function display($page_title, $display_online_list = false)  	{  		global $template, $user;  | 
