diff options
| -rw-r--r-- | phpBB/includes/functions.php | 29 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_options.php | 6 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/overall_header.html | 2 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/simple_header.html | 2 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/viewtopic_body.html | 2 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/theme/content.css | 4 | ||||
| -rw-r--r-- | phpBB/styles/subsilver2/template/overall_header.html | 2 | ||||
| -rw-r--r-- | phpBB/styles/subsilver2/template/simple_header.html | 2 | ||||
| -rw-r--r-- | phpBB/viewforum.php | 11 | ||||
| -rw-r--r-- | phpBB/viewonline.php | 19 | ||||
| -rw-r--r-- | phpBB/viewtopic.php | 2 | 
11 files changed, 49 insertions, 32 deletions
| diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index df613682a7..64959a05f3 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2576,15 +2576,17 @@ function add_form_key($form_name)  }  /** -* Check the form key. Required for all altering actions not secured by confirm_box -* @param string  $form_name The name of the form; has to match the name used in add_form_key, otherwise no restrictions apply -* @param int $timespan The maximum acceptable age for a submitted form in seconds. Defaults to the config setting. -* @param string $return_page The address for the return link -* @param bool $trigger If true, the function will triger an error when encountering an invalid form -*/ -function check_form_key($form_name, $timespan = false, $return_page = '', $trigger = false) + * Check the form key. Required for all altering actions not secured by confirm_box + * + * @param	string	$form_name	The name of the form; has to match the name used + *								in add_form_key, otherwise no restrictions apply + * @param	int		$timespan	The maximum acceptable age for a submitted form + *								in seconds. Defaults to the config setting. + * @return	bool	True, if the form key was valid, false otherwise + */ +function check_form_key($form_name, $timespan = false)  { -	global $config, $user; +	global $config, $request, $user;  	if ($timespan === false)  	{ @@ -2592,10 +2594,10 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg  		$timespan = ($config['form_token_lifetime'] == -1) ? -1 : max(30, $config['form_token_lifetime']);  	} -	if (isset($_POST['creation_time']) && isset($_POST['form_token'])) +	if ($request->is_set_post('creation_time') && $request->is_set_post('form_token'))  	{ -		$creation_time	= abs(request_var('creation_time', 0)); -		$token = request_var('form_token', ''); +		$creation_time	= abs($request->variable('creation_time', 0)); +		$token = $request->variable('form_token', '');  		$diff = time() - $creation_time; @@ -2612,11 +2614,6 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg  		}  	} -	if ($trigger) -	{ -		trigger_error($user->lang['FORM_INVALID'] . $return_page); -	} -  	return false;  } diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index 353bfdc7ec..d1fc9d2c62 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -32,7 +32,11 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit  	// Change "full folder" setting - what to do if folder is full  	if (isset($_POST['fullfolder']))  	{ -		check_form_key('ucp_pm_options', $config['form_token_lifetime'], $redirect_url); +		if (!check_form_key('ucp_pm_options')) +		{ +			trigger_error('FORM_INVALID'); +		} +  		$full_action = request_var('full_action', 0);  		$set_folder_id = 0; diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 076a3160f0..1ea5b0973c 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -3,8 +3,6 @@  <head>  <meta charset="utf-8">  <meta name="viewport" content="width=device-width" /> -<meta name="keywords" content="" /> -<meta name="description" content="" />  {META}  <title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title> diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 610e5d5582..6d22a074be 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -3,8 +3,6 @@  <head>  <meta charset="utf-8">  <meta name="viewport" content="width=device-width" /> -<meta name="keywords" content="" /> -<meta name="description" content="" />  {META}  <title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 7ed8569798..5c8879af88 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -137,7 +137,7 @@  			<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd class="profile-rank">{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF --> -		<!-- IF postrow.POSTER_POSTS != '' --><dd class="profile-posts"><strong>{L_POSTS}{L_COLON}</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF --> +		<!-- IF postrow.POSTER_POSTS != '' --><dd class="profile-posts"><strong>{L_POSTS}{L_COLON}</strong> <!-- IF postrow.U_SEARCH !== '' --><a href="{postrow.U_SEARCH}"><!-- ENDIF -->{postrow.POSTER_POSTS}<!-- IF postrow.U_SEARCH !== '' --></a><!-- ENDIF --></dd><!-- ENDIF -->  		<!-- IF postrow.POSTER_JOINED --><dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->  		<!-- IF postrow.POSTER_WARNINGS --><dd class="profile-warnings"><strong>{L_WARNINGS}{L_COLON}</strong> {postrow.POSTER_WARNINGS}</dd><!-- ENDIF --> diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index fa23a665f1..9388496c53 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -736,6 +736,10 @@ fieldset.polls dd div {  	max-width: 100%;  } +.postprofile .profile-posts a { +	font-weight: normal; +} +  dd.profile-warnings {  	font-weight: bold;  } diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index ebb7b3be4d..4741154889 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -2,8 +2,6 @@  <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">  <head>  <meta charset="utf-8"> -<meta name="keywords" content="" /> -<meta name="description" content="" />  {META}  <title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title> diff --git a/phpBB/styles/subsilver2/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html index 0c3dff4a05..d292c4594a 100644 --- a/phpBB/styles/subsilver2/template/simple_header.html +++ b/phpBB/styles/subsilver2/template/simple_header.html @@ -2,8 +2,6 @@  <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">  <head>  <meta charset="utf-8"> -<meta name="keywords" content="" /> -<meta name="description" content="" />  {META}  <title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 9ecbdea77a..d186d468df 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -251,7 +251,7 @@ $s_watching_forum = array(  	'is_watching'	=> false,  ); -if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_subscribe', $forum_id) || $user->data['user_id'] == ANONYMOUS)) +if ($config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_subscribe', $forum_id) || $user->data['user_id'] == ANONYMOUS))  {  	$notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL;  	watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0, $notify_status, $start, $forum_data['forum_name']); @@ -392,10 +392,15 @@ $sql_array = array(  * Event to modify the SQL query before the topic data is retrieved  *  * @event core.viewforum_get_topic_data -* @var	array	sql_array		The SQL array to get the data of all topics +* @var	array	forum_data			Array with forum data +* @var	array	sql_array			The SQL array to get the data of all topics  * @since 3.1.0-a1 +* @change 3.1.0-RC4 Added forum_data var   */ -$vars = array('sql_array'); +$vars = array( +	'forum_data', +	'sql_array', +);  extract($phpbb_dispatcher->trigger_event('core.viewforum_get_topic_data', compact($vars)));  $sql_approved = ' AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'); diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index a03a81a15e..9589fb54e2 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -372,7 +372,7 @@ while ($row = $db->sql_fetchrow($result))  	$vars = array('on_page', 'row', 'location', 'location_url', 'forum_data');  	extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars))); -	$template->assign_block_vars('user_row', array( +	$template_row = array(  		'USERNAME' 			=> $row['username'],  		'USERNAME_COLOUR'	=> $row['user_colour'],  		'USERNAME_FULL'		=> $username_full, @@ -389,7 +389,22 @@ while ($row = $db->sql_fetchrow($result))  		'S_USER_HIDDEN'		=> $s_user_hidden,  		'S_GUEST'			=> ($row['user_id'] == ANONYMOUS) ? true : false,  		'S_USER_TYPE'		=> $row['user_type'], -	)); +	); + +	/** +	* Modify viewonline template data before it is displayed in the list +	* +	* @event core.viewonline_modify_user_row +	* @var	array	on_page			File name and query string +	* @var	array	row				Array with the users sql row +	* @var	array	forum_data		Array with forum data +	* @var	array	template_row	Array with template variables for the user row +	* @since 3.1.0-RC4 +	*/ +	$vars = array('on_page', 'row', 'forum_data', 'template_row'); +	extract($phpbb_dispatcher->trigger_event('core.viewonline_modify_user_row', compact($vars))); + +	$template->assign_block_vars('user_row', $template_row);  }  $db->sql_freeresult($result);  unset($prev_id, $prev_ip); diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3c837bd136..f8b4a54f05 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -449,7 +449,7 @@ $s_watching_topic = array(  	'is_watching'	=> false,  ); -if (($config['email_enable'] || $config['jab_enable']) && $config['allow_topic_notify']) +if ($config['allow_topic_notify'])  {  	$notify_status = (isset($topic_data['notify_status'])) ? $topic_data['notify_status'] : null;  	watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $notify_status, $start, $topic_data['topic_title']); | 
