Browse Source

Merge pull request #1210 from Arantor/release-2.1

Clean up, an unused feature removal and a bug fix with optimisations on top
Arantor 10 years ago
parent
commit
22e34d98b0
46 changed files with 251 additions and 253 deletions
  1. 10 1
      Sources/Calendar.php
  2. 1 1
      Sources/Display.php
  3. 1 1
      Sources/ManageMaintenance.php
  4. 2 2
      Sources/ManageMembers.php
  5. 1 1
      Sources/ManageSearchEngines.php
  6. 1 1
      Sources/ManageSmileys.php
  7. 1 1
      Sources/Profile.php
  8. 30 33
      Sources/Recent.php
  9. 10 7
      Sources/Subs.php
  10. 28 28
      Themes/default/Admin.template.php
  11. 2 2
      Themes/default/BoardIndex.template.php
  12. 7 7
      Themes/default/Calendar.template.php
  13. 6 6
      Themes/default/ManageBoards.template.php
  14. 4 4
      Themes/default/ManageCalendar.template.php
  15. 1 1
      Themes/default/ManageLanguages.template.php
  16. 2 2
      Themes/default/ManageMaintenance.template.php
  17. 10 10
      Themes/default/ManageMembergroups.template.php
  18. 5 5
      Themes/default/ManageMembers.template.php
  19. 14 14
      Themes/default/ManagePaid.template.php
  20. 2 2
      Themes/default/ManagePermissions.template.php
  21. 4 6
      Themes/default/ManageScheduledTasks.template.php
  22. 1 1
      Themes/default/ManageSearch.template.php
  23. 13 13
      Themes/default/ManageSmileys.template.php
  24. 1 1
      Themes/default/MessageIndex.template.php
  25. 2 2
      Themes/default/MoveTopic.template.php
  26. 3 3
      Themes/default/Packages.template.php
  27. 15 14
      Themes/default/PersonalMessage.template.php
  28. 6 6
      Themes/default/Post.template.php
  29. 42 42
      Themes/default/Profile.template.php
  30. 2 2
      Themes/default/Register.template.php
  31. 2 2
      Themes/default/Search.template.php
  32. 0 4
      Themes/default/Settings.template.php
  33. 2 2
      Themes/default/SplitTopics.template.php
  34. 7 7
      Themes/default/Themes.template.php
  35. 2 2
      Themes/default/Who.template.php
  36. 5 5
      Themes/default/index.template.php
  37. 0 1
      Themes/default/languages/ManageScheduledTasks.english.php
  38. 0 1
      Themes/default/languages/Themes.english.php
  39. 3 3
      other/install.php
  40. 0 1
      other/install_2-1_mysql.sql
  41. 0 1
      other/install_2-1_postgresql.sql
  42. 0 1
      other/install_2-1_sqlite.sql
  43. 0 1
      other/install_2-1_sqlite3.sql
  44. 1 1
      other/upgrade_2-1_mysql.sql
  45. 1 1
      other/upgrade_2-1_postgresql.sql
  46. 1 1
      other/upgrade_2-1_sqlite.sql

+ 10 - 1
Sources/Calendar.php

@@ -29,7 +29,7 @@ if (!defined('SMF'))
  */
 function CalendarMain()
 {
-	global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;
+	global $txt, $context, $modSettings, $scripturl, $options, $sourcedir, $user_info;
 
 	// Permissions, permissions, permissions.
 	isAllowedTo('calendar_view');
@@ -126,6 +126,15 @@ function CalendarMain()
 		$context['calendar_grid_next'] = getCalendarGrid($context['calendar_grid_current']['next_calendar']['month'], $context['calendar_grid_current']['next_calendar']['year'], $calendarOptions);
 
 	// Basic template stuff.
+	$context['allow_calendar_event'] = allowedTo('calendar_post');
+	
+	// If you don't allow events not linked to posts and you're not an admin, we have more work to do...
+	if ($context['allow_calendar_event'] && empty($modSettings['cal_allow_unlinked']) && !$user_info['is_admin'])
+	{
+		$boards_can_post = boardsAllowedTo('post_new');
+		$context['allow_calendar_event'] &= !empty($boards_can_post);
+	}
+
 	$context['can_post'] = $context['allow_calendar_event'];
 	$context['current_day'] = $curPage['day'];
 	$context['current_month'] = $curPage['month'];

+ 1 - 1
Sources/Display.php

@@ -1110,7 +1110,7 @@ function Display()
 	$context['can_reply_approved'] = $context['can_reply'];
 	$context['can_reply'] |= $context['can_reply_unapproved'];
 	$context['can_quote'] = $context['can_reply'] && (empty($modSettings['disabledBBC']) || !in_array('quote', explode(',', $modSettings['disabledBBC'])));
-	$context['can_mark_unread'] = !$user_info['is_guest'] && $settings['show_mark_read'];
+	$context['can_mark_unread'] = !$user_info['is_guest'];
 	$context['can_unwatch'] = !$user_info['is_guest'] && $modSettings['enable_unwatch'];
 
 	$context['can_send_topic'] = (!$modSettings['postmod_active'] || $topicinfo['approved']) && allowedTo('send_topic');

+ 1 - 1
Sources/ManageMaintenance.php

@@ -2469,7 +2469,7 @@ function get_integration_hooks_data($start, $per_page, $sort)
 
 	foreach ($hooks as $hook => $functions)
 	{
-		$hooks_filters[] = '<option ' . ($context['current_filter'] == $hook ? 'selected="selected" ' : '') . ' value="' . $hook . '">' . $hook . '</option>';
+		$hooks_filters[] = '<option' . ($context['current_filter'] == $hook ? ' selected ' : '') . ' value="' . $hook . '">' . $hook . '</option>';
 		foreach ($functions as $function)
 		{
 			$enabled = strstr($function, ']') === false;

+ 2 - 2
Sources/ManageMembers.php

@@ -757,7 +757,7 @@ function MembersAwaitingActivation()
 
 	// Create an option list for actions allowed to be done with selected members.
 	$allowed_actions = '
-			<option selected="selected" value="">' . $txt['admin_browse_with_selected'] . ':</option>
+			<option selected value="">' . $txt['admin_browse_with_selected'] . ':</option>
 			<option value="" disabled>-----------------------------</option>';
 	foreach ($context['allowed_actions'] as $key => $desc)
 		$allowed_actions .= '
@@ -992,7 +992,7 @@ function MembersAwaitingActivation()
 			<select name="filter" onchange="this.form.submit();">';
 		foreach ($context['available_filters'] as $filter)
 			$filterOptions .= '
-				<option value="' . $filter['type'] . '"' . ($filter['selected'] ? ' selected="selected"' : '') . '>' . $filter['desc'] . ' - ' . $filter['amount'] . ' ' . ($filter['amount'] == 1 ? $txt['user'] : $txt['users']) . '</option>';
+				<option value="' . $filter['type'] . '"' . ($filter['selected'] ? ' selected' : '') . '>' . $filter['desc'] . ' - ' . $filter['amount'] . ' ' . ($filter['amount'] == 1 ? $txt['user'] : $txt['users']) . '</option>';
 		$filterOptions .= '
 			</select>
 			<noscript><input type="submit" value="' . $txt['go'] . '" name="filter" class="button_submit" /></noscript>';

+ 1 - 1
Sources/ManageSearchEngines.php

@@ -928,7 +928,7 @@ function SpiderStats()
 	else
 		foreach ($date_choices as $id => $text)
 			$date_select .= '
-			<option value="' . $id . '"' . ($current_date == $id ? ' selected="selected"' : '') . '>' . $text . '</option>';
+			<option value="' . $id . '"' . ($current_date == $id ? ' selected' : '') . '>' . $text . '</option>';
 
 	$date_select .= '
 		</select>

+ 1 - 1
Sources/ManageSmileys.php

@@ -923,7 +923,7 @@ function EditSmileys()
 			<select name="set" onchange="changeSet(this.options[this.selectedIndex].value);">';
 		foreach ($context['smiley_sets'] as $smiley_set)
 			$smileyset_option_list .= '
-				<option value="' . $smiley_set['path'] . '"' . ($modSettings['smiley_sets_default'] == $smiley_set['path'] ? ' selected="selected"' : '') . '>' . $smiley_set['name'] . '</option>';
+				<option value="' . $smiley_set['path'] . '"' . ($modSettings['smiley_sets_default'] == $smiley_set['path'] ? ' selected' : '') . '>' . $smiley_set['name'] . '</option>';
 		$smileyset_option_list .= '
 			</select>';
 

+ 1 - 1
Sources/Profile.php

@@ -883,7 +883,7 @@ function loadCustomFields($memID, $area = 'summary')
 			foreach ($options as $k => $v)
 			{
 				$true = (!$exists && $row['default_value'] == $v) || $value == $v;
-				$input_html .= '<option value="' . $k . '"' . ($true ? ' selected="selected"' : '') . '>' . $v . '</option>';
+				$input_html .= '<option value="' . $k . '"' . ($true ? ' selected' : '') . '>' . $v . '</option>';
 				if ($true)
 					$output_html = $v;
 			}

+ 30 - 33
Sources/Recent.php

@@ -433,7 +433,7 @@ function UnreadTopics()
 		die;
 	}
 
-	$context['showCheckboxes'] = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
+	$context['showCheckboxes'] = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1;
 
 	$context['showing_all_topics'] = isset($_GET['all']);
 	$context['start'] = (int) $_REQUEST['start'];
@@ -1334,45 +1334,42 @@ function UnreadTopics()
 	$context['querystring_board_limits'] = sprintf($context['querystring_board_limits'], $_REQUEST['start']);
 	$context['topics_to_mark'] = implode('-', $topic_ids);
 
-	if ($settings['show_mark_read'])
+	// Build the recent button array.
+	if ($is_topics)
 	{
-		// Build the recent button array.
-		if ($is_topics)
-		{
-			$context['recent_buttons'] = array(
-				'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_mark_read'] . '\');"', 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']),
-			);
-
-			if ($context['showCheckboxes'])
-				$context['recent_buttons']['markselectread'] = array(
-					'text' => 'quick_mod_markread',
-					'image' => 'markselectedread.png',
-					'lang' => true,
-					'url' => 'javascript:document.quickModForm.submit();',
-				);
+		$context['recent_buttons'] = array(
+			'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_mark_read'] . '\');"', 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']),
+		);
 
-			if (!empty($context['topics']) && !$context['showing_all_topics'])
-				$context['recent_buttons']['readall'] = array('text' => 'unread_topics_all', 'image' => 'markreadall.png', 'lang' => true, 'url' => $scripturl . '?action=unread;all' . $context['querystring_board_limits'], 'active' => true);
-		}
-		elseif (!$is_topics && isset($context['topics_to_mark']))
-		{
-			$context['recent_buttons'] = array(
-				'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_mark_read'] . '\');"', 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']),
+		if ($context['showCheckboxes'])
+			$context['recent_buttons']['markselectread'] = array(
+				'text' => 'quick_mod_markread',
+				'image' => 'markselectedread.png',
+				'lang' => true,
+				'url' => 'javascript:document.quickModForm.submit();',
 			);
 
-			if ($context['showCheckboxes'])
-				$context['recent_buttons']['markselectread'] = array(
-					'text' => 'quick_mod_markread',
-					'image' => 'markselectedread.png',
-					'lang' => true,
-					'url' => 'javascript:document.quickModForm.submit();',
-				);
-		}
+		if (!empty($context['topics']) && !$context['showing_all_topics'])
+			$context['recent_buttons']['readall'] = array('text' => 'unread_topics_all', 'image' => 'markreadall.png', 'lang' => true, 'url' => $scripturl . '?action=unread;all' . $context['querystring_board_limits'], 'active' => true);
+	}
+	elseif (!$is_topics && isset($context['topics_to_mark']))
+	{
+		$context['recent_buttons'] = array(
+			'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_mark_read'] . '\');"', 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']),
+		);
 
-		// Allow mods to add additional buttons here
-		call_integration_hook('integrate_recent_buttons');
+		if ($context['showCheckboxes'])
+			$context['recent_buttons']['markselectread'] = array(
+				'text' => 'quick_mod_markread',
+				'image' => 'markselectedread.png',
+				'lang' => true,
+				'url' => 'javascript:document.quickModForm.submit();',
+			);
 	}
 
+	// Allow mods to add additional buttons here
+	call_integration_hook('integrate_recent_buttons');
+
 	$context['no_topic_listing'] = empty($context['topics']);
 
 	// Allow helpdesks and bug trackers and what not to add their own unread data (just add a template_layer to show custom stuff in the template!)

+ 10 - 7
Sources/Subs.php

@@ -3692,14 +3692,17 @@ function setupMenuContext()
 
 	$cacheTime = $modSettings['lastActive'] * 60;
 
-	// Initial "can you post an event in the calendar" option
-	$context['allow_calendar_event'] = allowedTo('calendar_post');
-	
-	// If you don't allow events not linked to posts and you're not an admin, we have more work to do...
-	if (empty($modSettings['cal_allow_unlinked']) && !$user_info['is_admin'])
+	// Initial "can you post an event in the calendar" option - but this might have been set in the calendar already.
+	if (!isset($context['allow_calendar_event']))
 	{
-		$boards_can_post = boardsAllowedTo('post_new');
-		$context['allow_calendar_event'] &= !empty($boards_can_post);
+		$context['allow_calendar_event'] = $context['allow_calendar'] && allowedTo('calendar_post');
+		
+		// If you don't allow events not linked to posts and you're not an admin, we have more work to do...
+		if ($context['allow_calendar'] && $context['allow_calendar_event'] && empty($modSettings['cal_allow_unlinked']) && !$user_info['is_admin'])
+		{
+			$boards_can_post = boardsAllowedTo('post_new');
+			$context['allow_calendar_event'] &= !empty($boards_can_post);
+		}
 	}
 
 	// There is some menu stuff we need to do if we're coming at this from a non-guest perspective.

+ 28 - 28
Themes/default/Admin.template.php

@@ -823,7 +823,7 @@ function template_show_settings()
 											<select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), '>';
 					foreach ($config_var['data'] as $option)
 						echo '
-												<option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected="selected"' : ''), '>', $option[1], '</option>';
+												<option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>';
 					echo '
 											</select>';
 				}
@@ -1046,10 +1046,10 @@ function template_edit_profile_field()
 											</dt>
 											<dd>
 												<select name="profile_area" id="profile_area">
-													<option value="none"', $context['field']['profile_area'] == 'none' ? ' selected="selected"' : '', '>', $txt['custom_edit_profile_none'], '</option>
-													<option value="account"', $context['field']['profile_area'] == 'account' ? ' selected="selected"' : '', '>', $txt['account'], '</option>
-													<option value="forumprofile"', $context['field']['profile_area'] == 'forumprofile' ? ' selected="selected"' : '', '>', $txt['forumprofile'], '</option>
-													<option value="theme"', $context['field']['profile_area'] == 'theme' ? ' selected="selected"' : '', '>', $txt['theme'], '</option>
+													<option value="none"', $context['field']['profile_area'] == 'none' ? ' selected' : '', '>', $txt['custom_edit_profile_none'], '</option>
+													<option value="account"', $context['field']['profile_area'] == 'account' ? ' selected' : '', '>', $txt['account'], '</option>
+													<option value="forumprofile"', $context['field']['profile_area'] == 'forumprofile' ? ' selected' : '', '>', $txt['forumprofile'], '</option>
+													<option value="theme"', $context['field']['profile_area'] == 'theme' ? ' selected' : '', '>', $txt['theme'], '</option>
 												</select>
 											</dd>
 											<dt>
@@ -1057,9 +1057,9 @@ function template_edit_profile_field()
 											</dt>
 											<dd>
 												<select name="reg" id="reg">
-													<option value="0"', $context['field']['reg'] == 0 ? ' selected="selected"' : '', '>', $txt['custom_edit_registration_disable'], '</option>
-													<option value="1"', $context['field']['reg'] == 1 ? ' selected="selected"' : '', '>', $txt['custom_edit_registration_allow'], '</option>
-													<option value="2"', $context['field']['reg'] == 2 ? ' selected="selected"' : '', '>', $txt['custom_edit_registration_require'], '</option>
+													<option value="0"', $context['field']['reg'] == 0 ? ' selected' : '', '>', $txt['custom_edit_registration_disable'], '</option>
+													<option value="1"', $context['field']['reg'] == 1 ? ' selected' : '', '>', $txt['custom_edit_registration_allow'], '</option>
+													<option value="2"', $context['field']['reg'] == 2 ? ' selected' : '', '>', $txt['custom_edit_registration_require'], '</option>
 												</select>
 											</dd>
 											<dt>
@@ -1074,9 +1074,9 @@ function template_edit_profile_field()
 											</dt>
 											<dd>
 												<select name="placement" id="placement">
-													<option value="0"', $context['field']['placement'] == '0' ? ' selected="selected"' : '', '>', $txt['custom_edit_placement_standard'], '</option>
-													<option value="1"', $context['field']['placement'] == '1' ? ' selected="selected"' : '', '>', $txt['custom_edit_placement_withicons'], '</option>
-													<option value="2"', $context['field']['placement'] == '2' ? ' selected="selected"' : '', '>', $txt['custom_edit_placement_abovesignature'], '</option>
+													<option value="0"', $context['field']['placement'] == '0' ? ' selected' : '', '>', $txt['custom_edit_placement_standard'], '</option>
+													<option value="1"', $context['field']['placement'] == '1' ? ' selected' : '', '>', $txt['custom_edit_placement_withicons'], '</option>
+													<option value="2"', $context['field']['placement'] == '2' ? ' selected' : '', '>', $txt['custom_edit_placement_abovesignature'], '</option>
 												</select>
 											</dd>
 											<dt>
@@ -1096,12 +1096,12 @@ function template_edit_profile_field()
 												<strong><label for="field_type">', $txt['custom_edit_picktype'], ':</label></strong>
 											</dt>
 											<dd>
-												<select name="field_type" id="field_type" onchange="updateInputBoxes();">
-													<option value="text"', $context['field']['type'] == 'text' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_text'], '</option>
-													<option value="textarea"', $context['field']['type'] == 'textarea' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_textarea'], '</option>
-													<option value="select"', $context['field']['type'] == 'select' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_select'], '</option>
-													<option value="radio"', $context['field']['type'] == 'radio' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_radio'], '</option>
-													<option value="check"', $context['field']['type'] == 'check' ? ' selected="selected"' : '', '>', $txt['custom_profile_type_check'], '</option>
+												<select name="field_type" id="field_type" onchange="updateInputBoxes();">';
+	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type)
+		echo '
+													<option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>';
+
+	echo '
 												</select>
 											</dd>
 											<dt id="max_length_dt">
@@ -1160,10 +1160,10 @@ function template_edit_profile_field()
 											</dt>
 											<dd>
 												<select name="mask" id="mask" onchange="updateInputBoxes();">
-													<option value="nohtml"', $context['field']['mask'] == 'nohtml' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_nohtml'], '</option>
-													<option value="email"', $context['field']['mask'] == 'email' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_email'], '</option>
-													<option value="number"', $context['field']['mask'] == 'number' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_number'], '</option>
-													<option value="regex"', strpos($context['field']['mask'], 'regex') === 0 ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_regex'], '</option>
+													<option value="nohtml"', $context['field']['mask'] == 'nohtml' ? ' selected' : '', '>', $txt['custom_edit_mask_nohtml'], '</option>
+													<option value="email"', $context['field']['mask'] == 'email' ? ' selected' : '', '>', $txt['custom_edit_mask_email'], '</option>
+													<option value="number"', $context['field']['mask'] == 'number' ? ' selected' : '', '>', $txt['custom_edit_mask_number'], '</option>
+													<option value="regex"', strpos($context['field']['mask'], 'regex') === 0 ? ' selected' : '', '>', $txt['custom_edit_mask_regex'], '</option>
 												</select>
 												<br />
 												<span id="regex_div">
@@ -1176,10 +1176,10 @@ function template_edit_profile_field()
 											</dt>
 											<dd>
 												<select name="private" id="private" onchange="updateInputBoxes();" style="width: 100%">
-													<option value="0"', $context['field']['private'] == 0 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_all'], '</option>
-													<option value="1"', $context['field']['private'] == 1 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_see'], '</option>
-													<option value="2"', $context['field']['private'] == 2 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_owner'], '</option>
-													<option value="3"', $context['field']['private'] == 3 ? ' selected="selected"' : '', '>', $txt['custom_edit_privacy_none'], '</option>
+													<option value="0"', $context['field']['private'] == 0 ? ' selected' : '', '>', $txt['custom_edit_privacy_all'], '</option>
+													<option value="1"', $context['field']['private'] == 1 ? ' selected' : '', '>', $txt['custom_edit_privacy_see'], '</option>
+													<option value="2"', $context['field']['private'] == 2 ? ' selected' : '', '>', $txt['custom_edit_privacy_owner'], '</option>
+													<option value="3"', $context['field']['private'] == 3 ? ' selected' : '', '>', $txt['custom_edit_privacy_none'], '</option>
 												</select>
 											</dd>
 											<dt id="can_search_dt">
@@ -1552,9 +1552,9 @@ function template_admin_quick_search()
 									<img class="icon" src="', $settings['images_url'] , '/filter.png" alt="" />
 									<input type="text" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';" class="input_text" />
 									<select name="search_type">
-										<option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected="selected"' : ''), '>', $txt['admin_search_type_internal'], '</option>
-										<option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected="selected"' : ''), '>', $txt['admin_search_type_member'], '</option>
-										<option value="online"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'online' ? ' selected="selected"' : ''), '>', $txt['admin_search_type_online'], '</option>
+										<option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected' : ''), '>', $txt['admin_search_type_internal'], '</option>
+										<option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected' : ''), '>', $txt['admin_search_type_member'], '</option>
+										<option value="online"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'online' ? ' selected' : ''), '>', $txt['admin_search_type_online'], '</option>
 									</select>
 									<input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button_submit" />
 								</form>

+ 2 - 2
Themes/default/BoardIndex.template.php

@@ -212,8 +212,8 @@ function template_main()
 	</div>';
 
 	// Show the mark all as read button?
-	if ($context['user']['is_logged'] && $settings['show_mark_read'] && !empty($context['categories']))
-	echo '
+	if ($context['user']['is_logged'] && !empty($context['categories']))
+		echo '
 		<div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>';
 }
 

+ 7 - 7
Themes/default/Calendar.template.php

@@ -498,14 +498,14 @@ function template_calendar_base($col_span = 1)
 					// Show a select box with all the months.
 					foreach ($txt['months'] as $number => $month)
 					{
-						echo '<option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>';
+						echo '<option value="', $number, '"', $number == $context['current_month'] ? ' selected' : '', '>', $month, '</option>';
 					}
 					echo '</select>
 											<select name="year">';
 					// Show a link for every year.....
 					for ($year = $context['calendar_resources']['min_year']; $year <= $context['calendar_resources']['max_year']; $year++)
 					{
-						echo '<option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>';
+						echo '<option value="', $year, '"', $year == $context['current_year'] ? ' selected' : '', '>', $year, '</option>';
 					}
 					echo '</select>
 					<input type="submit" class="button_submit" id="view_button" value="', $txt['view'], '" />
@@ -597,7 +597,7 @@ function template_event_post()
 	// Show a list of all the years we allow...
 	for ($year = $context['calendar_resources']['min_year']; $year <= $context['calendar_resources']['max_year']; $year++)
 		echo '
-							<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
+							<option value="', $year, '"', $year == $context['event']['year'] ? ' selected' : '', '>', $year, '&nbsp;</option>';
 
 	echo '
 						</select>
@@ -607,7 +607,7 @@ function template_event_post()
 	// There are 12 months per year - ensure that they all get listed.
 	for ($month = 1; $month <= 12; $month++)
 		echo '
-							<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
+							<option value="', $month, '"', $month == $context['event']['month'] ? ' selected' : '', '>', $txt['months'][$month], '&nbsp;</option>';
 
 	echo '
 						</select>
@@ -617,7 +617,7 @@ function template_event_post()
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
 	for ($day = 1; $day <= $context['event']['last_day']; $day++)
 		echo '
-							<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
+							<option value="', $day, '"', $day == $context['event']['day'] ? ' selected' : '', '>', $day, '&nbsp;</option>';
 
 	echo '
 						</select>
@@ -641,7 +641,7 @@ function template_event_post()
 
 		for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
 			echo '
-									<option value="', $days, '"', $context['event']['span'] == $days ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
+									<option value="', $days, '"', $context['event']['span'] == $days ? ' selected' : '', '>', $days, '&nbsp;</option>';
 
 		echo '
 								</select>
@@ -665,7 +665,7 @@ function template_event_post()
 									<optgroup label="', $category['name'], '">';
 			foreach ($category['boards'] as $board)
 				echo '
-										<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
+										<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
 			echo '
 									</optgroup>';
 		}

+ 6 - 6
Themes/default/ManageBoards.template.php

@@ -137,7 +137,7 @@ function template_modify_category()
 		// Print every existing category into a select box.
 		foreach ($context['category_order'] as $order)
 			echo '
-								<option', $order['selected'] ? ' selected="selected"' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
+								<option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
 		echo '
 							</select>
 						</dd>';
@@ -280,7 +280,7 @@ function template_modify_board()
 							<select name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">';
 		foreach ($context['categories'] as $category)
 			echo '
-								<option', $category['selected'] ? ' selected="selected"' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
+								<option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
 		echo '
 							</select>
 						</dd>';
@@ -309,7 +309,7 @@ function template_modify_board()
 								', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : '';
 	foreach ($context['board_order'] as $order)
 		echo '
-								<option', $order['selected'] ? ' selected="selected"' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
+								<option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
 	echo '
 							</select>
 						</dd>';
@@ -344,7 +344,7 @@ function template_modify_board()
 
 	foreach ($context['profiles'] as $id => $profile)
 		echo '
-								<option value="', $id, '"', $id == $context['board']['profile'] ? ' selected="selected"' : '', '>', $profile['name'], '</option>';
+								<option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
 
 	echo '
 							</select>
@@ -520,11 +520,11 @@ function template_modify_board()
 							</dt>
 							<dd>
 								<select name="boardtheme" id="boardtheme" onchange="refreshOptions();">
-									<option value="0"', $context['board']['theme'] == 0 ? ' selected="selected"' : '', '>', $txt['mboards_theme_default'], '</option>';
+									<option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>';
 
 	foreach ($context['themes'] as $theme)
 		echo '
-									<option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected="selected"' : '', '>', $theme['name'], '</option>';
+									<option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>';
 
 	echo '
 								</select>

+ 4 - 4
Themes/default/ManageCalendar.template.php

@@ -64,11 +64,11 @@ function template_edit_holiday()
 						</dt>
 						<dd class="small_caption">
 							<select name="year" id="year" onchange="generateDays();">
-								<option value="0000"', $context['holiday']['year'] == '0000' ? ' selected="selected"' : '', '>', $txt['every_year'], '</option>';
+								<option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>';
 	// Show a list of all the years we allow...
 	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
 		echo '
-								<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected="selected"' : '', '>', $year, '</option>';
+								<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>';
 
 	echo '
 							</select>&nbsp;
@@ -78,7 +78,7 @@ function template_edit_holiday()
 	// There are 12 months per year - ensure that they all get listed.
 	for ($month = 1; $month <= 12; $month++)
 		echo '
-								<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>';
+								<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
 
 	echo '
 							</select>&nbsp;
@@ -88,7 +88,7 @@ function template_edit_holiday()
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
 	for ($day = 1; $day <= $context['holiday']['last_day']; $day++)
 		echo '
-								<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected="selected"' : '', '>', $day, '</option>';
+								<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>';
 
 	echo '
 							</select>

+ 1 - 1
Themes/default/ManageLanguages.template.php

@@ -332,7 +332,7 @@ function template_modify_language_entries()
 		foreach ($theme['files'] as $file)
 		{
 			echo '
-							<option value="', $id_theme, '+', $file['id'], '"', $file['selected'] ? ' selected="selected"' : '', '> =&gt; ', $file['name'], '</option>';
+							<option value="', $id_theme, '+', $file['id'], '"', $file['selected'] ? ' selected' : '', '> =&gt; ', $file['name'], '</option>';
 		}
 
 		echo '

+ 2 - 2
Themes/default/ManageMaintenance.template.php

@@ -307,7 +307,7 @@ function template_maintain_members()
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=members;activity=purgeinactive" method="post" accept-charset="', $context['character_set'], '" id="membersForm">
 					<p><a id="membersLink"></a>', $txt['maintain_members_since1'], '
 					<select name="del_type">
-						<option value="activated" selected="selected">', $txt['maintain_members_activated'], '</option>
+						<option value="activated" selected>', $txt['maintain_members_activated'], '</option>
 						<option value="logged">', $txt['maintain_members_logged_in'], '</option>
 					</select> ', $txt['maintain_members_since2'], ' <input type="text" name="maxdays" value="30" size="3" class="input_text" />', $txt['maintain_members_since3'], '</p>';
 
@@ -587,7 +587,7 @@ function template_convert_utf8()
 						<dd><select name="src_charset">';
 	foreach ($context['charset_list'] as $charset)
 		echo '
-							<option value="', $charset, '"', $charset === $context['charset_detected'] ? ' selected="selected"' : '', '>', $charset, '</option>';
+							<option value="', $charset, '"', $charset === $context['charset_detected'] ? ' selected' : '', '>', $charset, '</option>';
 	echo '
 							</select></dd>
 						<dt><strong>', $txt['utf8_database_charset'], ':</strong></dt>

+ 10 - 10
Themes/default/ManageMembergroups.template.php

@@ -81,7 +81,7 @@ function template_new_group()
 								<label for="perm_type_inherit">', $txt['membergroups_new_as_inherit'], ':</label>
 								<select name="inheritperm" id="inheritperm_select" onclick="document.getElementById(\'perm_type_inherit\').checked = true;">
 									<option value="-1">', $txt['membergroups_guests'], '</option>
-									<option value="0" selected="selected">', $txt['membergroups_members'], '</option>';
+									<option value="0" selected>', $txt['membergroups_members'], '</option>';
 		foreach ($context['groups'] as $group)
 			echo '
 									<option value="', $group['id'], '">', $group['name'], '</option>';
@@ -92,7 +92,7 @@ function template_new_group()
 								<label for="perm_type_copy">', $txt['membergroups_new_as_copy'], ':</label>
 								<select name="copyperm" id="copyperm_select" onclick="document.getElementById(\'perm_type_copy\').checked = true;">
 									<option value="-1">', $txt['membergroups_guests'], '</option>
-									<option value="0" selected="selected">', $txt['membergroups_members'], '</option>';
+									<option value="0" selected>', $txt['membergroups_members'], '</option>';
 		foreach ($context['groups'] as $group)
 			echo '
 									<option value="', $group['id'], '">', $group['name'], '</option>';
@@ -103,7 +103,7 @@ function template_new_group()
 								<label for="perm_type_predefined">', $txt['membergroups_new_as_type'], ':</label>
 								<select name="level" id="level_select" onclick="document.getElementById(\'perm_type_predefined\').checked = true;">
 									<option value="restrict">', $txt['permitgroups_restrict'], '</option>
-									<option value="standard" selected="selected">', $txt['permitgroups_standard'], '</option>
+									<option value="standard" selected>', $txt['permitgroups_standard'], '</option>
 									<option value="moderator">', $txt['permitgroups_moderator'], '</option>
 									<option value="maintenance">', $txt['permitgroups_maintenance'], '</option>
 								</select>
@@ -215,9 +215,9 @@ function template_edit_group()
 						</dt>
 						<dd>
 							<select name="group_hidden" id="group_hidden_input" onchange="if (this.value == 2 &amp;&amp; !confirm(\'', $txt['membergroups_edit_hidden_warning'], '\')) this.value = 0;">
-								<option value="0" ', $context['group']['hidden'] ? '' : 'selected="selected"', '>', $txt['membergroups_edit_hidden_no'], '</option>
-								<option value="1" ', $context['group']['hidden'] == 1 ? 'selected="selected"' : '', '>', $txt['membergroups_edit_hidden_boardindex'], '</option>
-								<option value="2" ', $context['group']['hidden'] == 2 ? 'selected="selected"' : '', '>', $txt['membergroups_edit_hidden_all'], '</option>
+								<option value="0"', $context['group']['hidden'] ? '' : ' selected', '>', $txt['membergroups_edit_hidden_no'], '</option>
+								<option value="1"', $context['group']['hidden'] == 1 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_boardindex'], '</option>
+								<option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option>
 							</select>
 						</dd>';
 
@@ -232,13 +232,13 @@ function template_edit_group()
 						<dd>
 							<select name="group_inherit" id="group_inherit_input">
 								<option value="-2">', $txt['membergroups_edit_inherit_permissions_no'], '</option>
-								<option value="-1" ', $context['group']['inherited_from'] == -1 ? 'selected="selected"' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_guests'], '</option>
-								<option value="0" ', $context['group']['inherited_from'] == 0 ? 'selected="selected"' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>';
+								<option value="-1"', $context['group']['inherited_from'] == -1 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_guests'], '</option>
+								<option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>';
 
 		// For all the inheritable groups show an option.
 		foreach ($context['inheritable_groups'] as $id => $group)
 			echo '
-								<option value="', $id, '" ', $context['group']['inherited_from'] == $id ? 'selected="selected"' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>';
+								<option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>';
 
 		echo '
 							</select>
@@ -285,7 +285,7 @@ function template_edit_group()
 		foreach ($context['possible_icons'] as $icon)
 		{
 			echo '
-								<option value="', $icon, '"', $context['group']['icon_image'] == $icon ? ' selected="selected"' : '', '>', $icon, '</option>';
+								<option value="', $icon, '"', $context['group']['icon_image'] == $icon ? ' selected' : '', '>', $icon, '</option>';
 		}
 
 		echo '

+ 5 - 5
Themes/default/ManageMembers.template.php

@@ -34,7 +34,7 @@ function template_search_members()
 									<select name="types[mem_id]">
 										<option value="--">&lt;</option>
 										<option value="-">&lt;=</option>
-										<option value="=" selected="selected">=</option>
+										<option value="=" selected>=</option>
 										<option value="+">&gt;=</option>
 										<option value="++">&gt;</option>
 									</select>
@@ -47,7 +47,7 @@ function template_search_members()
 									<select name="types[age]">
 										<option value="--">&lt;</option>
 										<option value="-">&lt;=</option>
-										<option value="=" selected="selected">=</option>
+										<option value="=" selected>=</option>
 										<option value="+">&gt;=</option>
 										<option value="++">&gt;</option>
 									</select>
@@ -60,7 +60,7 @@ function template_search_members()
 									<select name="types[posts]">
 										<option value="--">&lt;</option>
 										<option value="-">&lt;=</option>
-										<option value="=" selected="selected">=</option>
+										<option value="=" selected>=</option>
 										<option value="+">&gt;=</option>
 										<option value="++">&gt;</option>
 									</select>
@@ -73,7 +73,7 @@ function template_search_members()
 									<select name="types[reg_date]">
 										<option value="--">&lt;</option>
 										<option value="-">&lt;=</option>
-										<option value="=" selected="selected">=</option>
+										<option value="=" selected>=</option>
 										<option value="+">&gt;=</option>
 										<option value="++">&gt;</option>
 									</select>
@@ -86,7 +86,7 @@ function template_search_members()
 									<select name="types[last_online]">
 										<option value="--">&lt;</option>
 										<option value="-">&lt;=</option>
-										<option value="=" selected="selected">=</option>
+										<option value="=" selected>=</option>
 										<option value="+">&gt;=</option>
 										<option value="++">&gt;</option>
 									</select>

+ 14 - 14
Themes/default/ManagePaid.template.php

@@ -64,12 +64,12 @@ function template_modify_subscription()
 						</dt>
 						<dd>
 							<select name="prim_group"', !empty($context['disable_groups']) ? ' disabled' : '', '>
-								<option value="0" ', $context['sub']['prim_group'] == 0 ? 'selected="selected"' : '', '>', $txt['paid_mod_no_group'], '</option>';
+								<option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>';
 
 	// Put each group into the box.
 	foreach ($context['groups'] as $id => $name)
 		echo '
-								<option value="', $id, '" ', $context['sub']['prim_group'] == $id ? 'selected="selected"' : '', '>', $name, '</option>';
+								<option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>';
 
 	echo '
 							</select>
@@ -118,10 +118,10 @@ function template_modify_subscription()
 								<dd>
 									<input type="text" name="span_value" value="', $context['sub']['span']['value'], '" size="4" class="input_text" />
 									<select name="span_unit">
-										<option value="D" ', $context['sub']['span']['unit'] == 'D' ? 'selected="selected"' : '', '>', $txt['paid_mod_span_days'], '</option>
-										<option value="W" ', $context['sub']['span']['unit'] == 'W' ? 'selected="selected"' : '', '>', $txt['paid_mod_span_weeks'], '</option>
-										<option value="M" ', $context['sub']['span']['unit'] == 'M' ? 'selected="selected"' : '', '>', $txt['paid_mod_span_months'], '</option>
-										<option value="Y" ', $context['sub']['span']['unit'] == 'Y' ? 'selected="selected"' : '', '>', $txt['paid_mod_span_years'], '</option>
+										<option value="D"', $context['sub']['span']['unit'] == 'D' ? ' selected' : '', '>', $txt['paid_mod_span_days'], '</option>
+										<option value="W"', $context['sub']['span']['unit'] == 'W' ? ' selected' : '', '>', $txt['paid_mod_span_weeks'], '</option>
+										<option value="M"', $context['sub']['span']['unit'] == 'M' ? ' selected' : '', '>', $txt['paid_mod_span_months'], '</option>
+										<option value="Y"', $context['sub']['span']['unit'] == 'Y' ? ' selected' : '', '>', $txt['paid_mod_span_years'], '</option>
 									</select>
 								</dd>
 							</dl>
@@ -261,8 +261,8 @@ function template_modify_user_subscription()
 						</dt>
 						<dd>
 							<select name="status">
-								<option value="0" ', $context['sub']['status'] == 0 ? 'selected="selected"' : '', '>', $txt['paid_finished'], '</option>
-								<option value="1" ', $context['sub']['status'] == 1 ? 'selected="selected"' : '', '>', $txt['paid_active'], '</option>
+								<option value="0"', $context['sub']['status'] == 0 ? ' selected' : '', '>', $txt['paid_finished'], '</option>
+								<option value="1"', $context['sub']['status'] == 1 ? ' selected' : '', '>', $txt['paid_active'], '</option>
 							</select>
 						</dd>
 					</dl>
@@ -273,7 +273,7 @@ function template_modify_user_subscription()
 	// Show a list of all the years we allow...
 	for ($year = 2005; $year <= 2030; $year++)
 		echo '
-							<option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected="selected"' : '', '>', $year, '</option>';
+							<option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>';
 
 	echo '
 						</select>&nbsp;
@@ -283,7 +283,7 @@ function template_modify_user_subscription()
 	// There are 12 months per year - ensure that they all get listed.
 	for ($month = 1; $month <= 12; $month++)
 		echo '
-							<option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>';
+							<option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
 
 	echo '
 						</select>&nbsp;
@@ -293,7 +293,7 @@ function template_modify_user_subscription()
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
 	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++)
 		echo '
-							<option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected="selected"' : '', '>', $day, '</option>';
+							<option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>';
 
 	echo '
 						</select>
@@ -307,7 +307,7 @@ function template_modify_user_subscription()
 	// Show a list of all the years we allow...
 	for ($year = 2005; $year <= 2030; $year++)
 		echo '
-							<option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected="selected"' : '', '>', $year, '</option>';
+							<option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>';
 
 	echo '
 						</select>&nbsp;
@@ -317,7 +317,7 @@ function template_modify_user_subscription()
 	// There are 12 months per year - ensure that they all get listed.
 	for ($month = 1; $month <= 12; $month++)
 		echo '
-							<option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>';
+							<option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
 
 	echo '
 						</select>&nbsp;
@@ -327,7 +327,7 @@ function template_modify_user_subscription()
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
 	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++)
 		echo '
-							<option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected="selected"' : '', '>', $day, '</option>';
+							<option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>';
 
 	echo '
 						</select>

+ 2 - 2
Themes/default/ManagePermissions.template.php

@@ -320,7 +320,7 @@ function template_by_board()
 
 				foreach ($context['profiles'] as $id => $profile)
 					echo '
-									<option value="', $id, '" ', $id == $board['profile'] ? 'selected="selected"' : '', '>', $profile['name'], '</option>';
+									<option value="', $id, '"', $id == $board['profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
 
 				echo '
 								</select>';
@@ -827,7 +827,7 @@ function template_postmod_permissions()
 		foreach ($context['profiles'] as $profile)
 			if ($profile['can_modify'])
 				echo '
-										<option value="', $profile['id'], '" ', $profile['id'] == $context['current_profile'] ? 'selected="selected"' : '', '>', $profile['name'], '</option>';
+										<option value="', $profile['id'], '"', $profile['id'] == $context['current_profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
 
 		echo '
 									</select>

+ 4 - 6
Themes/default/ManageScheduledTasks.template.php

@@ -82,12 +82,10 @@ function template_edit_scheduled_tasks()
 							', $txt['scheduled_task_edit_repeat'], '
 							<input type="text" name="regularity" id="regularity" value="', empty($context['task']['regularity']) ? 1 : $context['task']['regularity'], '" onchange="if (this.value < 1) this.value = 1;" size="2" maxlength="2" class="input_text" />
 							<select name="unit">
-								<option value="0">', $txt['scheduled_task_edit_pick_unit'], '</option>
-								<option value="0">---------------------</option>
-								<option value="m" ', empty($context['task']['unit']) || $context['task']['unit'] == 'm' ? 'selected="selected"' : '', '>', $txt['scheduled_task_reg_unit_m'], '</option>
-								<option value="h" ', $context['task']['unit'] == 'h' ? 'selected="selected"' : '', '>', $txt['scheduled_task_reg_unit_h'], '</option>
-								<option value="d" ', $context['task']['unit'] == 'd' ? 'selected="selected"' : '', '>', $txt['scheduled_task_reg_unit_d'], '</option>
-								<option value="w" ', $context['task']['unit'] == 'w' ? 'selected="selected"' : '', '>', $txt['scheduled_task_reg_unit_w'], '</option>
+								<option value="m"', empty($context['task']['unit']) || $context['task']['unit'] == 'm' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_m'], '</option>
+								<option value="h"', $context['task']['unit'] == 'h' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_h'], '</option>
+								<option value="d"', $context['task']['unit'] == 'd' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_d'], '</option>
+								<option value="w"', $context['task']['unit'] == 'w' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_w'], '</option>
 							</select>
 						</dd>
 						<dt>

+ 1 - 1
Themes/default/ManageSearch.template.php

@@ -236,7 +236,7 @@ function template_create_index()
 						<dd>
 							<select name="bytes_per_word" id="predefine_select">
 								<option value="2">', $txt['search_predefined_small'], '</option>
-								<option value="4" selected="selected">', $txt['search_predefined_moderate'], '</option>
+								<option value="4" selected>', $txt['search_predefined_moderate'], '</option>
 								<option value="5">', $txt['search_predefined_large'], '</option>
 							</select>
 						</dd>

+ 13 - 13
Themes/default/ManageSmileys.template.php

@@ -115,7 +115,7 @@ function template_modifyset()
 							<select name="smiley_sets_path" id="smiley_sets_path">';
 			foreach ($context['smiley_set_dirs'] as $smiley_set_dir)
 				echo '
-								<option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected="selected"' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>';
+								<option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>';
 			echo '
 							</select> ';
 		}
@@ -174,7 +174,7 @@ function template_modifysmiley()
 
 		foreach ($context['smiley_sets'] as $smiley_set)
 			echo '
-							<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected="selected"' : '', '>', $smiley_set['name'], '</option>';
+							<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>';
 
 		echo '
 							</select>)
@@ -198,7 +198,7 @@ function template_modifysmiley()
 							<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">';
 				foreach ($context['filenames'] as $filename)
 					echo '
-								<option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>';
+								<option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>';
 				echo '
 							</select>';
 			}
@@ -215,13 +215,13 @@ function template_modifysmiley()
 						</dt>
 						<dd>
 							<select name="smiley_location" id="smiley_location">
-								<option value="0"', $context['current_smiley']['location'] == 0 ? ' selected="selected"' : '', '>
+								<option value="0"', $context['current_smiley']['location'] == 0 ? ' selected' : '', '>
 									', $txt['smileys_location_form'], '
 								</option>
-								<option value="1"', $context['current_smiley']['location'] == 1 ? ' selected="selected"' : '', '>
+								<option value="1"', $context['current_smiley']['location'] == 1 ? ' selected' : '', '>
 									', $txt['smileys_location_hidden'], '
 								</option>
-								<option value="2"', $context['current_smiley']['location'] == 2 ? ' selected="selected"' : '', '>
+								<option value="2"', $context['current_smiley']['location'] == 2 ? ' selected' : '', '>
 									', $txt['smileys_location_popup'], '
 								</option>
 							</select>
@@ -279,7 +279,7 @@ function template_addsmiley()
 
 		foreach ($context['smiley_sets'] as $smiley_set)
 			echo '
-								<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected="selected"' : '', '>', $smiley_set['name'], '</option>';
+								<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>';
 
 		echo '
 								</select>
@@ -297,7 +297,7 @@ function template_addsmiley()
 									<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">';
 		foreach ($context['filenames'] as $filename)
 			echo '
-									<option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>';
+									<option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>';
 		echo '
 								</select>';
 	}
@@ -360,7 +360,7 @@ function template_addsmiley()
 						</dt>
 						<dd>
 							<select name="smiley_location" id="smiley_location">
-								<option value="0" selected="selected">
+								<option value="0" selected>
 									', $txt['smileys_location_form'], '
 								</option>
 								<option value="1">
@@ -481,7 +481,7 @@ function template_editicon()
 						</dt>
 						<dd>
 							<select name="icon_board" id="icon_board_select">
-								<option value="0"', empty($context['icon']['board_id']) ? ' selected="selected"' : '', '>', $txt['icons_edit_icons_all_boards'], '</option>';
+								<option value="0"', empty($context['icon']['board_id']) ? ' selected' : '', '>', $txt['icons_edit_icons_all_boards'], '</option>';
 
 	foreach ($context['categories'] as $category)
 	{
@@ -489,7 +489,7 @@ function template_editicon()
 								<optgroup label="', $category['name'], '">';
 		foreach ($category['boards'] as $board)
 			echo '
-									<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
+									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
 		echo '
 								</optgroup>';
 	}
@@ -501,13 +501,13 @@ function template_editicon()
 						</dt>
 						<dd>
 							<select name="icon_location" id="icon_location">
-								<option value="0"', empty($context['icon']['after']) ? ' selected="selected"' : '', '>', $txt['icons_location_first_icon'], '</option>';
+								<option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>';
 
 	// Print the list of all the icons it can be put after...
 	foreach ($context['icons'] as $id => $data)
 		if (empty($context['icon']['id']) || $id != $context['icon']['id'])
 			echo '
-								<option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected="selected"' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>';
+								<option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>';
 
 	echo '
 							</select>

+ 1 - 1
Themes/default/MessageIndex.template.php

@@ -113,7 +113,7 @@ function template_main()
 	}
 
 	// They can only mark read if they are logged in and it's enabled!
-	if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
+	if (!$context['user']['is_logged'])
 		unset($context['normal_buttons']['markread']);
 
 	if (!$context['no_topic_listing'])

+ 2 - 2
Themes/default/MoveTopic.template.php

@@ -40,7 +40,7 @@ function template_main()
 
 		foreach ($category['boards'] as $board)
 			echo '
-										<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=&gt; ' : '', $board['name'], '</option>';
+										<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=&gt; ' : '', $board['name'], '</option>';
 		echo '
 									</optgroup>';
 	}
@@ -80,7 +80,7 @@ function template_main()
 								</dt>
 								<dd>
 									<select name="redirect_expires">
-										<option value="0" selected="selected">', $txt['never'], '</option>
+										<option value="0" selected>', $txt['never'], '</option>
 										<option value="1440">', $txt['one_day'], '</option>
 										<option value="10080">', $txt['one_week'], '</option>
 										<option value="20160">', $txt['two_weeks'], '</option>

+ 3 - 3
Themes/default/Packages.template.php

@@ -59,7 +59,7 @@ function template_view_package()
 					<span class="floatright">', $txt['package_available_readme_language'], '
 						<select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">';
 							foreach ($context['readmes'] as $a => $b)
-								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>';
+								echo '<option value="', $b, '"', $a === 'selected' ? ' selected' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>';
 			echo '
 						</select>
 					</span>
@@ -81,7 +81,7 @@ function template_view_package()
 					<span class="floatright">', $txt['package_available_license_language'], '
 						<select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">';
 							foreach ($context['licenses'] as $a => $b)
-								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>';
+								echo '<option value="', $b, '"', $a === 'selected' ? ' selected' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>';
 			echo '
 						</select>
 					</span>
@@ -1588,7 +1588,7 @@ function template_file_permissions()
 							<input type="radio" name="method" value="predefined" id="method_predefined" class="input_radio" />
 							<label for="method_predefined"><strong>', $txt['package_file_perms_predefined'], ':</strong></label>
 							<select name="predefined" onchange="document.getElementById(\'method_predefined\').checked = \'checked\';">
-								<option value="restricted" selected="selected">', $txt['package_file_perms_pre_restricted'], '</option>
+								<option value="restricted" selected>', $txt['package_file_perms_pre_restricted'], '</option>
 								<option value="standard">', $txt['package_file_perms_pre_standard'], '</option>
 								<option value="free">', $txt['package_file_perms_pre_free'], '</option>
 							</select>

+ 15 - 14
Themes/default/PersonalMessage.template.php

@@ -750,8 +750,8 @@ function template_search()
 						window.addEventListener("load", initSearch, false);
 					// ]]></script>
 					<select name="searchtype">
-						<option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['pm_search_match_all'], '</option>
-						<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['pm_search_match_any'], '</option>
+						<option value="1"', empty($context['search_params']['searchtype']) ? ' selected' : '', '>', $txt['pm_search_match_all'], '</option>
+						<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected' : '', '>', $txt['pm_search_match_any'], '</option>
 					</select>
 				</span>
 				<dl id="search_options">
@@ -1797,12 +1797,13 @@ function template_add_rule()
 
 		echo '
 					<select name="ruletype[', $k, ']" id="ruletype', $k, '" onchange="updateRuleDef(', $k, '); rebuildRuleDesc();">
-						<option value="">', $txt['pm_rule_criteria_pick'], ':</option>
-						<option value="mid" ', $criteria['t'] == 'mid' ? 'selected="selected"' : '', '>', $txt['pm_rule_mid'], '</option>
-						<option value="gid" ', $criteria['t'] == 'gid' ? 'selected="selected"' : '', '>', $txt['pm_rule_gid'], '</option>
-						<option value="sub" ', $criteria['t'] == 'sub' ? 'selected="selected"' : '', '>', $txt['pm_rule_sub'], '</option>
-						<option value="msg" ', $criteria['t'] == 'msg' ? 'selected="selected"' : '', '>', $txt['pm_rule_msg'], '</option>
-						<option value="bud" ', $criteria['t'] == 'bud' ? 'selected="selected"' : '', '>', $txt['pm_rule_bud'], '</option>
+						<option value="">', $txt['pm_rule_criteria_pick'], ':</option>';
+
+		foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr)
+			echo '
+						<option value="', $cr, '"', $criteria['t'] == $cr ? ' selected' : '', '>', $txt['pm_rule_' . $cr], '</option>';
+
+		echo '
 					</select>
 					<span id="defdiv', $k, '" ', !in_array($criteria['t'], array('gid', 'bud')) ? '' : 'style="display: none;"', '>
 						<input type="text" name="ruledef[', $k, ']" id="ruledef', $k, '" onkeyup="rebuildRuleDesc();" value="', in_array($criteria['t'], array('mid', 'sub', 'msg')) ? $criteria['v'] : '', '" class="input_text" />
@@ -1813,7 +1814,7 @@ function template_add_rule()
 
 		foreach ($context['groups'] as $id => $group)
 			echo '
-							<option value="', $id, '" ', $criteria['t'] == 'gid' && $criteria['v'] == $id ? 'selected="selected"' : '', '>', $group, '</option>';
+							<option value="', $id, '"', $criteria['t'] == 'gid' && $criteria['v'] == $id ? ' selected' : '', '>', $group, '</option>';
 		echo '
 						</select>
 					</span>';
@@ -1831,8 +1832,8 @@ function template_add_rule()
 					<br /><br />
 					', $txt['pm_rule_logic'], ':
 					<select name="rule_logic" id="logic" onchange="rebuildRuleDesc();">
-						<option value="and" ', $context['rule']['logic'] == 'and' ? 'selected="selected"' : '', '>', $txt['pm_rule_logic_and'], '</option>
-						<option value="or" ', $context['rule']['logic'] == 'or' ? 'selected="selected"' : '', '>', $txt['pm_rule_logic_or'], '</option>
+						<option value="and"', $context['rule']['logic'] == 'and' ? ' selected' : '', '>', $txt['pm_rule_logic_and'], '</option>
+						<option value="or"', $context['rule']['logic'] == 'or' ? ' selected' : '', '>', $txt['pm_rule_logic_or'], '</option>
 					</select>
 				</fieldset>
 				<fieldset>
@@ -1853,8 +1854,8 @@ function template_add_rule()
 		echo '
 					<select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();">
 						<option value="">', $txt['pm_rule_sel_action'] , ':</option>
-						<option value="lab" ', $action['t'] == 'lab' ? 'selected="selected"' : '', '>', $txt['pm_rule_label'] , '</option>
-						<option value="del" ', $action['t'] == 'del' ? 'selected="selected"' : '', '>', $txt['pm_rule_delete'] , '</option>
+						<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'] , '</option>
+						<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'] , '</option>
 					</select>
 					<span id="labdiv', $k, '">
 						<select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();">
@@ -1862,7 +1863,7 @@ function template_add_rule()
 		foreach ($context['labels'] as $label)
 			if ($label['id'] != -1)
 				echo '
-							<option value="', ($label['id']), '" ', $action['t'] == 'lab' && $action['v'] == $label['id'] ? 'selected="selected"' : '', '>', $label['name'], '</option>';
+							<option value="', ($label['id']), '"', $action['t'] == 'lab' && $action['v'] == $label['id'] ? ' selected' : '', '>', $label['name'], '</option>';
 
 		echo '
 						</select>

+ 6 - 6
Themes/default/Post.template.php

@@ -173,7 +173,7 @@ function template_main()
 	// Loop through each message icon allowed, adding it to the drop down list.
 	foreach ($context['icons'] as $icon)
 		echo '
-								<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>';
+								<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected' : '', '>', $icon['name'], '</option>';
 
 	echo '
 							</select>
@@ -197,7 +197,7 @@ function template_main()
 		// Show a list of all the years we allow...
 		for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
 			echo '
-									<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
+									<option value="', $year, '"', $year == $context['event']['year'] ? ' selected' : '', '>', $year, '&nbsp;</option>';
 
 		echo '
 								</select>
@@ -207,7 +207,7 @@ function template_main()
 		// There are 12 months per year - ensure that they all get listed.
 		for ($month = 1; $month <= 12; $month++)
 			echo '
-									<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
+									<option value="', $month, '"', $month == $context['event']['month'] ? ' selected' : '', '>', $txt['months'][$month], '&nbsp;</option>';
 
 		echo '
 								</select>
@@ -217,7 +217,7 @@ function template_main()
 		// This prints out all the days in the current month - this changes dynamically as we switch months.
 		for ($day = 1; $day <= $context['event']['last_day']; $day++)
 			echo '
-									<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
+									<option value="', $day, '"', $day == $context['event']['day'] ? ' selected' : '', '>', $day, '&nbsp;</option>';
 
 		echo '
 								</select>
@@ -242,7 +242,7 @@ function template_main()
 
 				for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
 					echo '
-											<option value="', $days, '"', $days == $context['event']['span'] ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
+											<option value="', $days, '"', $days == $context['event']['span'] ? ' selected' : '', '>', $days, '&nbsp;</option>';
 
 				echo '
 										</select>
@@ -262,7 +262,7 @@ function template_main()
 											<optgroup label="', $category['name'], '">';
 					foreach ($category['boards'] as $board)
 						echo '
-												<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
+												<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
 					echo '
 											</optgroup>';
 				}

+ 42 - 42
Themes/default/Profile.template.php

@@ -1051,7 +1051,7 @@ function template_showPermissions()
 						<h3 class="catbg">
 							<a id="board_permissions"></a>', $txt['showPermissions_select'], ':
 							<select name="board" onchange="if (this.options[this.selectedIndex].value) this.form.submit();">
-								<option value="0"', $context['board'] == 0 ? ' selected="selected"' : '', '>', $txt['showPermissions_global'], '&nbsp;</option>';
+								<option value="0"', $context['board'] == 0 ? ' selected' : '', '>', $txt['showPermissions_global'], '&nbsp;</option>';
 				if (!empty($context['boards']))
 					echo '
 								<option value="" disabled>---------------------------</option>';
@@ -1059,7 +1059,7 @@ function template_showPermissions()
 				// Fill the box with any local permission boards.
 				foreach ($context['boards'] as $board)
 					echo '
-								<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>';
+								<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>';
 
 				echo '
 							</select>
@@ -1388,7 +1388,7 @@ function template_edit_options()
 					if (is_array($field['options']))
 						foreach ($field['options'] as $value => $name)
 							echo '
-								<option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
+								<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
 				}
 
 				echo '
@@ -1523,9 +1523,9 @@ function template_profile_pm_settings()
 								</dt>
 								<dd>
 									<select name="pm_prefs" id="pm_prefs">
-										<option value="0"', $context['display_mode'] == 0 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_all'], '</option>
-										<option value="1"', $context['display_mode'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_one'], '</option>
-										<option value="2"', $context['display_mode'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_linked'], '</option>
+										<option value="0"', $context['display_mode'] == 0 ? ' selected' : '', '>', $txt['pm_display_mode_all'], '</option>
+										<option value="1"', $context['display_mode'] == 1 ? ' selected' : '', '>', $txt['pm_display_mode_one'], '</option>
+										<option value="2"', $context['display_mode'] == 2 ? ' selected' : '', '>', $txt['pm_display_mode_linked'], '</option>
 									</select>
 								</dd>
 								<dt>
@@ -1543,15 +1543,15 @@ function template_profile_pm_settings()
 								</dt>
 								<dd>
 										<select name="pm_receive_from" id="pm_receive_from">
-												<option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected="selected"' : '', '>', $txt['pm_receive_from_everyone'], '</option>';
+												<option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected' : '', '>', $txt['pm_receive_from_everyone'], '</option>';
 
 	if (!empty($modSettings['enable_buddylist']))
 		echo '
-												<option value="1"', !empty($context['receive_from']) && $context['receive_from'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_ignore'], '</option>
-												<option value="2"', !empty($context['receive_from']) && $context['receive_from'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_buddies'], '</option>';
+												<option value="1"', !empty($context['receive_from']) && $context['receive_from'] == 1 ? ' selected' : '', '>', $txt['pm_receive_from_ignore'], '</option>
+												<option value="2"', !empty($context['receive_from']) && $context['receive_from'] == 2 ? ' selected' : '', '>', $txt['pm_receive_from_buddies'], '</option>';
 
 	echo '
-												<option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_admins'], '</option>
+												<option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected' : '', '>', $txt['pm_receive_from_admins'], '</option>
 										</select>
 								</dd>
 								<dt>
@@ -1559,12 +1559,12 @@ function template_profile_pm_settings()
 								</dt>
 								<dd>
 										<select name="pm_email_notify" id="pm_email_notify">
-												<option value="0"', empty($context['send_email']) ? ' selected="selected"' : '', '>', $txt['email_notify_never'], '</option>
-												<option value="1"', !empty($context['send_email']) && ($context['send_email'] == 1 || (empty($modSettings['enable_buddylist']) && $context['send_email'] > 1)) ? ' selected="selected"' : '', '>', $txt['email_notify_always'], '</option>';
+												<option value="0"', empty($context['send_email']) ? ' selected' : '', '>', $txt['email_notify_never'], '</option>
+												<option value="1"', !empty($context['send_email']) && ($context['send_email'] == 1 || (empty($modSettings['enable_buddylist']) && $context['send_email'] > 1)) ? ' selected' : '', '>', $txt['email_notify_always'], '</option>';
 
 	if (!empty($modSettings['enable_buddylist']))
 		echo '
-												<option value="2"', !empty($context['send_email']) && $context['send_email'] > 1 ? ' selected="selected"' : '', '>', $txt['email_notify_buddies'], '</option>';
+												<option value="2"', !empty($context['send_email']) && $context['send_email'] > 1 ? ' selected' : '', '>', $txt['email_notify_buddies'], '</option>';
 
 	echo '
 										</select>
@@ -1674,11 +1674,11 @@ function template_profile_theme_settings()
 							</dt>
 							<dd>
 								<select name="default_options[topics_per_page]" id="topics_per_page">
-									<option value="0"', empty($context['member']['options']['topics_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxTopics'], ')</option>
-									<option value="5"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
-									<option value="10"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 10 ? ' selected="selected"' : '', '>10</option>
-									<option value="25"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
-									<option value="50"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
+									<option value="0"', empty($context['member']['options']['topics_per_page']) ? ' selected' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxTopics'], ')</option>
+									<option value="5"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 5 ? ' selected' : '', '>5</option>
+									<option value="10"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 10 ? ' selected' : '', '>10</option>
+									<option value="25"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 25 ? ' selected' : '', '>25</option>
+									<option value="50"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 50 ? ' selected' : '', '>50</option>
 								</select>
 							</dd>
 							<dt>
@@ -1686,11 +1686,11 @@ function template_profile_theme_settings()
 							</dt>
 							<dd>
 								<select name="default_options[messages_per_page]" id="messages_per_page">
-									<option value="0"', empty($context['member']['options']['messages_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxMessages'], ')</option>
-									<option value="5"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
-									<option value="10"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 10 ? ' selected="selected"' : '', '>10</option>
-									<option value="25"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
-									<option value="50"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
+									<option value="0"', empty($context['member']['options']['messages_per_page']) ? ' selected' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxMessages'], ')</option>
+									<option value="5"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 5 ? ' selected' : '', '>5</option>
+									<option value="10"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 10 ? ' selected' : '', '>10</option>
+									<option value="25"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 25 ? ' selected' : '', '>25</option>
+									<option value="50"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 50 ? ' selected' : '', '>50</option>
 								</select>
 							</dd>';
 	}
@@ -1702,9 +1702,9 @@ function template_profile_theme_settings()
 							</dt>
 							<dd>
 								<select name="default_options[calendar_start_day]" id="calendar_start_day">
-									<option value="0"', empty($context['member']['options']['calendar_start_day']) ? ' selected="selected"' : '', '>', $txt['days'][0], '</option>
-									<option value="1"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 1 ? ' selected="selected"' : '', '>', $txt['days'][1], '</option>
-									<option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected="selected"' : '', '>', $txt['days'][6], '</option>
+									<option value="0"', empty($context['member']['options']['calendar_start_day']) ? ' selected' : '', '>', $txt['days'][0], '</option>
+									<option value="1"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 1 ? ' selected' : '', '>', $txt['days'][1], '</option>
+									<option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected' : '', '>', $txt['days'][6], '</option>
 								</select>
 							</dd>';
 
@@ -1740,9 +1740,9 @@ function template_profile_theme_settings()
 							</dt>
 							<dd>
 								<select name="default_options[display_quick_mod]" id="display_quick_mod">
-									<option value="0"', empty($context['member']['options']['display_quick_mod']) ? ' selected="selected"' : '', '>', $txt['display_quick_mod_none'], '</option>
-									<option value="1"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] == 1 ? ' selected="selected"' : '', '>', $txt['display_quick_mod_check'], '</option>
-									<option value="2"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] != 1 ? ' selected="selected"' : '', '>', $txt['display_quick_mod_image'], '</option>
+									<option value="0"', empty($context['member']['options']['display_quick_mod']) ? ' selected' : '', '>', $txt['display_quick_mod_none'], '</option>
+									<option value="1"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] == 1 ? ' selected' : '', '>', $txt['display_quick_mod_check'], '</option>
+									<option value="2"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] != 1 ? ' selected' : '', '>', $txt['display_quick_mod_image'], '</option>
 								</select>
 							</dd>';
 }
@@ -1805,10 +1805,10 @@ function template_alert_configuration()
 						</dt>
 						<dd>
 							<select name="notify_regularity" id="notify_regularity">
-								<option value="0"', $context['member']['notify_regularity'] == 0 ? ' selected="selected"' : '', '>', $txt['notify_regularity_instant'], '</option>
-								<option value="1"', $context['member']['notify_regularity'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_regularity_first_only'], '</option>
-								<option value="2"', $context['member']['notify_regularity'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_regularity_daily'], '</option>
-								<option value="3"', $context['member']['notify_regularity'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_regularity_weekly'], '</option>
+								<option value="0"', $context['member']['notify_regularity'] == 0 ? ' selected' : '', '>', $txt['notify_regularity_instant'], '</option>
+								<option value="1"', $context['member']['notify_regularity'] == 1 ? ' selected' : '', '>', $txt['notify_regularity_first_only'], '</option>
+								<option value="2"', $context['member']['notify_regularity'] == 2 ? ' selected' : '', '>', $txt['notify_regularity_daily'], '</option>
+								<option value="3"', $context['member']['notify_regularity'] == 3 ? ' selected' : '', '>', $txt['notify_regularity_weekly'], '</option>
 							</select>
 						</dd>
 						<dt>
@@ -1816,10 +1816,10 @@ function template_alert_configuration()
 						</dt>
 						<dd>
 							<select name="notify_types" id="notify_types">
-								<option value="1"', $context['member']['notify_types'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything'], '</option>
-								<option value="2"', $context['member']['notify_types'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything_own'], '</option>
-								<option value="3"', $context['member']['notify_types'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_send_type_only_replies'], '</option>
-								<option value="4"', $context['member']['notify_types'] == 4 ? ' selected="selected"' : '', '>', $txt['notify_send_type_nothing'], '</option>
+								<option value="1"', $context['member']['notify_types'] == 1 ? ' selected' : '', '>', $txt['notify_send_type_everything'], '</option>
+								<option value="2"', $context['member']['notify_types'] == 2 ? ' selected' : '', '>', $txt['notify_send_type_everything_own'], '</option>
+								<option value="3"', $context['member']['notify_types'] == 3 ? ' selected' : '', '>', $txt['notify_send_type_only_replies'], '</option>
+								<option value="4"', $context['member']['notify_types'] == 4 ? ' selected' : '', '>', $txt['notify_send_type_nothing'], '</option>
 							</select>
 						</dd>
 					</dl>
@@ -1868,7 +1868,7 @@ function template_alert_configuration()
 						<select name="opt_', $opts[1], '" id="opt_', $opts[1], '">';
 						foreach ($opts['opts'] as $k => $v)
 							echo '
-							<option value="', $k, '"', $this_value == $k ? ' selected="selected"' : '', '>', $v, '</option>';
+							<option value="', $k, '"', $this_value == $k ? ' selected' : '', '>', $v, '</option>';
 						echo '
 						</select>';
 						break;
@@ -2784,7 +2784,7 @@ function template_profile_group_manage()
 		foreach ($context['member_groups'] as $member_group)
 			if (!empty($member_group['can_be_primary']))
 				echo '
-									<option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected="selected"' : '', '>
+									<option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected' : '', '>
 										', $member_group['name'], '
 									</option>';
 		echo '
@@ -2924,7 +2924,7 @@ function template_profile_avatar_select()
 		// This lists all the file catergories.
 		foreach ($context['avatars'] as $avatar)
 			echo '
-											<option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected="selected"' : ''), '>', $avatar['name'], '</option>';
+											<option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected' : ''), '>', $avatar['name'], '</option>';
 		echo '
 										</select>
 									</div>
@@ -3040,7 +3040,7 @@ function template_profile_timeformat_modify()
 	// Help the user by showing a list of common time formats.
 	foreach ($context['easy_timeformats'] as $time_format)
 		echo '
-									<option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected="selected"' : '', '>', $time_format['title'], '</option>';
+									<option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected' : '', '>', $time_format['title'], '</option>';
 	echo '
 								</select><br />
 								<input type="text" name="time_format" id="time_format" value="', $context['member']['time_format'], '" size="30" class="input_text" />
@@ -3089,7 +3089,7 @@ function template_profile_smiley_pick()
 								<select name="smiley_set" id="smiley_set" onchange="document.getElementById(\'smileypr\').src = this.selectedIndex == 0 ? \'', $settings['images_url'], '/blank.png\' : \'', $modSettings['smileys_url'], '/\' + (this.selectedIndex != 1 ? this.options[this.selectedIndex].value : \'', !empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'], '\') + \'/smiley.gif\';">';
 	foreach ($context['smiley_sets'] as $set)
 		echo '
-									<option value="', $set['id'], '"', $set['selected'] ? ' selected="selected"' : '', '>', $set['name'], '</option>';
+									<option value="', $set['id'], '"', $set['selected'] ? ' selected' : '', '>', $set['name'], '</option>';
 	echo '
 								</select> <img id="smileypr" class="centericon" src="', $context['member']['smiley_set']['id'] != 'none' ? $modSettings['smileys_url'] . '/' . ($context['member']['smiley_set']['id'] != '' ? $context['member']['smiley_set']['id'] : (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'])) . '/smiley.gif' : $settings['images_url'] . '/blank.png', '" alt=":)"  style="padding-left: 20px;" />
 							</dd>';

+ 2 - 2
Themes/default/Register.template.php

@@ -273,7 +273,7 @@ function template_registration_form()
 						if (is_array($field['options']))
 							foreach ($field['options'] as $value => $name)
 								echo '
-								<option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
+								<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
 					}
 
 					echo '
@@ -634,7 +634,7 @@ function template_edit_agreement()
 
 		foreach ($context['editable_agreements'] as $file => $name)
 			echo '
-								<option value="', $file, '" ', $context['current_agreement'] == $file ? 'selected="selected"' : '', '>', $name, '</option>';
+								<option value="', $file, '"', $context['current_agreement'] == $file ? ' selected' : '', '>', $name, '</option>';
 
 		echo '
 							</select>

+ 2 - 2
Themes/default/Search.template.php

@@ -86,8 +86,8 @@ function template_main()
 					</dt>
 					<dd>
 						<select name="searchtype" id="searchtype">
-							<option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['all_words'], '</option>
-							<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['any_words'], '</option>
+							<option value="1"', empty($context['search_params']['searchtype']) ? ' selected' : '', '>', $txt['all_words'], '</option>
+							<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected' : '', '>', $txt['any_words'], '</option>
 						</select>
 					</dd>
 					<dt class="righttext"><label for="userspec">',

+ 0 - 4
Themes/default/Settings.template.php

@@ -167,10 +167,6 @@ function template_settings()
 			'id' => 'linktree_link',
 			'label' => $txt['current_pos_text_img'],
 		),
-		array(
-			'id' => 'show_mark_read',
-			'label' => $txt['enable_mark_as_read'],
-		),
 		array(
 			'id' => 'enable_news',
 			'label' => $txt['enable_random_news'],

+ 2 - 2
Themes/default/SplitTopics.template.php

@@ -294,7 +294,7 @@ function template_merge()
 				foreach ($cat['boards'] as $board)
 				{
 					echo '
-										<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
+										<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
 				}
 
 				echo '
@@ -411,7 +411,7 @@ function template_merge_extra_options()
 						<select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">';
 	foreach ($context['topics'] as $topic)
 		echo '
-							<option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected="selected"' : '') . '>', $topic['subject'], '</option>';
+							<option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected' : '') . '>', $topic['subject'], '</option>';
 	echo '
 							<option value="0">', $txt['merge_custom_subject'], ':</option>
 						</select>

+ 7 - 7
Themes/default/Themes.template.php

@@ -73,7 +73,7 @@ function template_main()
 	// Put an option for each theme in the select box.
 	foreach ($context['themes'] as $theme)
 		echo '
-								<option value="', $theme['id'], '"', $modSettings['theme_guests'] == $theme['id'] ? ' selected="selected"' : '', '>', $theme['name'], '</option>';
+								<option value="', $theme['id'], '"', $modSettings['theme_guests'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>';
 
 	echo '
 							</select>
@@ -84,7 +84,7 @@ function template_main()
 						</dt>
 						<dd>
 							<select name="theme_reset" id="theme_reset">
-								<option value="-1" selected="selected">', $txt['theme_nochange'], '</option>
+								<option value="-1" selected>', $txt['theme_nochange'], '</option>
 								<option value="0">', $txt['theme_forum_default'], '</option>';
 
 	// Same thing, this time for changing the theme of everyone.
@@ -375,7 +375,7 @@ function template_set_options()
 		if ($context['theme_options_reset'])
 			echo '
 							<span class="floatleft"><select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;">
-								<option value="0" selected="selected">', $txt['themeadmin_reset_options_none'], '</option>
+								<option value="0" selected>', $txt['themeadmin_reset_options_none'], '</option>
 								<option value="1">', $txt['themeadmin_reset_options_change'], '</option>
 								<option value="2">', $txt['themeadmin_reset_options_default'], '</option>
 							</select>&nbsp;</span>';
@@ -410,7 +410,7 @@ function template_set_options()
 			foreach ($setting['options'] as $value => $label)
 			{
 				echo '
-								<option value="', $value, '"', $value == $setting['value'] ? ' selected="selected"' : '', '>', $label, '</option>';
+								<option value="', $value, '"', $value == $setting['value'] ? ' selected' : '', '>', $label, '</option>';
 			}
 
 			echo '
@@ -539,7 +539,7 @@ function template_set_settings()
 
 		foreach ($context['theme_variants'] as $key => $variant)
 			echo '
-								<option value="', $key, '" ', $context['default_variant'] == $key ? 'selected="selected"' : '', '>', $variant['label'], '</option>';
+								<option value="', $key, '"', $context['default_variant'] == $key ? ' selected' : '', '>', $variant['label'], '</option>';
 
 		echo '
 							</select>
@@ -613,7 +613,7 @@ function template_set_settings()
 
 			foreach ($setting['options'] as $value => $label)
 				echo '
-							<option value="', $value, '"', $value == $setting['value'] ? ' selected="selected"' : '', '>', $label, '</option>';
+							<option value="', $value, '"', $value == $setting['value'] ? ' selected' : '', '>', $label, '</option>';
 
 			echo '
 							</select>
@@ -701,7 +701,7 @@ function template_pick()
 			foreach ($theme['variants'] as $key => $variant)
 			{
 				echo '
-						<option value="', $key, '" ', $theme['selected_variant'] == $key ? 'selected="selected"' : '', '>', $variant['label'], '</option>';
+						<option value="', $key, '"', $theme['selected_variant'] == $key ? ' selected' : '', '>', $variant['label'], '</option>';
 			}
 			echo '
 					</select>

+ 2 - 2
Themes/default/Who.template.php

@@ -31,7 +31,7 @@ function template_main()
 
 	foreach ($context['show_methods'] as $value => $label)
 		echo '
-							<option value="', $value, '" ', $value == $context['show_by'] ? ' selected="selected"' : '', '>', $label, '</option>';
+							<option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>';
 	echo '
 						</select>
 						<noscript>
@@ -111,7 +111,7 @@ function template_main()
 
 	foreach ($context['show_methods'] as $value => $label)
 		echo '
-							<option value="', $value, '" ', $value == $context['show_by'] ? ' selected="selected"' : '', '>', $label, '</option>';
+							<option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>';
 	echo '
 						</select>
 						<noscript>

+ 5 - 5
Themes/default/index.template.php

@@ -211,19 +211,19 @@ function template_body_above()
 
 			echo '
 				<select name="search_selection">
-					<option value="all"', ($selected == 'all' ? ' selected="selected"' : ''), '>', $txt['search_entireforum'], ' </option>';
+					<option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>';
 
 			// Can't limit it to a specific topic if we are not in one
 			if (!empty($context['current_topic']))
 				echo '
-					<option value="topic"', ($selected == 'current_topic' ? ' selected="selected"' : ''), '>', $txt['search_thistopic'], '</option>';
+					<option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>';
 
 		// Can't limit it to a specific board if we are not in one
 		if (!empty($context['current_board']))
 			echo '
-					<option value="board"', ($selected == 'current_board' ? ' selected="selected"' : ''), '>', $txt['search_thisbrd'], '</option>';
+					<option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisbrd'], '</option>';
 			echo '
-					<option value="members"', ($selected == 'members' ? ' selected="selected"' : ''), '>', $txt['search_members'], ' </option>
+					<option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>
 				</select>';
 		}
 
@@ -278,7 +278,7 @@ function template_body_above()
 								<option value="1440">', $txt['one_day'], '</option>
 								<option value="10080">', $txt['one_week'], '</option>
 								<option value="43200">', $txt['one_month'], '</option>
-								<option value="-1" selected="selected">', $txt['forever'], '</option>
+								<option value="-1" selected>', $txt['forever'], '</option>
 							</select>
 							<input type="submit" value="', $txt['login'], '" class="button_submit" />
 							<div>', $txt['quick_login_dec'], '</div>';

+ 0 - 1
Themes/default/languages/ManageScheduledTasks.english.php

@@ -46,7 +46,6 @@ $txt['scheduled_task_reg_unit_w'] = 'week(s)';
 
 $txt['scheduled_task_edit'] = 'Edit Scheduled Task';
 $txt['scheduled_task_edit_repeat'] = 'Repeat task every';
-$txt['scheduled_task_edit_pick_unit'] = 'Pick Unit';
 $txt['scheduled_task_edit_interval'] = 'Interval';
 $txt['scheduled_task_edit_start_time'] = 'Start Time';
 $txt['scheduled_task_edit_start_time_desc'] = 'Time the first instance of the day should start (hours:minutes)';

+ 0 - 1
Themes/default/languages/Themes.english.php

@@ -100,7 +100,6 @@ $txt['news_fader'] = 'Show news fader on board index';
 $txt['member_list_bar'] = 'Show members list bar on board index';
 $txt['current_pos_text_img'] = 'Show current position in forum as link instead of text';
 $txt['show_view_profile_button'] = 'Show view profile button under post';
-$txt['enable_mark_as_read'] = 'Enable and show \'Mark as Read\' buttons';
 $txt['header_logo_url'] = 'Logo image URL';
 $txt['header_logo_url_desc'] = '(leave blank to show forum name or default logo.)';
 $txt['number_recent_posts'] = 'Number of recent posts to display on board index';

+ 3 - 3
other/install.php

@@ -2116,7 +2116,7 @@ function template_install_above()
 
 		foreach ($incontext['detected_languages'] as $lang => $name)
 			echo '
-									<option', isset($_SESSION['installer_temp_lang']) && $_SESSION['installer_temp_lang'] == $lang ? ' selected="selected"' : '', ' value="', $lang, '">', $name, '</option>';
+									<option', isset($_SESSION['installer_temp_lang']) && $_SESSION['installer_temp_lang'] == $lang ? ' selected' : '', ' value="', $lang, '">', $name, '</option>';
 
 		echo '
 								</select>
@@ -2365,7 +2365,7 @@ function template_database_settings()
 
 	foreach ($incontext['supported_databases'] as $key => $db)
 			echo '
-						<option value="', $key, '"', isset($_POST['db_type']) && $_POST['db_type'] == $key ? ' selected="selected"' : '', '>', $db['name'], '</option>';
+						<option value="', $key, '"', isset($_POST['db_type']) && $_POST['db_type'] == $key ? ' selected' : '', '>', $db['name'], '</option>';
 
 	echo '
 					</select><div id="db_sqlite_warning" style="color: blue; display: none;" class="smalltext">', $txt['db_sqlite_warning'], '</div>
@@ -2497,7 +2497,7 @@ function template_forum_settings()
 				<td>
 					<select name="reg_mode" id="reg_mode">
 						<optgroup label="', $txt['install_settings_reg_modes'], ':">
-							<option value="0" selected="selected">', $txt['install_settings_reg_immediate'], '</option>
+							<option value="0" selected>', $txt['install_settings_reg_immediate'], '</option>
 							<option value="1">', $txt['install_settings_reg_email'], '</option>
 							<option value="2">', $txt['install_settings_reg_admin'], '</option>
 							<option value="3">', $txt['install_settings_reg_disabled'], '</option>

+ 0 - 1
other/install_2-1_mysql.sql

@@ -2049,7 +2049,6 @@ VALUES (1, 'name', '{$default_theme_name}'),
 	(1, 'show_member_bar', '1'),
 	(1, 'linktree_link', '1'),
 	(1, 'show_profile_buttons', '1'),
-	(1, 'show_mark_read', '1'),
 	(1, 'show_stats_index', '1'),
 	(1, 'newsfader_time', '5000'),
 	(1, 'additional_options_collapsable', '1'),

+ 0 - 1
other/install_2-1_postgresql.sql

@@ -2582,7 +2582,6 @@ INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'number_re
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_member_bar', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'linktree_link', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_profile_buttons', '1');
-INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_mark_read', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_stats_index', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'newsfader_time', '5000');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'additional_options_collapsable', '1');

+ 0 - 1
other/install_2-1_sqlite.sql

@@ -2201,7 +2201,6 @@ INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'number_re
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_member_bar', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'linktree_link', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_profile_buttons', '1');
-INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_mark_read', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_stats_index', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'newsfader_time', '5000');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'additional_options_collapsable', '1');

+ 0 - 1
other/install_2-1_sqlite3.sql

@@ -2201,7 +2201,6 @@ INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'number_re
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_member_bar', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'linktree_link', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_profile_buttons', '1');
-INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_mark_read', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'show_stats_index', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'newsfader_time', '5000');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'additional_options_collapsable', '1');

+ 1 - 1
other/upgrade_2-1_mysql.sql

@@ -667,7 +667,7 @@ WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_regis
 
 ---# Cleaning up old theme settings.
 DELETE FROM {$db_prefix}themes
-WHERE variable IN ('show_board_desc', 'no_new_reply_warning', 'display_quick_reply');
+WHERE variable IN ('show_board_desc', 'no_new_reply_warning', 'display_quick_reply', 'show_mark_read');
 ---#
 
 /******************************************************************************/

+ 1 - 1
other/upgrade_2-1_postgresql.sql

@@ -746,7 +746,7 @@ WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_regis
 
 ---# Cleaning up old theme settings.
 DELETE FROM {$db_prefix}themes
-WHERE variable IN ('show_board_desc', 'no_new_reply_warning', 'display_quick_reply');
+WHERE variable IN ('show_board_desc', 'no_new_reply_warning', 'display_quick_reply', 'show_mark_read');
 ---#
 
 /******************************************************************************/

+ 1 - 1
other/upgrade_2-1_sqlite.sql

@@ -737,7 +737,7 @@ WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_regis
 
 ---# Cleaning up old theme settings.
 DELETE FROM {$db_prefix}themes
-WHERE variable IN ('show_board_desc', 'no_new_reply_warning', 'display_quick_reply');
+WHERE variable IN ('show_board_desc', 'no_new_reply_warning', 'display_quick_reply', 'show_mark_read');
 ---#
 
 /******************************************************************************/