diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/acp/acp_database.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 8 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_styles.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/constants.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/functions.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/functions_convert.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/startup.php | 6 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_notifications.php | 14 | 
8 files changed, 24 insertions, 16 deletions
| diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index c5aebf011d..9666ac5b6e 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -1558,7 +1558,7 @@ class mssql_extractor extends base_extractor  		{  			$this->write_data_mssql($table_name);  		} -		else if($db->get_sql_layer() === 'mssqlnative') +		else if ($db->get_sql_layer() === 'mssqlnative')  		{  			$this->write_data_mssqlnative($table_name);  		} diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index 0c9bc0deab..193483050c 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -76,7 +76,7 @@ class acp_extensions  			{  				$md_manager->get_metadata('all');  			} -			catch(\phpbb\extension\exception $e) +			catch (\phpbb\extension\exception $e)  			{  				trigger_error($e, E_USER_WARNING);  			} @@ -352,7 +352,7 @@ class acp_extensions  				$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;  				$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));  			} -			catch(\phpbb\extension\exception $e) +			catch (\phpbb\extension\exception $e)  			{  				$this->template->assign_block_vars('disabled', array(  					'META_DISPLAY_NAME'		=> $this->user->lang('EXTENSION_INVALID_LIST', $name, $e), @@ -408,7 +408,7 @@ class acp_extensions  				$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;  				$disabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));  			} -			catch(\phpbb\extension\exception $e) +			catch (\phpbb\extension\exception $e)  			{  				$this->template->assign_block_vars('disabled', array(  					'META_DISPLAY_NAME'		=> $this->user->lang('EXTENSION_INVALID_LIST', $name, $e), @@ -467,7 +467,7 @@ class acp_extensions  				$available_extension_meta_data[$name]['S_VERSIONCHECK'] = true;  				$available_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));  			} -			catch(\phpbb\extension\exception $e) +			catch (\phpbb\extension\exception $e)  			{  				$this->template->assign_block_vars('disabled', array(  					'META_DISPLAY_NAME'		=> $this->user->lang('EXTENSION_INVALID_LIST', $name, $e), diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 6bd27a8bca..a36a6c1ecd 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -995,7 +995,7 @@ class acp_styles  		// Assign template variables  		$this->template->assign_block_vars('styles_list', $row); -		foreach($actions as $action) +		foreach ($actions as $action)  		{  			$this->template->assign_block_vars('styles_list.actions', $action);  		} diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index d686588802..62e5fe7a0a 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))  */  // phpBB Version -define('PHPBB_VERSION', '3.1.5'); +define('PHPBB_VERSION', '3.1.6-dev');  // QA-related  // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 705222d66b..f048eb549c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1258,6 +1258,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $  		{  			$forum_id = array($forum_id);  		} +		else +		{ +			$forum_id = array_unique($forum_id); +		}  		$phpbb_notifications = $phpbb_container->get('notification_manager'); diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 61ab4721c4..b380273f0c 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -966,7 +966,7 @@ function get_remote_avatar_dim($src, $axis)  	$protocol = (isset($url_info['scheme'])) ? $url_info['scheme'] : 'http';  	if (empty($port))  	{ -		switch(strtolower($protocol)) +		switch (strtolower($protocol))  		{  			case 'ftp':  				$port = 21; diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index 2885c80541..7353b90d99 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -94,7 +94,11 @@ if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))  }  else  { -	@set_magic_quotes_runtime(0); +	if (get_magic_quotes_runtime()) +	{ +		// Deactivate +		@set_magic_quotes_runtime(0); +	}  	// Be paranoid with passed vars  	if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get')) diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index b0aeaba227..66dc651447 100644 --- a/phpBB/includes/ucp/ucp_notifications.php +++ b/phpBB/includes/ucp/ucp_notifications.php @@ -52,11 +52,11 @@ class ucp_notifications  					$notification_methods = $phpbb_notifications->get_subscription_methods(); -					foreach($phpbb_notifications->get_subscription_types() as $group => $subscription_types) +					foreach ($phpbb_notifications->get_subscription_types() as $group => $subscription_types)  					{ -						foreach($subscription_types as $type => $data) +						foreach ($subscription_types as $type => $data)  						{ -							foreach($notification_methods as $method => $method_data) +							foreach ($notification_methods as $method => $method_data)  							{  								if ($request->is_set_post(str_replace('.', '_', $type . '_' . $method_data['id'])) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type])))  								{ @@ -180,13 +180,13 @@ class ucp_notifications  	{  		$notification_methods = $phpbb_notifications->get_subscription_methods(); -		foreach($phpbb_notifications->get_subscription_types() as $group => $subscription_types) +		foreach ($phpbb_notifications->get_subscription_types() as $group => $subscription_types)  		{  			$template->assign_block_vars($block, array(  				'GROUP_NAME'	=> $user->lang($group),  			)); -			foreach($subscription_types as $type => $data) +			foreach ($subscription_types as $type => $data)  			{  				$template->assign_block_vars($block, array(  					'TYPE'				=> $type, @@ -197,7 +197,7 @@ class ucp_notifications  					'SUBSCRIBED'		=> (isset($subscriptions[$type])) ? true : false,  				)); -				foreach($notification_methods as $method => $method_data) +				foreach ($notification_methods as $method => $method_data)  				{  					$template->assign_block_vars($block . '.notification_methods', array(  						'METHOD'			=> $method_data['id'], @@ -227,7 +227,7 @@ class ucp_notifications  	{  		$notification_methods = $phpbb_notifications->get_subscription_methods(); -		foreach($notification_methods as $method => $method_data) +		foreach ($notification_methods as $method => $method_data)  		{  			$template->assign_block_vars($block, array(  				'METHOD'			=> $method_data['id'], | 
