diff options
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_activate.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_attachments.php | 1 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_confirm.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 7 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_login_link.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 1 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 13 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_options.php | 6 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewfolder.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 7 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 47 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 7 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_remind.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_zebra.php | 2 | 
15 files changed, 61 insertions, 47 deletions
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index 5bfb688d3a..00044340df 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -30,7 +30,7 @@ class ucp_activate  	function main($id, $mode)  	{  		global $config, $phpbb_root_path, $phpEx, $request; -		global $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $phpbb_dispatcher; +		global $db, $user, $auth, $phpbb_container, $phpbb_log, $phpbb_dispatcher;  		$user_id = $request->variable('u', 0);  		$key = $request->variable('k', ''); diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index b8cb3c4100..66c3109b3d 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -36,7 +36,6 @@ class ucp_attachments  		$sort_dir	= $request->variable('sd', 'a');  		$delete		= (isset($_POST['delete'])) ? true : false; -		$confirm	= (isset($_POST['confirm'])) ? true : false;  		$delete_ids	= array_keys($request->variable('attachment', array(0)));  		if ($delete && sizeof($delete_ids)) diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index 403f7d37d0..cdf4de65fd 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -36,7 +36,7 @@ class ucp_confirm  	function main($id, $mode)  	{ -		global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container, $request; +		global $config, $phpbb_container, $request;  		$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);  		$captcha->init($request->variable('type', 0)); diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 2746e74ffe..1273ea9723 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -38,8 +38,6 @@ class ucp_groups  		$mark_ary	= $request->variable('mark', array(0));  		$submit		= $request->variable('submit', false, false, \phpbb\request\request_interface::POST); -		$delete		= $request->variable('delete', false, false, \phpbb\request\request_interface::POST); -		$error = $data = array();  		/** @var \phpbb\group\helper $group_helper */  		$group_helper = $phpbb_container->get('group_helper'); @@ -462,11 +460,8 @@ class ucp_groups  							trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);  						} -						$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;  						$user->add_lang(array('acp/groups', 'acp/common')); -						$data = $submit_ary = array(); -  						$update	= (isset($_POST['update'])) ? true : false;  						$error = array(); @@ -535,7 +530,6 @@ class ucp_groups  							{  								// Handle avatar  								$driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', '')); -								$config_name = preg_replace('#^avatar\.driver.#', '', $driver_name);  								if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))  								{ @@ -624,7 +618,6 @@ class ucp_groups  						}  						else if (!$group_id)  						{ -							$group_name = $request->variable('group_name', '', true);  							$group_desc_data = array(  								'text'			=> '',  								'allow_bbcode'	=> true, diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php index 902fbaafcf..f4d47e30bb 100644 --- a/phpBB/includes/ucp/ucp_login_link.php +++ b/phpBB/includes/ucp/ucp_login_link.php @@ -99,7 +99,7 @@ class ucp_login_link  					else  					{  						// Finish login -						$result = $user->session_create($login_result['user_row']['user_id'], false, false, true); +						$user->session_create($login_result['user_row']['user_id'], false, false, true);  						// Perform a redirect as the account has been linked  						$this->perform_redirect(); @@ -182,7 +182,7 @@ class ucp_login_link  	*/  	protected function process_login_result($result)  	{ -		global $config, $request, $template, $user, $phpbb_container; +		global $config, $template, $user, $phpbb_container;  		$login_error = null; diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 036025e84e..217d46b767 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -221,7 +221,6 @@ class ucp_main  					{  						$forums = array_keys($request->variable('f', array(0 => 0)));  						$topics = array_keys($request->variable('t', array(0 => 0))); -						$msg = '';  						if (sizeof($forums) || sizeof($topics))  						{ diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 024a9c332f..e707c251fe 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -598,7 +598,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())  		$enable_urls	= true;  	} -	$enable_magic_url = $drafts = false; +	$drafts = false;  	// User own some drafts?  	if ($auth->acl_get('u_savedrafts') && $action != 'delete') @@ -739,16 +739,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())  		$enable_urls 		= (isset($_POST['disable_magic_url'])) ? 0 : 1;  		$enable_sig			= (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false); -		if ($submit) -		{ -			$status_switch	= (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1); -			$status_switch = ($status_switch != $check_value); -		} -		else -		{ -			$status_switch = 1; -		} -  		// Parse Attachments - before checksum is calculated  		$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true); @@ -1062,7 +1052,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())  		}  		// Now Build the address list -		$plain_address_field = '';  		foreach ($address_list as $type => $adr_ary)  		{  			foreach ($adr_ary as $id => $field) diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index 2ccd4a7728..2458c4118d 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))  */  function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)  { -	global $phpbb_root_path, $phpEx, $user, $template, $auth, $config, $db, $request; +	global $phpbb_root_path, $phpEx, $user, $template, $config, $db, $request;  	$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=options"); @@ -80,7 +80,6 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit  		if (check_form_key('ucp_pm_options'))  		{  			$folder_name = $request->variable('foldername', '', true); -			$msg = '';  			if ($folder_name)  			{ @@ -611,7 +610,7 @@ function define_check_option($hardcoded, $check_option, $check_lang)  */  function define_action_option($hardcoded, $action_option, $action_lang, $folder)  { -	global $db, $template, $user; +	global $template;  	$l_action = $s_action_options = '';  	if ($hardcoded) @@ -722,7 +721,6 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule  	// Define Condition  	$condition = $global_rule_conditions[$rule_option]; -	$current_value = '';  	switch ($condition)  	{ diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index e88e40a1cb..af2126c83d 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -41,9 +41,6 @@ function view_folder($id, $mode, $folder_id, $folder)  		$color_rows = array('marked', 'replied'); -		// only show the friend/foe color rows if the module is enabled -		$zebra_enabled = false; -  		$_module = new p_master();  		$_module->list_modules('ucp');  		$_module->set_active('zebra'); diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 3de3410ea8..2457ea9a2e 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))  */  function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)  { -	global $user, $template, $auth, $db, $cache, $phpbb_container; +	global $user, $template, $auth, $db, $phpbb_container;  	global $phpbb_root_path, $request, $phpEx, $config, $phpbb_dispatcher;  	$user->add_lang(array('viewtopic', 'memberlist')); @@ -50,9 +50,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)  		trigger_error('NO_AUTH_READ_HOLD_MESSAGE');  	} -	// Grab icons -	$icons = $cache->obtain_icons(); -  	// Load the custom profile fields  	if ($config['load_cpf_pm'])  	{ @@ -357,7 +354,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)  */  function get_user_information($user_id, $user_row)  { -	global $db, $auth, $user, $cache; +	global $db, $auth, $user;  	global $phpbb_root_path, $phpEx, $config;  	if (!$user_id) diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 215a870007..c2aa910ed0 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -29,7 +29,7 @@ class ucp_prefs  	function main($id, $mode)  	{ -		global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $request; +		global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $request;  		$submit = (isset($_POST['submit'])) ? true : false;  		$error = $data = array(); @@ -86,7 +86,7 @@ class ucp_prefs  					}  					$error = array_merge(validate_data($data, array( -						'dateformat'	=> array('string', false, 1, 30), +						'dateformat'	=> array('string', false, 1, 64),  						'lang'			=> array('language_iso_name'),  						'tz'			=> array('timezone'),  					)), $error); @@ -368,6 +368,49 @@ class ucp_prefs  					${'s_sort_' . $sort_option . '_dir'} .= '</select>';  				} +				/** +				* Run code before view form is displayed +				* +				* @event core.ucp_prefs_view_after +				* @var	bool	submit				Do we display the form only +				*									or did the user press submit +				* @var	array	data				Array with current ucp options data +				* @var	array	sort_dir_text		Array with sort dir language strings +				* @var	array	limit_topic_days	Topic ordering options +				* @var	array	sort_by_topic_text	Topic ordering language strings +				* @var	array	sort_by_topic_sql	Topic ordering sql +				* @var	array	limit_post_days		Post ordering options +				* @var	array	sort_by_post_text	Post ordering language strings +				* @var	array	sort_by_post_sql	Post ordering sql +				* @var	array	_options			Sort options +				* @var	string	s_limit_topic_days	Sort limit topic by days select box +				* @var	string	s_sort_topic_key	Sort topic key select box +				* @var	string	s_sort_topic_dir	Sort topic dir select box +				* @var	string	s_limit_post_days	Sort limit post by days select box +				* @var	string	s_sort_post_key		Sort post key select box +				* @var	string	s_sort_post_dir		Sort post dir select box +				* @since 3.1.8-RC1 +				*/ +				$vars = array( +					'submit', +					'data', +					'sort_dir_text', +					'limit_topic_days', +					'sort_by_topic_text', +					'sort_by_topic_sql', +					'limit_post_days', +					'sort_by_post_text', +					'sort_by_post_sql', +					'_options', +					's_limit_topic_days', +					's_sort_topic_key', +					's_sort_topic_dir', +					's_limit_post_days', +					's_sort_post_key', +					's_sort_post_dir', +				); +				extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_view_after', compact($vars))); +  				$template->assign_vars(array(  					'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '', diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index f6e9acc8c4..4ac8e0f17d 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -31,13 +31,12 @@ class ucp_profile  	function main($id, $mode)  	{ -		global $cache, $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx; +		global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;  		global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;  		$user->add_lang('posting');  		$submit		= $request->variable('submit', false, false, \phpbb\request\request_interface::POST); -		$delete		= $request->variable('delete', false, false, \phpbb\request\request_interface::POST);  		$error = $data = array();  		$s_hidden_fields = ''; @@ -430,7 +429,6 @@ class ucp_profile  						$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';  						$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";  					} -					$s_birthday_year_options = '';  					$now = getdate();  					$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>'; diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 4f9639114f..1b62790700 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -29,7 +29,7 @@ class ucp_register  	function main($id, $mode)  	{ -		global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx; +		global $config, $db, $user, $template, $phpbb_root_path, $phpEx;  		global $request, $phpbb_container, $phpbb_dispatcher;  		// @@ -484,7 +484,6 @@ class ucp_register  			$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());  		}  		$s_hidden_fields = build_hidden_fields($s_hidden_fields); -		$confirm_image = '';  		// Visual Confirmation - Show images  		if ($config['enable_confirm']) @@ -507,7 +506,9 @@ class ucp_register  			break;  		} -		$timezone_selects = phpbb_timezone_select($template, $user, $data['tz'], true); +		// Assign template vars for timezone select +		phpbb_timezone_select($template, $user, $data['tz'], true); +  		$template->assign_vars(array(  			'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',  			'USERNAME'			=> $data['username'], diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 2342aa2137..0a46674fb1 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -30,7 +30,7 @@ class ucp_remind  	function main($id, $mode)  	{  		global $config, $phpbb_root_path, $phpEx, $request; -		global $db, $user, $auth, $template, $phpbb_container; +		global $db, $user, $template, $phpbb_container;  		if (!$config['allow_password_reset'])  		{ diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index d4e7e70247..fa6a03f87c 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -25,7 +25,7 @@ class ucp_zebra  	function main($id, $mode)  	{ -		global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher; +		global $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;  		$submit	= (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;  		$s_hidden_fields = '';  | 
