diff options
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 6 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 30 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 6 | 
5 files changed, 15 insertions, 32 deletions
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 94fd59433b..615b567134 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -642,7 +642,7 @@ class ucp_main  	*/  	function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())  	{ -		global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx; +		global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container;  		$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;  		$start = request_var('start', 0); @@ -768,6 +768,8 @@ class ucp_main  			}  		} +		$phpbb_content_visibility = $phpbb_container->get('content.visibility'); +  		foreach ($topic_list as $topic_id)  		{  			$row = &$rowset[$topic_id]; @@ -778,7 +780,7 @@ class ucp_main  			$unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;  			// Replies -			$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; +			$replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;  			if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id']))  			{ diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index b7d2dd6821..c7b4489daf 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,17 +76,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)  	$user_info = get_user_information($author_id, $message_row);  	// Parse the message and subject -	$message = censor_text($message_row['message_text']); - -	// Second parse bbcode here -	if ($message_row['bbcode_bitfield']) -	{ -		$bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']); -	} - -	// Always process smilies after parsing bbcodes -	$message = bbcode_nl2br($message); -	$message = smiley_text($message); +	$parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; +	$message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true);  	// Replace naughty words such as farty pants  	$message_row['message_subject'] = censor_text($message_row['message_subject']); @@ -160,21 +151,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)  	// End signature parsing, only if needed  	if ($signature)  	{ -		$signature = censor_text($signature); - -		if ($user_info['user_sig_bbcode_bitfield']) -		{ -			if ($bbcode === false) -			{ -				include($phpbb_root_path . 'includes/bbcode.' . $phpEx); -				$bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']); -			} - -			$bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']); -		} - -		$signature = bbcode_nl2br($signature); -		$signature = smiley_text($signature); +		$parse_flags = ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; +		$signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], $parse_flags, true);  	}  	$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 7c3286c1d1..f24578da84 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -267,7 +267,7 @@ class ucp_prefs  				$limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);  				$sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); -				$sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); +				$sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_posts_approved', 's' => 't.topic_title', 'v' => 't.topic_views');  				// Post ordering options  				$limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 55df5f610c..e55569fdd5 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -546,6 +546,9 @@ class ucp_profile  				// Build custom bbcodes array  				display_custom_bbcodes(); +				// Generate smiley listing +				generate_smilies('inline', 0); +  			break;  			case 'avatar': diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 70fbfe46fb..7bc7ac8191 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -38,7 +38,7 @@ class ucp_register  		include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);  		$coppa			= $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false; -		$agreed			= (int) $request->variable('agreed', false); +		$agreed			= $request->variable('agreed', false);  		$submit			= $request->is_set_post('submit');  		$change_lang	= request_var('change_lang', '');  		$user_lang		= request_var('lang', $user->lang_name); @@ -63,7 +63,7 @@ class ucp_register  					$submit = false;  					// Setting back agreed to let the user view the agreement in his/her language -					$agreed = ($request->variable('change_lang', false)) ? 0 : $agreed; +					$agreed = false;  				}  				$user->lang_name = $user_lang = $use_lang; @@ -89,7 +89,7 @@ class ucp_register  			$add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : '';  			$s_hidden_fields = array( -				'change_lang'	=> $change_lang, +				'change_lang'	=> '',  			);  			// If we change the language, we want to pass on some more possible parameter.  | 
