Sfoglia il codice sorgente

Merge branch 'release-2.1' of https://github.com/SimpleMachines/SMF2.1 into release-2.1

emanuele 11 anni fa
parent
commit
b044c25f3b
45 ha cambiato i file con 783 aggiunte e 365 eliminazioni
  1. 20 1
      Sources/Display.php
  2. 183 160
      Sources/ManageBans.php
  3. 18 0
      Sources/ManageMembergroups.php
  4. 2 2
      Sources/ManageNews.php
  5. 3 0
      Sources/ManagePermissions.php
  6. 6 5
      Sources/Modlog.php
  7. 2 2
      Sources/MoveTopic.php
  8. 2 2
      Sources/Post.php
  9. 29 4
      Sources/Profile-View.php
  10. 1 1
      Sources/SendTopic.php
  11. 1 2
      Sources/Subs-Editor.php
  12. 7 0
      Sources/Subs-Membergroups.php
  13. 13 21
      Sources/Subs.php
  14. 1 0
      Sources/Themes.php
  15. 16 10
      Themes/default/Display.template.php
  16. 3 2
      Themes/default/ManageBans.template.php
  17. 30 1
      Themes/default/ManageMembergroups.template.php
  18. 1 1
      Themes/default/MessageIndex.template.php
  19. 2 1
      Themes/default/PersonalMessage.template.php
  20. 1 0
      Themes/default/Post.template.php
  21. 2 2
      Themes/default/Recent.template.php
  22. 10 0
      Themes/default/Settings.template.php
  23. 56 12
      Themes/default/css/admin.css
  24. 176 57
      Themes/default/css/index.css
  25. 34 7
      Themes/default/css/install.css
  26. BIN
      Themes/default/images/theme/backdrop.png
  27. BIN
      Themes/default/images/theme/bars.png
  28. BIN
      Themes/default/images/theme/loadingbar.png
  29. BIN
      Themes/default/images/theme/lower_section.png
  30. BIN
      Themes/default/images/theme/submit_bg.png
  31. BIN
      Themes/default/images/theme/upper_section.png
  32. 0 3
      Themes/default/index.template.php
  33. 1 0
      Themes/default/languages/Drafts.english.php
  34. 2 1
      Themes/default/languages/ManageMembers.english.php
  35. 1 1
      Themes/default/languages/ManageSettings.english.php
  36. 5 2
      Themes/default/languages/index.english.php
  37. 1 0
      index.php
  38. 7 2
      other/install.php
  39. 10 5
      other/install_2-1_mysql.sql
  40. 8 3
      other/install_2-1_postgresql.sql
  41. 8 3
      other/install_2-1_sqlite.sql
  42. 29 29
      other/upgrade.php
  43. 22 1
      other/upgrade_2-1_mysql.sql
  44. 35 11
      other/upgrade_2-1_postgresql.sql
  45. 35 11
      other/upgrade_2-1_sqlite.sql

+ 20 - 1
Sources/Display.php

@@ -180,7 +180,23 @@ function Display()
 
 	// Is this a moved topic that we are redirecting to?
 	if (!empty($topicinfo['id_redirect_topic']))
+	{
+		if ($topicinfo['new_from'] === 0 && !$user_info['is_guest'])
+		{
+			// Mark this as read first
+			$smcFunc['db_insert']($topicinfo['new_from'] == 0 ? 'ignore' : 'replace',
+				'{db_prefix}log_topics',
+				array(
+					'id_member' => 'int', 'id_topic' => 'int', 'id_msg' => 'int', 'disregarded' => 'int',
+				),
+				array(
+					$user_info['id'], $topicinfo['id'], $topicinfo['id_first_msg'], $topicinfo['disregarded'],
+				),
+				array('id_member', 'id_topic')
+			);
+		}
 		redirectexit('topic=' . $topicinfo['id_redirect_topic'] . '.0');
+	}
 
 	$context['real_num_replies'] = $context['num_replies'] = $topicinfo['num_replies'];
 	$context['topic_first_message'] = $topicinfo['id_first_msg'];
@@ -365,6 +381,9 @@ function Display()
 
 	// Did we report a post to a moderator just now?
 	$context['report_sent'] = isset($_GET['reportsent']);
+	
+	// Did we send this topic to a friend?
+	$context['topic_sent'] = isset($_GET['topicsent']);
 
 	// Let's get nosey, who is viewing this topic?
 	if (!empty($settings['display_who_viewing']))
@@ -1275,7 +1294,7 @@ function prepareDisplayContext($reset = false)
 		'alternate' => $counter % 2,
 		'id' => $message['id_msg'],
 		'href' => $scripturl . '?topic=' . $topic . '.msg' . $message['id_msg'] . '#msg' . $message['id_msg'],
-		'link' => '<a href="' . $scripturl . '?topic=' . $topic . '.msg' . $message['id_msg'] . '#msg' . $message['id_msg'] . '" rel="nofollow">' . $message['subject'] . '</a>',
+		'link' => '<a href="' . $scripturl . '?msg=' . $message['id_msg'] . '" rel="nofollow">' . $message['subject'] . '</a>',
 		'member' => &$memberContext[$message['id_member']],
 		'icon' => $message['icon'],
 		'icon_url' => $settings[$context['icon_sources'][$message['icon']]] . '/post/' . $message['icon'] . '.png',

+ 183 - 160
Sources/ManageBans.php

@@ -365,175 +365,176 @@ function BanEdit()
 		foreach ($context['ban_errors'] as $error)
 			$context['error_messages'][$error] = $txt[$error];
 	}
-
-	// If we're editing an existing ban, get it from the database.
-	if (!empty($ban_group_id))
+	else
 	{
-		$context['ban_group_id'] = $ban_group_id;
-
-		// We're going to want this for making our list.
-		require_once($sourcedir . '/Subs-List.php');
-
-		$listOptions = array(
-			'id' => 'ban_items',
-			'base_href' => $scripturl . '?action=admin;area=ban;sa=edit;bg=' . $ban_group_id,
-			'no_items_label' => $txt['ban_no_triggers'],
-			'items_per_page' => $modSettings['defaultMaxMessages'],
-			'get_items' => array(
-				'function' => 'list_getBanItems',
-				'params' => array(
-					'ban_group_id' => $ban_group_id,
-				),
-			),
-			'get_count' => array(
-				'function' => 'list_getNumBanItems',
-				'params' => array(
-					'ban_group_id' => $ban_group_id,
-				),
-			),
-			'columns' => array(
-				'type' => array(
-					'header' => array(
-						'value' => $txt['ban_banned_entity'],
-						'style' => 'width: 60%;text-align: left;',
-					),
-					'data' => array(
-						'function' => create_function('$ban_item', '
-							global $txt;
-
-							if (in_array($ban_item[\'type\'], array(\'ip\', \'hostname\', \'email\')))
-								return \'<strong>\' . $txt[$ban_item[\'type\']] . \':</strong>&nbsp;\' . $ban_item[$ban_item[\'type\']];
-							elseif ($ban_item[\'type\'] == \'user\')
-								return \'<strong>\' . $txt[\'username\'] . \':</strong>&nbsp;\' . $ban_item[\'user\'][\'link\'];
-							else
-								return \'<strong>\' . $txt[\'unknown\'] . \':</strong>&nbsp;\' . $ban_item[\'no_bantype_selected\'];
-						'),
-						'style' => 'text-align: left;',
+		// If we're editing an existing ban, get it from the database.
+		if (!empty($ban_group_id))
+		{
+			$context['ban_group_id'] = $ban_group_id;
+
+			// We're going to want this for making our list.
+			require_once($sourcedir . '/Subs-List.php');
+
+			$listOptions = array(
+				'id' => 'ban_items',
+				'base_href' => $scripturl . '?action=admin;area=ban;sa=edit;bg=' . $ban_group_id,
+				'no_items_label' => $txt['ban_no_triggers'],
+				'items_per_page' => $modSettings['defaultMaxMessages'],
+				'get_items' => array(
+					'function' => 'list_getBanItems',
+					'params' => array(
+						'ban_group_id' => $ban_group_id,
 					),
 				),
-				'hits' => array(
-					'header' => array(
-						'value' => $txt['ban_hits'],
-						'style' => 'width: 15%; text-align: center;',
-					),
-					'data' => array(
-						'db' => 'hits',
-						'style' => 'text-align: center;',
+				'get_count' => array(
+					'function' => 'list_getNumBanItems',
+					'params' => array(
+						'ban_group_id' => $ban_group_id,
 					),
 				),
-				'id' => array(
-					'header' => array(
-						'value' => $txt['ban_actions'],
-						'style' => 'width: 15%; text-align: center;',
+				'columns' => array(
+					'type' => array(
+						'header' => array(
+							'value' => $txt['ban_banned_entity'],
+							'style' => 'width: 60%;text-align: left;',
+						),
+						'data' => array(
+							'function' => create_function('$ban_item', '
+								global $txt;
+
+								if (in_array($ban_item[\'type\'], array(\'ip\', \'hostname\', \'email\')))
+									return \'<strong>\' . $txt[$ban_item[\'type\']] . \':</strong>&nbsp;\' . $ban_item[$ban_item[\'type\']];
+								elseif ($ban_item[\'type\'] == \'user\')
+									return \'<strong>\' . $txt[\'username\'] . \':</strong>&nbsp;\' . $ban_item[\'user\'][\'link\'];
+								else
+									return \'<strong>\' . $txt[\'unknown\'] . \':</strong>&nbsp;\' . $ban_item[\'no_bantype_selected\'];
+							'),
+							'style' => 'text-align: left;',
+						),
 					),
-					'data' => array(
-						'function' => create_function('$ban_item', '
-							global $txt, $context, $scripturl;
-							
-							return \'<a href="\' . $scripturl . \'?action=admin;area=ban;sa=edittrigger;bg=\' . $context[\'ban\'][\'id\'] . \';bi=\' . $ban_item[\'id\'] . \'">\' . $txt[\'ban_edit_trigger\'] . \'</a>\';
-						'),
-						'style' => 'text-align: center;',
+					'hits' => array(
+						'header' => array(
+							'value' => $txt['ban_hits'],
+							'style' => 'width: 15%; text-align: center;',
+						),
+						'data' => array(
+							'db' => 'hits',
+							'style' => 'text-align: center;',
+						),
 					),
-				),
-				'checkboxes' => array(
-					'header' => array(
-						'value' => '<input type="checkbox" onclick="invertAll(this, this.form, \'ban_items\');" class="input_check" />',
-						'style' => 'width: 5%; text-align: center;',
+					'id' => array(
+						'header' => array(
+							'value' => $txt['ban_actions'],
+							'style' => 'width: 15%; text-align: center;',
+						),
+						'data' => array(
+							'function' => create_function('$ban_item', '
+								global $txt, $context, $scripturl;
+								
+								return \'<a href="\' . $scripturl . \'?action=admin;area=ban;sa=edittrigger;bg=\' . $context[\'ban\'][\'id\'] . \';bi=\' . $ban_item[\'id\'] . \'">\' . $txt[\'ban_edit_trigger\'] . \'</a>\';
+							'),
+							'style' => 'text-align: center;',
+						),
 					),
-					'data' => array(
-						'sprintf' => array(
-							'format' => '<input type="checkbox" name="ban_items[]" value="%1$d" class="input_check" />',
-							'params' => array(
-								'id' => false,
+					'checkboxes' => array(
+						'header' => array(
+							'value' => '<input type="checkbox" onclick="invertAll(this, this.form, \'ban_items\');" class="input_check" />',
+							'style' => 'width: 5%; text-align: center;',
+						),
+						'data' => array(
+							'sprintf' => array(
+								'format' => '<input type="checkbox" name="ban_items[]" value="%1$d" class="input_check" />',
+								'params' => array(
+									'id' => false,
+								),
 							),
+							'style' => 'text-align: center;',
 						),
-						'style' => 'text-align: center;',
 					),
 				),
-			),
-			'form' => array(
-				'href' => $scripturl . '?action=admin;area=featuresettings;sa=profile',
-				'name' => 'standardProfileFields',
-			),
-			'additional_rows' => array(
-				array(
-					'position' => 'below_table_data',
-					'value' => '
-					<input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button_submit" /> <a class="button_link" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>',
-					'style' => 'text-align: right;',
+				'form' => array(
+					'href' => $scripturl . '?action=admin;area=ban;sa=edit;bg=' . $ban_group_id,
 				),
-				array(
-					'position' => 'below_table_data',
-					'value' => '
-					<input type="hidden" name="bg" value="' . $ban_group_id . '" />
-					<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
-					<input type="hidden" name="' . $context['admin-bet_token_var'] . '" value="' . $context['admin-bet_token'] . '" />',
+				'additional_rows' => array(
+					array(
+						'position' => 'below_table_data',
+						'value' => '
+						<input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button_submit" /> <a class="button_link" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>',
+						'style' => 'text-align: right;',
+					),
+					array(
+						'position' => 'below_table_data',
+						'value' => '
+						<input type="hidden" name="bg" value="' . $ban_group_id . '" />
+						<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
+						<input type="hidden" name="' . $context['admin-bet_token_var'] . '" value="' . $context['admin-bet_token'] . '" />',
+					),
 				),
-			),
-		);
-		createList($listOptions);
-	}
-	// Not an existing one, then it's probably a new one.
-	else
-	{
-		$context['ban'] = array(
-			'id' => 0,
-			'name' => '',
-			'expiration' => array(
-				'status' => 'never',
-				'days' => 0
-			),
-			'reason' => '',
-			'notes' => '',
-			'ban_days' => 0,
-			'cannot' => array(
-				'access' => true,
-				'post' => false,
-				'register' => false,
-				'login' => false,
-			),
-			'is_new' => true,
-		);
-		$context['ban_suggestions'] = array(
-			'main_ip' => '',
-			'hostname' => '',
-			'email' => '',
-			'member' => array(
-				'id' => 0,
-			),
-		);
-
-		// Overwrite some of the default form values if a user ID was given.
-		if (!empty($_REQUEST['u']))
+			);
+			createList($listOptions);
+		}
+		// Not an existing one, then it's probably a new one.
+		else
 		{
-			$request = $smcFunc['db_query']('', '
-				SELECT id_member, real_name, member_ip, email_address
-				FROM {db_prefix}members
-				WHERE id_member = {int:current_user}
-				LIMIT 1',
-				array(
-					'current_user' => (int) $_REQUEST['u'],
-				)
+			$context['ban'] = array(
+				'id' => 0,
+				'name' => '',
+				'expiration' => array(
+					'status' => 'never',
+					'days' => 0
+				),
+				'reason' => '',
+				'notes' => '',
+				'ban_days' => 0,
+				'cannot' => array(
+					'access' => true,
+					'post' => false,
+					'register' => false,
+					'login' => false,
+				),
+				'is_new' => true,
+			);
+			$context['ban_suggestions'] = array(
+				'main_ip' => '',
+				'hostname' => '',
+				'email' => '',
+				'member' => array(
+					'id' => 0,
+				),
 			);
-			if ($smcFunc['db_num_rows']($request) > 0)
-				list ($context['ban_suggestions']['member']['id'], $context['ban_suggestions']['member']['name'], $context['ban_suggestions']['main_ip'], $context['ban_suggestions']['email']) = $smcFunc['db_fetch_row']($request);
-			$smcFunc['db_free_result']($request);
 
-			if (!empty($context['ban_suggestions']['member']['id']))
+			// Overwrite some of the default form values if a user ID was given.
+			if (!empty($_REQUEST['u']))
 			{
-				$context['ban_suggestions']['href'] = $scripturl . '?action=profile;u=' . $context['ban_suggestions']['member']['id'];
-				$context['ban_suggestions']['member']['link'] = '<a href="' . $context['ban_suggestions']['href'] . '">' . $context['ban_suggestions']['member']['name'] . '</a>';
+				$request = $smcFunc['db_query']('', '
+					SELECT id_member, real_name, member_ip, email_address
+					FROM {db_prefix}members
+					WHERE id_member = {int:current_user}
+					LIMIT 1',
+					array(
+						'current_user' => (int) $_REQUEST['u'],
+					)
+				);
+				if ($smcFunc['db_num_rows']($request) > 0)
+					list ($context['ban_suggestions']['member']['id'], $context['ban_suggestions']['member']['name'], $context['ban_suggestions']['main_ip'], $context['ban_suggestions']['email']) = $smcFunc['db_fetch_row']($request);
+				$smcFunc['db_free_result']($request);
+
+				if (!empty($context['ban_suggestions']['member']['id']))
+				{
+					$context['ban_suggestions']['href'] = $scripturl . '?action=profile;u=' . $context['ban_suggestions']['member']['id'];
+					$context['ban_suggestions']['member']['link'] = '<a href="' . $context['ban_suggestions']['href'] . '">' . $context['ban_suggestions']['member']['name'] . '</a>';
 
-				// Default the ban name to the name of the banned member.
-				$context['ban']['name'] = $context['ban_suggestions']['member']['name'];
-				// @todo: there should be a better solution...used to lock the "Ban on Username" input when banning from profile
-				$context['ban']['from_user'] = true;
+					// Default the ban name to the name of the banned member.
+					$context['ban']['name'] = $context['ban_suggestions']['member']['name'];
+					// @todo: there should be a better solution...used to lock the "Ban on Username" input when banning from profile
+					$context['ban']['from_user'] = true;
 
-				// Would be nice if we could also ban the hostname.
-				if ((preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $context['ban_suggestions']['main_ip']) == 1 || isValidIPv6($context['ban_suggestions']['main_ip'])) && empty($modSettings['disableHostnameLookup']))
-					$context['ban_suggestions']['hostname'] = host_from_ip($context['ban_suggestions']['main_ip']);
+					// Would be nice if we could also ban the hostname.
+					if ((preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $context['ban_suggestions']['main_ip']) == 1 || isValidIPv6($context['ban_suggestions']['main_ip'])) && empty($modSettings['disableHostnameLookup']))
+						$context['ban_suggestions']['hostname'] = host_from_ip($context['ban_suggestions']['main_ip']);
 
-				$context['ban_suggestions']['other_ips'] = banLoadAdditionalIPs($context['ban_suggestions']['member']['id']);
+					$context['ban_suggestions']['other_ips'] = banLoadAdditionalIPs($context['ban_suggestions']['member']['id']);
+				}
 			}
 		}
 	}
@@ -807,24 +808,29 @@ function banEdit2()
 
 	if (isset($_POST['ban_suggestions']))
 		// @TODO: is $_REQUEST['bi'] ever set?
-		$context['ban_suggestions']['saved_triggers'] = saveTriggers($_POST['ban_suggestions'], $ban_info['id'], isset($_REQUEST['u']) ? (int) $_REQUEST['u'] : 0, isset($_REQUEST['bi']) ? (int) $_REQUEST['bi'] : 0);
+		$saved_triggers = saveTriggers($_POST['ban_suggestions'], $ban_info['id'], isset($_REQUEST['u']) ? (int) $_REQUEST['u'] : 0, isset($_REQUEST['bi']) ? (int) $_REQUEST['bi'] : 0);
 
 	// Something went wrong somewhere... Oh well, let's go back.
 	if (!empty($context['ban_errors']))
 	{
+		$context['ban_suggestions'] = $saved_triggers;
+		$context['ban']['from_user'] = true;
+		$context['ban_suggestions'] = array_merge($context['ban_suggestions'], getMemberData((int) $_REQUEST['u']));
+
 		// Not strictly necessary, but it's nice
 		if (!empty($context['ban_suggestions']['member']['id']))
 			$context['ban_suggestions']['other_ips'] = banLoadAdditionalIPs($context['ban_suggestions']['member']['id']);
 		return BanEdit();
 	}
+	$context['ban_suggestions']['saved_triggers'] = $saved_triggers;
 
 	if (isset($_POST['ban_items']))
 	{
 		$items_ids = array();
-		$group_id = isset($_REQUEST['bg']) ? (int) $_REQUEST['bg'] : 0;
+		$ban_group_id = isset($_REQUEST['bg']) ? (int) $_REQUEST['bg'] : 0;
 		array_map('intval', $_POST['ban_items']);
 
-		removeBanTriggers($_POST['ban_items'], $group_id);
+		removeBanTriggers($_POST['ban_items'], $ban_group_id);
 	}
 
 	// Register the last modified date.
@@ -832,6 +838,7 @@ function banEdit2()
 
 	// Update the member table to represent the new ban situation.
 	updateBanMembers();
+	redirectexit('action=admin;area=ban;sa=edit;bg=' . $ban_group_id);
 }
 
 /**
@@ -1014,14 +1021,14 @@ function validateTriggers(&$triggers)
 
 	$ban_triggers = array();
 	$log_info = array();
-	$array_keys = array();
-	call_integration_hook('integrate_extend_ban_triggers', array(&$array_keys));
-	$array_keys += array('ips_in_messages', 'ips_in_errors');
 
 	foreach ($triggers as $key => $value)
 	{
 		if (!empty($value))
 		{
+			if ($key == 'member')
+				continue;
+
 			if ($key == 'main_ip')
 			{
 				$value = trim($value);
@@ -1114,7 +1121,7 @@ function validateTriggers(&$triggers)
 				else
 					$ban_triggers['user']['id_member'] = $value;
 			}
-			elseif (in_array($key, $array_keys))
+			elseif (in_array($key, array('ips_in_messages', 'ips_in_errors')))
 			{
 				// Special case, those two are arrays themselves
 				$values = array_unique($value);
@@ -1233,15 +1240,11 @@ function addTriggers($group_id = 0, $triggers = array(), $logs = array())
 		'ip_high8' => 'int',
 	);
 
-	$array_keys = array();
-	call_integration_hook('integrate_extend_ban_triggers', array(&$array_keys));
-	$array_keys += array('ips_in_messages', 'ips_in_errors');
-
 	$insertTriggers = array();
 	foreach ($triggers as $key => $trigger)
 	{
 		// Exceptions, exceptions, exceptions...always exceptions... :P
-		if (in_array($key, $array_keys))
+		if (in_array($key, array('ips_in_messages', 'ips_in_errors')))
 			foreach ($trigger as $real_trigger)
 				$insertTriggers[] = array_merge($values, $real_trigger);
 		else
@@ -2334,5 +2337,25 @@ function updateBanMembers()
 	updateStats('member');
 }
 
+function getMemberData($id)
+{
+	global $smcFunc;
+
+	$suggestions = array();
+	$request = $smcFunc['db_query']('', '
+		SELECT id_member, real_name, member_ip, email_address
+		FROM {db_prefix}members
+		WHERE id_member = {int:current_user}
+		LIMIT 1',
+		array(
+			'current_user' => $id,
+		)
+	);
+	if ($smcFunc['db_num_rows']($request) > 0)
+		list ($suggestions['member']['id'], $suggestions['member']['name'], $suggestions['main_ip'], $suggestions['email']) = $smcFunc['db_fetch_row']($request);
+	$smcFunc['db_free_result']($request);
+
+	return $suggestions;
+}
 
 ?>

+ 18 - 0
Sources/ManageMembergroups.php

@@ -828,6 +828,15 @@ function EditMembergroup()
 
 			foreach ($updates as $additional_groups => $memberArray)
 				updateMemberData($memberArray, array('additional_groups' => implode(',', array_diff(explode(',', $additional_groups), array((int) $_REQUEST['group'])))));
+			
+			// Sorry, but post groups can't moderate boards
+			$request = $smcFunc['db_query']('', '
+				DELETE FROM {db_prefix}moderator_groups
+				WHERE id_group = {int:current_group}',
+				array(
+					'current_group' => (int) $_REQUEST['group'],
+				)
+			);
 		}
 		elseif ($_REQUEST['group'] != 3)
 		{
@@ -860,6 +869,15 @@ function EditMembergroup()
 						'current_group' => $_REQUEST['group'],
 					)
 				);
+				
+				// Hidden groups can't moderate boards
+				$smcFunc['db_query']('', '
+					DELETE FROM {db_prefix}moderator_groups
+					WHERE id_group = {int:current_group}',
+					array(
+						'current_group' => $_REQUEST['group'],
+					)
+				);
 			}
 
 			// Either way, let's check our "show group membership" setting is correct.

+ 2 - 2
Sources/ManageNews.php

@@ -739,7 +739,7 @@ function SendMailing($clean_only = false)
 				$context['recipients']['members'][] = (int) $member;
 	}
 	// Cleaning groups is simple - although deal with both checkbox and commas.
-	if (!empty($_POST['groups']))
+	if (isset($_POST['groups']))
 	{
 		if (is_array($_POST['groups']))
 		{
@@ -754,7 +754,7 @@ function SendMailing($clean_only = false)
 		}
 	}
 	// Same for excluded groups
-	if (!empty($_POST['exclude_groups']))
+	if (isset($_POST['exclude_groups']))
 	{
 		if (is_array($_POST['exclude_groups']))
 		{

+ 3 - 0
Sources/ManagePermissions.php

@@ -2258,6 +2258,9 @@ function loadIllegalGuestPermissions()
 		'approve_posts',
 		'post_draft',
 		'post_autosave_draft',
+		'pm_draft',
+		'pm_autosave_draft',
+		'disable_censor'
 	);
 
 	call_integration_hook('integrate_load_illegal_guest_permissions');

+ 6 - 5
Sources/Modlog.php

@@ -295,11 +295,12 @@ function ViewModlog()
 	$context['sub_template'] = 'show_list';
 	$context['default_list'] = 'moderation_log_list';
 
-	$context[$context['moderation_menu_name']]['tab_data'] = array(
-		'title' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log'],
-		'help' => $context['log_type'] == 3 ? 'adminlog' : 'modlog',
-		'description' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc']
-	);
+	if (isset($context['moderation_menu_name']))
+		$context[$context['moderation_menu_name']]['tab_data'] = array(
+			'title' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log'],
+			'help' => $context['log_type'] == 3 ? 'adminlog' : 'modlog',
+			'description' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc']
+		);
 }
 
 /**

+ 2 - 2
Sources/MoveTopic.php

@@ -456,7 +456,7 @@ function moveTopics($topics, $toBoard)
 	// Move over the mark_read data. (because it may be read and now not by some!)
 	$SaveAServer = max(0, $modSettings['maxMsgID'] - 50000);
 	$request = $smcFunc['db_query']('', '
-		SELECT lmr.id_member, lmr.id_msg, t.id_topic, lt.disregarded
+		SELECT lmr.id_member, lmr.id_msg, t.id_topic, IFNULL(lt.disregarded, 0) AS disregarded
 		FROM {db_prefix}topics AS t
 			INNER JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = t.id_board
 				AND lmr.id_msg > t.id_first_msg AND lmr.id_msg > {int:protect_lmr_msg})
@@ -471,7 +471,7 @@ function moveTopics($topics, $toBoard)
 	$log_topics = array();
 	while ($row = $smcFunc['db_fetch_assoc']($request))
 	{
-		$log_topics[] = array($row['id_topic'], $row['id_member'], $row['id_msg'], $row['disregarded']);
+		$log_topics[] = array($row['id_topic'], $row['id_member'], $row['id_msg'], (is_null($row['disregarded']) ? 0 : $row['disregarded']));
 
 		// Prevent queries from getting too big. Taking some steam off.
 		if (count($log_topics) > 500)

+ 2 - 2
Sources/Post.php

@@ -778,7 +778,7 @@ function Post($post_errors = array())
 				$form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message);
 
 			// Add a quote string on the front and end.
-			$form_message = '[quote author=' . $mname . ' link=topic=' . $topic . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $mdate . ']' . "\n" . rtrim($form_message) . "\n" . '[/quote]';
+			$form_message = '[quote author=' . $mname . ' link=msg=' . (int) $_REQUEST['quote'] . ' date=' . $mdate . ']' . "\n" . rtrim($form_message) . "\n" . '[/quote]';
 		}
 		// Posting a reply without a quote?
 		elseif (!empty($topic) && empty($_REQUEST['quote']))
@@ -2592,7 +2592,7 @@ function QuoteFast()
 		$lb = "\n";
 
 		// Add a quote string on the front and end.
-		$context['quote']['xml'] = '[quote author=' . $row['poster_name'] . ' link=topic=' . $row['id_topic'] . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $row['poster_time'] . ']' . $lb . $row['body'] . $lb . '[/quote]';
+		$context['quote']['xml'] = '[quote author=' . $row['poster_name'] . ' link=msg=' . (int) $_REQUEST['quote'] . ' date=' . $row['poster_time'] . ']' . $lb . $row['body'] . $lb . '[/quote]';
 		$context['quote']['text'] = strtr(un_htmlspecialchars($context['quote']['xml']), array('\'' => '\\\'', '\\' => '\\\\', "\n" => '\\n', '</script>' => '</\' + \'script>'));
 		$context['quote']['xml'] = strtr($context['quote']['xml'], array('&nbsp;' => '&#160;', '<' => '&lt;', '>' => '&gt;'));
 

+ 29 - 4
Sources/Profile-View.php

@@ -218,8 +218,20 @@ function showPosts($memID)
 		),
 	);
 
+	// Shortcut used to determine which $txt['show*'] string to use for the title, based on the SA
+	$title = array(
+		'attach' => 'Attachments',
+		'disregardedtopics' => 'Disregarded',
+		'topics' => 'Topics'
+	);
+
 	// Set the page title
-	$context['page_title'] = $txt['showPosts'] . ' - ' . $user_profile[$memID]['real_name'];
+	if (isset($_GET['sa']) && array_key_exists($_GET['sa'], $title))
+		$context['page_title'] = $txt['show' . $title[$_GET['sa']]];
+	else
+		$context['page_title'] = $txt['showPosts'];
+
+	$context['page_title'] .= ' - ' . $user_profile[$memID]['real_name'];
 
 	// Is the load average too high to allow searching just now?
 	if (!empty($context['load_average']) && !empty($modSettings['loadavg_show_posts']) && $context['load_average'] >= $modSettings['loadavg_show_posts'])
@@ -567,12 +579,19 @@ function showAttachments($memID)
 		'columns' => array(
 			'filename' => array(
 				'header' => array(
-					'value' => $txt['show_attach_downloads'],
+					'value' => $txt['show_attach_filename'],
 					'class' => 'lefttext',
 					'style' => 'width: 25%;',
 				),
 				'data' => array(
-					'db' => 'filename',
+					'sprintf' => array(
+						'format' => '<a href="' . $scripturl . '?action=dlattach;topic=%1$d.0;attach=%2$d">%3$s</a>',
+						'params' => array(
+							'topic' => true,
+							'id' => true,
+							'filename' => false,
+						),
+					),
 				),
 				'sort' => array(
 					'default' => 'a.filename',
@@ -600,7 +619,13 @@ function showAttachments($memID)
 					'style' => 'width: 30%;',
 				),
 				'data' => array(
-					'db' => 'subject',
+					'sprintf' => array(
+						'format' => '<a href="' . $scripturl . '?msg=%1$d">%2$s</a>',
+						'params' => array(
+							'msg' => true,
+							'subject' => false,
+						),
+					),
 				),
 				'sort' => array(
 					'default' => 'm.subject',

+ 1 - 1
Sources/SendTopic.php

@@ -139,7 +139,7 @@ function SendTopic()
 	sendmail($_POST['r_email'], $emaildata['subject'], $emaildata['body'], $_POST['y_email']);
 
 	// Back to the topic!
-	redirectexit('topic=' . $topic . '.0');
+	redirectexit('topic=' . $topic . '.0;topicsent');
 }
 
 /**

+ 1 - 2
Sources/Subs-Editor.php

@@ -1945,8 +1945,7 @@ function create_control_verification(&$verificationOptions, $do_test = false)
 
 		// Some javascript ma'am?
 		if (!empty($verificationOptions['override_visual']) || (!empty($modSettings['visual_verification_type']) && !isset($verificationOptions['override_visual'])))
-			$context['html_headers'] .= '
-		<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/captcha.js"></script>';
+			loadJavascriptFile('captcha.js', array('default_theme' => true));
 
 		$context['use_graphic_library'] = in_array('gd', get_loaded_extensions());
 

+ 7 - 0
Sources/Subs-Membergroups.php

@@ -112,6 +112,13 @@ function deleteMembergroups($groups)
 			'group_list' => $groups,
 		)
 	);
+	$smcFunc['db_query']('', '
+		DELETE FROM {db_prefix}moderator_groups
+		WHERE id_group IN ({array_int:group_list})',
+		array(
+			'group_list' => $groups,
+		)
+	);
 
 	// Delete any outstanding requests.
 	$smcFunc['db_query']('', '

+ 13 - 21
Sources/Subs.php

@@ -1009,8 +1009,8 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 			),
 			array(
 				'tag' => 'b',
-				'before' => '<strong>',
-				'after' => '</strong>',
+				'before' => '<span class="bbc_bold">',
+				'after' => '</span>',
 			),
 			array(
 				'tag' => 'bdo',
@@ -1373,7 +1373,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 				'tag' => 'quote',
 				'parameters' => array(
 					'author' => array('match' => '([^<>]{1,192}?)'),
-					'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|action=profile;u=\d+)'),
+					'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|msg=\d+?|action=profile;u=\d+)'),
 					'date' => array('match' => '(\d+)', 'validate' => 'timeformat'),
 				),
 				'before' => '<div class="quoteheader"><div class="topslice_quote"><a href="' . $scripturl . '?{link}">' . $txt['quote_from'] . ': {author} ' . $txt['search_on'] . ' {date}</a></div></div><blockquote>',
@@ -2916,21 +2916,16 @@ function setupThemeContext($forceload = false)
 	if ($modSettings['avatar_action_too_large'] == 'option_js_resize' && (!empty($modSettings['avatar_max_width_external']) || !empty($modSettings['avatar_max_height_external'])))
 	{
 		// @todo Move this over to script.js?
-		$context['html_headers'] .= '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var smf_avatarMaxWidth = ' . (int) $modSettings['avatar_max_width_external'] . ';
-		var smf_avatarMaxHeight = ' . (int) $modSettings['avatar_max_height_external'] . ';';
+		addJavascriptVar('smf_avatarMaxWidth', (int) $modSettings['avatar_max_width_external']);
+		addJavascriptVar('smf_avatarMaxHeight', (int) $modSettings['avatar_max_height_external']);
 
 		if (!isBrowser('ie'))
-			$context['html_headers'] .= '
-	window.addEventListener("load", smf_avatarResize, false);';
+			addInlineJavascript('window.addEventListener("load", smf_avatarResize, false);');
 		else
-			$context['html_headers'] .= '
-	var window_oldAvatarOnload = window.onload;
-	window.onload = smf_avatarResize;';
-
-		$context['html_headers'] .= '
-	// ]]></script>';
+		{
+			addJavascriptVar('window_oldAvatarOnload', 'window.onload');
+			addInlineJavascript('window.onload = smf_avatarResize;');
+		}
 	}
 
 	// This looks weird, but it's because BoardIndex.php references the variable.
@@ -2949,10 +2944,7 @@ function setupThemeContext($forceload = false)
 	$context['common_stats']['boardindex_total_posts'] = sprintf($txt['boardindex_total_posts'], $context['common_stats']['total_posts'], $context['common_stats']['total_topics'], $context['common_stats']['total_members']);
 
 	if (empty($settings['theme_version']))
-		$context['html_headers'] .= '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var smf_scripturl = "' . $scripturl . '";
-	// ]]></script>';
+		addJavascriptVar('smf_scripturl', $scripturl);
 
 	if (!isset($context['page_title']))
 		$context['page_title'] = '';
@@ -3213,7 +3205,7 @@ function template_javascript($do_defered = false)
 	global $context, $modSettings, $settings;
 
 	// Use this hook to minify/optimize Javascript files and vars
-	call_integration_hook('pre_javascript_output');
+	call_integration_hook('integrate_pre_javascript_output');
 
 	// Ouput the declared Javascript variables.
 	if (!empty($context['javascript_vars']) && !$do_defered)
@@ -3292,7 +3284,7 @@ function template_css()
 	global $context;
 
 	// Use this hook to minify/optimize CSS files
-	call_integration_hook('pre_css_output');
+	call_integration_hook('integrate_pre_css_output');
 
 	foreach ($context['css_files'] as $id => $file)
 		echo '

+ 1 - 0
Sources/Themes.php

@@ -48,6 +48,7 @@ function ThemesMain()
 	// Load the important language files...
 	loadLanguage('Themes');
 	loadLanguage('Settings');
+	loadLanguage('Drafts');
 
 	// No funny business - guests only.
 	is_not_guest();

+ 16 - 10
Themes/default/Display.template.php

@@ -22,6 +22,14 @@ function template_main()
 				', $txt['report_sent'], '
 			</div>';
 	}
+	// Topic was sent successfully
+	elseif ($context['topic_sent'])
+	{
+		echo '
+			<div class="infobox">
+				', $txt['topic_sent'], '
+			</div>';
+	}
 
 	// Show the anchor for the top and for the first message. If the first message is new, say so.
 	echo '
@@ -159,7 +167,7 @@ function template_main()
 				<div class="cat_bar">
 					<h3 class="catbg">
 						<img src="', $settings['images_url'], '/topic/', $context['class'], '.png" alt="" />
-						', $txt['topic'], ': ', $context['subject'], '&nbsp;<span>(', $context['num_views_text'], ')</span>
+						<span id="top_subject">', $txt['topic'], ': ', $context['subject'], '&nbsp;<span>(', $context['num_views_text'], ')</span></span>
 						<span class="nextlinks floatright">', $context['previous_next'], '</span>
 					</h3>
 				</div>';
@@ -439,14 +447,12 @@ function template_main()
 								<div class="messageicon" ', ($message['icon_url'] !== $settings['images_url'] . '/post/xx.png') ? '' : 'style="position: absolute; z-index: -1;"', '>
 									<img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
 								</div>';
-								
-								if (!empty($settings['subject_toggle']))
-								//Some people dont want subject ... 
-								echo'
-								<div id="subject_', $message['id'], '" class="subject_title">
-										<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
-								</div>';
-									echo'
+
+			//Some people dont want subject ... The div is still required or quick edit breaks...
+			echo'
+								<div id="subject_', $message['id'], '" class="subject_title">', (empty($settiongs['subject_toggle']) ? '' : '<a href="' . $message['href'] . '" rel="nofollow">' . $message['subject'] . '</a>'), '</div>';
+
+			echo'
 								<div class="page_number floatright">
 									', !empty($message['counter']) ? ' #' . $message['counter'] : '', ' ', '
 								</div>
@@ -900,7 +906,7 @@ function template_main()
 								<div id="quick_edit_body_container" style="width: 90%">
 									<div id="error_box" style="padding: 4px;" class="error"></div>
 									<textarea class="editor" name="message" rows="12" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 100%; min-width: 100%' : 'width: 100%') . '; margin-bottom: 10px;" tabindex="' . $context['tabindex']++ . '">%body%</textarea><br />
-									<input type="hidden" name="\' + smf_session_var + \'" value="\' + smf_session_id + \'" />
+									<input type="hidden" name="' . $context['session_var']  . '" value="' . $context['session_id'] . '" />
 									<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
 									<input type="hidden" name="msg" value="%msg_id%" />
 									<div class="righttext">

+ 3 - 2
Themes/default/ManageBans.template.php

@@ -27,7 +27,7 @@ function template_ban_edit()
 		echo '
 			<div class="information">', $txt['ban_add_notes'], '</div>';
 
-	// If there were errors for sending the PM, show them.
+	// If there were errors creating the ban, show them.
 	if (!empty($context['error_messages']))
 	{
 		echo '
@@ -172,7 +172,8 @@ function template_ban_edit()
 	echo '
 				<input type="submit" name="', $context['ban']['is_new'] ? 'add_ban' : 'modify_ban', '" value="', $context['ban']['is_new'] ? $txt['ban_add'] : $txt['ban_modify'], '" class="button_submit" />
 				<input type="hidden" name="old_expire" value="', $context['ban']['expiration']['days'], '" />
-				<input type="hidden" name="bg" value="', $context['ban']['id'], '" />
+				<input type="hidden" name="bg" value="', $context['ban']['id'], '" />', isset($context['ban']['from_user']) ? '
+				<input type="hidden" name="u" value="' . $context['ban_suggestions']['member']['id'] . '" />' : '', '
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 				<input type="hidden" name="', $context['admin-bet_token_var'], '" value="', $context['admin-bet_token'], '" />
 			</div>

+ 30 - 1
Themes/default/ManageMembergroups.template.php

@@ -325,7 +325,7 @@ function template_edit_group()
 	echo '
 					</dl>
 					<input type="submit" name="save" value="', $txt['membergroups_edit_save'], '" class="button_submit" />', $context['group']['allow_delete'] ? '
-					<input type="submit" name="delete" value="' . $txt['membergroups_delete'] . '" onclick="return confirm(\'' . ($context['is_moderator_group']) ? $txt['membergroups_confirm_delete_mod'] : $txt['membergroups_confirm_delete'] . '\');" class="button_submit" />' : '', '
+					<input type="submit" name="delete" value="' . $txt['membergroups_delete'] . '" onclick="return confirm(\'' . ($context['is_moderator_group'] ? $txt['membergroups_confirm_delete_mod'] : $txt['membergroups_confirm_delete']) . '\');" class="button_submit" />' : '', '
 				</div>
 			</div>
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -365,10 +365,38 @@ function template_edit_group()
 		<script type="text/javascript"><!-- // --><![CDATA[
 			function swapPostGroup(isChecked)
 			{
+				var is_moderator_group = ', $context['is_moderator_group'], ';
+				var group_type = ', $context['group']['type'], ';
 				var min_posts_text = document.getElementById(\'min_posts_text\');
 				var group_desc_text = document.getElementById(\'group_desc_text\');
 				var group_hidden_text = document.getElementById(\'group_hidden_text\');
 				var group_moderators_text = document.getElementById(\'group_moderators_text\');
+				
+				// If it\'s a moderator group, warn of possible problems... and remember the group type
+				if (isChecked && is_moderator_group && !confirm(\'', $txt['membergroups_swap_mod'], '\'))
+				{
+					isChecked = false;
+
+					switch(group_type)
+					{
+						case 0:
+							document.getElementById(\'group_type_private\').checked = true;
+							break;
+						case 1:
+							document.getElementById(\'group_type_protected\').checked = true;
+							break;
+						case 2:
+							document.getElementById(\'group_type_request\').checked = true;
+							break;
+						case 3:
+							document.getElementById(\'group_type_free\').checked = true;
+							break;
+						default:
+							document.getElementById(\'group_type_private\').checked = true;
+							break;
+					}
+				}
+				
 				document.forms.groupForm.min_posts.disabled = !isChecked;
 				min_posts_text.style.color = isChecked ? "" : "#888888";
 				document.forms.groupForm.group_desc_input.disabled = isChecked;
@@ -378,6 +406,7 @@ function template_edit_group()
 				document.forms.groupForm.group_moderators.disabled = isChecked;
 				group_moderators_text.style.color = !isChecked ? "" : "#888888";
 			}
+				
 			swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', ');
 		// ]]></script>';
 }

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

@@ -213,7 +213,7 @@ function template_main()
 		else
 			echo '
 					<th scope="col" class="first_th" width="8%">&nbsp;</th>
-					<th colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
+					<th colspan="3"><strong>', $txt['topic_alert_none'], '</strong></th>
 					<th scope="col" class="last_th" width="8%">&nbsp;</th>';
 
 		echo '

+ 2 - 1
Themes/default/PersonalMessage.template.php

@@ -598,7 +598,7 @@ function template_subject_list()
 	if (!$context['show_delete'])
 		echo '
 		<tr class="windowbg2">
-			<td colspan="5">', $txt['msg_alert_none'], '</td>
+			<td colspan="5">', $txt['pm_alert_none'], '</td>
 		</tr>';
 	$next_alternate = false;
 
@@ -1025,6 +1025,7 @@ function template_send()
 		echo '
 				<div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>',
 					sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), '
+					', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), '
 				</div>';
 
 	echo '

+ 1 - 0
Themes/default/Post.template.php

@@ -128,6 +128,7 @@ function template_main()
 		echo '
 				<div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>',
 					sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), '
+					', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), '
 				</div>';
 
 	// The post header... important stuff

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

@@ -215,7 +215,7 @@ function template_unread()
 		echo '
 			<div class="cat_bar">
 				<h3 class="catbg centertext">
-					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
+					', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '
 				</h3>
 			</div>';
 
@@ -374,7 +374,7 @@ function template_replies()
 		echo '
 			<div class="cat_bar">
 				<h3 class="catbg centertext">
-					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
+					', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '
 				</h3>
 			</div>';
 

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

@@ -149,6 +149,16 @@ function template_options()
 			),
 			'default' => true,
 		),
+		array(
+			'id' => 'drafts_autosave_enabled',
+			'label'  => $txt['drafts_autosave_enabled'],
+			'default' => true,
+		),
+		array(
+			'id' => 'drafts_show_saved_enabled',
+			'label'  => $txt['drafts_show_saved_enabled'],
+			'default' => true,
+		)
 	);
 }
 

+ 56 - 12
Themes/default/css/admin.css

@@ -22,10 +22,15 @@ body.action_admin #main_content_section {
 }
 body.action_admin .navigate_section ul {
 	padding: 5px 8px;
-	background: #fff url(../images/theme/lower_section.png) 0 100% repeat-x;
+
 	border: 1px solid #b8b8b8;
 	border-radius: 5px;
 	box-shadow: 0 1px 2px rgba(0,0,0,0.1);
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 body.action_admin .navigate_section ul li.unread_links {
 	display: none;
@@ -88,12 +93,17 @@ body.action_admin .navigate_section ul li a {
 	vertical-align: middle;
 }
 .action_admin .generic_list_wrapper .information {
-	background: #fff url(../images/theme/lower_section.png) 0 100% repeat-x;
+
 	margin: 8px 0;
 	padding: 4px 12px 2px 12px;
 	border: 1px solid #ccc;
 	border-radius: 2px;
 	box-shadow: 0 2px 2px rgba(0,0,0,0.1);
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 .action_admin .generic_list_wrapper .information div {
 	background: none;
@@ -162,8 +172,7 @@ div.quick_tasks {
 	box-shadow: none;
 }
 #admin_form_wrapper div.cat_bar:first-child h3.catbg, #admin_newsletters div.cat_bar:first-child h3.catbg,
-#generate_reports_type div.cat_bar:first-child h3.catbg, #groupForm div.cat_bar:first-child h3.catbg,
-#admin_form_wrapper h3.titlebg, #mailqueue_stats div.cat_bar:first-child  h3.catbg,
+#generate_reports_type div.cat_bar:first-child h3.catbg, #groupForm div.cat_bar:first-child h3.catbg, #mailqueue_stats div.cat_bar:first-child  h3.catbg,
 #new_group div.cat_bar:first-child  h3.catbg, #view_group div.cat_bar  h3.catbg, #view_group div.cat_bar:first-child  h3.catbg {
 	color: #444;
 	text-shadow: none;
@@ -172,10 +181,15 @@ div.quick_tasks {
 	border-bottom: 1px solid #bbb;
 }
 #admin_form_wrapper div.title_bar {
-	background: #fff url(../images/theme/lower_section.png) 0 0 repeat-x;
+
 	border: 1px solid #ccc;
 	border-radius: 2px 2px 0 0;
 	margin: 0;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 .action_admin .generic_list_wrapper .title_bar {
 	background: none;
@@ -185,7 +199,7 @@ div.quick_tasks {
 	border-bottom: 1px solid #bbb;
 }
 #admin_form_wrapper h3.titlebg {
-	color: #666;
+	color: #fff;
 	border-bottom: none;
 	padding: 8px 6px 5px 6px;
 }
@@ -233,19 +247,29 @@ div.quick_tasks {
 /* Newsletters screen.
 ---------------------------------------------*/
 #admin_newsletters .information {
-	background: #fff url(../images/theme/lower_section.png) 0 50% repeat-x;
+
 	margin: 8px 0;
 	padding: 8px 12px 6px 12px;
 	border: 1px solid #ccc;
 	border-radius: 2px;
 	box-shadow: 0 2px 2px rgba(0,0,0,0.1);
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 #advanced_panel_header {
 	margin-bottom: 8px;
-	background: #fff url(../images/theme/lower_section.png) 0 100% repeat-x;
+
 	box-shadow: 0 1px 2px rgba(0,0,0,0.1);
 	border: 1px solid #ccc;
 	border-radius: 2px;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 #advanced_panel_header a {
 	color: #444;
@@ -317,8 +341,13 @@ h3.catbg #quick_search form select option {
 }
 h3.catbg #quick_search form .button_submit {
 	font-weight: bold;
-	background: #fff url(../images/theme/lower_section.png) 0 100% repeat-x;
+
 	padding: 3px 6px 2px 6px;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 h3.catbg #quick_search form .button_submit:hover {
 	background: #fff;
@@ -407,10 +436,15 @@ body#chrome  #quick_search .button_submit {
 	border-top: 1px solid #bbb;
 	border-bottom: 1px solid #ddd;
 	border-radius: 0;
-	background: #fff url(../images/theme/upper_section.png) 0 -50px repeat-x;
+
 	box-shadow:  0 2px 2px rgba(255,255,255,0.5), 0 -1px 2px rgba(0,0,0,0.1);
 	height: 12em;
 	overflow: auto;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 #live_news div.content, #supportVersionsTable  div.content {
 	padding: 0;
@@ -784,7 +818,7 @@ pre.file_content {
 	padding: 0 0.5em;
 }
 #manage_boards span.modify_boards a {
-	background: #fff url(../images/theme/lower_section.png) 0 0 repeat-x;
+
 	border: 1px solid #aaa;
 	border-radius: 3px;
 	box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
@@ -792,12 +826,22 @@ pre.file_content {
 	font: 95%/115% verdana, Helvetica, sans-serif;
 	color: #222;
 	font-size: 1em;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 #manage_boards span.modify_boards a:hover {
-	background: #fff url(../images/theme/upper_section.png) 0 -40px repeat-x;
+
 	text-decoration: none;
 	color: #444;
 	box-shadow: -1px -1px 1px rgba(0,0,0,0.1);
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 #manage_boards .button_submit {
 	box-shadow: 1px 1px 2px rgba(0,0,0,0.1), 0 -1px 3px rgba(0,0,0,0.1) inset;

+ 176 - 57
Themes/default/css/index.css

@@ -134,20 +134,28 @@ input:focus, textarea:focus, button:focus, select:focus, textarea.editor:focus {
 	padding: 2px 4px;
 	float: right;
 	cursor: pointer;
-	background: #fff url(../images/theme/lower_section.png) 0 45% repeat-x;
 	border: 1px solid #ccc;
 	border-right: 1px solid #bbb;
 	border-bottom: 1px solid #aaa;
 	border-radius: 1px;
 	box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .button_submit:hover, .button_reset:hover, .button_link:hover {
-	background: #fff url(../images/theme/upper_section.png) 0 45% repeat-x;
 	color: #af6700;
 	border: 1px solid #ccc;
 	border-left: 1px solid #bbb;
 	border-top: 1px solid #aaa;
 	box-shadow: -1px -1px 2px rgba(0,0,0,0.07), -1px -2px 4px rgba(255,255,255,0.33) inset;
+	background: linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
 }
 a.button_link {
 	color: #000;
@@ -390,6 +398,9 @@ h3.largetext {
 .bbc_color a {
 	color: inherit;
 }
+.bbc_bold {
+	font-weight: bold;
+}
 .bbc_img {
 	border: 0;
 }
@@ -458,13 +469,21 @@ a img {
 	color: #444;
 	font-size: /*1.1em*/1em;
 	font-weight: bold;
-	background: #c5cfd9 url(../images/theme/bars.png) 0 -340px repeat-x;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 .catbg, .catbg2, tr.catbg td, tr.catbg2 td, tr.catbg th, tr.catbg2 th {
 	color: #fff;
 	font-size: 1.1em;
 	font-weight: bold;
-	background: #99abbf url(../images/theme/bars.png) 0 -170px repeat-x;
+	background: linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
 }
 
 /* adjust the table versions of headers */
@@ -549,7 +568,6 @@ div.pagesection div.floatright input, div.pagesection div.floatright select {
 .topbottom {
 	display: block;
 	cursor: pointer;
-	background: #fff url(../images/theme/lower_section.png) 0 45% repeat-x;
 	border: 1px solid #ccc;
 	border-right: 1px solid #bbb;
 	border-bottom: 1px solid #aaa;
@@ -558,16 +576,25 @@ div.pagesection div.floatright input, div.pagesection div.floatright select {
 	padding: 2px 7px 1px 7px;
 	margin: 5px 8px 0 0;
 	color: #222;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .topbottom:hover {
 	text-decoration: none;
-	background: #fff url(../images/theme/upper_section.png) 0 45% repeat-x;
 	color: #af6700;
 	text-decoration: none;
 	border: 1px solid #ccc;
 	border-left: 1px solid #bbb;
 	border-top: 1px solid #aaa;
 	box-shadow: -1px -1px 2px rgba(0,0,0,0.07), -1px -2px 4px rgba(255,255,255,0.33) inset;
+	background: linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
 }
 
 /* Sticky topics get a different background */
@@ -682,7 +709,8 @@ p.para2 {
 /* AJAX notification bar
 ------------------------------------------------------- */
 #ajax_in_progress {
-	background: url(../images/theme/loadingbar.png) repeat-x;
+	background: #fff;
+	border-bottom: 4px solid #f96f00;
 	color: #f96f00;
 	text-align: center;
 	font-size: 1.6em;
@@ -775,7 +803,10 @@ h3.catbg2 a:hover {
 	color: #fff;
 	text-decoration: none;
 }
-h3.titlebg a, h3.titlebg, h4.titlebg, h4.titlebg a {
+h3.titlebg, h4.titlebg {
+	color: #fff;
+}
+h3.titlebg a, h4.titlebg a {
 	color: #444;
 }
 h3.titlebg a:hover, h4.titlebg a:hover {
@@ -794,7 +825,11 @@ h4.catbg, h4.catbg2, h3.catbg, h3.catbg2, .table_list tbody.header td.catbg {
 	background: none;
 }
 h4.titlebg, h3.titlebg {
-	background: none;
+	background: #557EA0;
+	border-bottom: 1px solid #777;
+    border-radius: 6px 6px 0 0;
+	box-shadow: 0 16px 20px rgba(255,255,255,0.15) inset;
+	text-shadow: -1px -1px 1px rgba(0,0,0,0.2)
 }
 h4.titlebg img.icon {
 	float: left;
@@ -824,12 +859,14 @@ div.cat_bar {
 	height: 1.6em;
 }
 div.title_bar {
-	background: #c5cfd9 url(../images/theme/bars.png) 0 -340px repeat-x;
+	background: #557ea0;
+	box-shadow: 0 16px 20px rgba(255,255,255,0.15) inset;
+	text-shadow: -1px -1px 1px rgba(0,0,0,0.2)
 }
 
 /* Info center title bars are a bit different. */ /* @todo */
 /*div.title_barIC {
-	background: #dde3e9 url(../images/theme/bars.png) 0 0 repeat-x;
+	background: #dde3e9 url(../images/theme/bars.png) IMAGE NO LONGER EXISTS;
 }*/
 div.title_barIC h4.titlebg {
 	font-size: 1.1em;
@@ -1050,12 +1087,16 @@ img.sort {
 	width: 18.2em;
 	padding: 0.5em;
 	font-weight: normal;
-	background: #fff url(../images/theme/bars.png) 0 -580px repeat-x;
 	border: solid 1px #999;
 	border-left: solid 1px #bbb;
 	border-top: solid 1px #ccc;
 	border-radius: 2px 7px 0 4px;
 	box-shadow: 3px 3px 4px rgba(0,0,0,0.3);
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 /* Level 2 link background. */
 .dropmenu li li {
@@ -1110,16 +1151,25 @@ img.sort {
 }
 /* Levels 2 and 3 hover effects. */
 .dropmenu li li:hover, .adm_section .dropmenu li li:hover {
-	background: none;
 	border: 1px solid #cfcfcf;
 	border-top: 1px solid #d4dee6;
 	border-bottom: 1px solid #cbdae6;
-	background: #e3e9ef url(../images/theme/lower_section.png) 0 0 repeat-x;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .dropmenu li li:hover>a, .dropmenu li li.sfhover a:focus, .dropmenu li li a:hover, .dropmenu li li a:focus {
 	color: #333;
 	text-decoration: none;
-	background: #e3e9ef url(../images/theme/lower_section.png) 0 0 repeat-x;
+	border: 1px solid #cfcfcf;
+	border-top: 1px solid #d4dee6;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 /* Reposition Level 2 submenu as visible on hover. */
 .dropmenu li:hover ul, .dropmenu li.sfhover ul {
@@ -1195,7 +1245,11 @@ img.sort {
 }
 .adm_section .dropmenu {
 	padding: 4px 1px 9px 1px;
-	background: #fff url(../images/theme/upper_section.png) 0 -50px repeat-x;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 	float: none;
 }
 .adm_section .dropmenu li {
@@ -1240,7 +1294,11 @@ img.sort {
 }
 .adm_section .dropmenu li li a:hover {
 	color: #333;
-	background: #e3e9ef url(../images/theme/lower_section.png) 0 0 repeat-x;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 /* Note: The next declarations are for keyboard access with js disabled. */
 .adm_section .dropmenu ul a:focus {
@@ -1271,7 +1329,6 @@ img.sort {
 	display: block;
 	text-transform: uppercase;
 	cursor: pointer;
-	background: #fff url(../images/theme/lower_section.png) 0 45% repeat-x;
 	border: 1px solid #ccc;
 	border-right: 1px solid #bbb;
 	border-bottom: 1px solid #aaa;
@@ -1282,19 +1339,28 @@ img.sort {
 	overflow: visible;
 	color: #444;
 	font-size: 0.8em;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 /* Keep a consistent size when wrapped in pagesection. */
 .pagesection .buttonlist ul li a {
 	font-size: 0.889em;
 }
 .buttonlist ul li a:hover {
-	background: #fff url(../images/theme/upper_section.png) 0 45% repeat-x;
 	color: #af6700;
 	text-decoration: none;
 	border: 1px solid #ccc;
 	border-left: 1px solid #bbb;
 	border-top: 1px solid #aaa;
 	box-shadow: -1px -1px 2px rgba(0,0,0,0.07), -1px -2px 4px rgba(255,255,255,0.33) inset;
+	background: linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
 }
 .buttonlist ul li a span {
 	display: block;
@@ -1345,9 +1411,13 @@ img.sort {
 #top_section {
 	margin: 0;
 	padding: 0 4px;
-	background: #e2e9f3 url(../images/theme/lower_section.png) 0 0 repeat-x;
 	border-bottom: 1px solid #bbb;
 	box-shadow: 0 1px 4px rgba(0,0,0,0.16);
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 #top_section .frame{
 	clear: both;
@@ -1372,7 +1442,7 @@ img.sort {
  font-weight: bold;
 }
 #search_form {
-	padding: 8px 0 0 0;
+	padding: 4px 0 0 0;
 	text-align: right;
 	min-width: 30em;
 }
@@ -1392,8 +1462,12 @@ img.sort {
 	margin: 2px 5px;
 	padding: 1px 2px;
 	border-radius: 3px;
-	background: #fff url(../images/theme/lower_section.png) 0 45% repeat-x;
 	color: #333;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 /* @todo In practice it may be better to set a different value for Firefox and Opera only, */
 /*	just to save a little bit of code. Will wait for Opera detection on body tag. */
@@ -1402,9 +1476,13 @@ img.sort {
 	margin: 0 5px;
 }
 #search_form .button_submit:hover {
-	background: #fff url(../images/theme/upper_section.png) 0 45% repeat-x;
 	color: #a85400;
 	text-decoration: none;
+	background: linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
 }
 /* The logo and slogan. */
 #header {
@@ -1453,7 +1531,11 @@ img#smflogo {
 #inner_section {
 	padding: 12px 10px 2px 10px;
 	border-radius: 6px 6px 0 0;
-	background: #fff url(../images/theme/upper_section.png) 0 -43px repeat-x;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 98%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 98%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 98%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 98%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 98%);
 }
 #inner_section:after {
 	content:"";
@@ -1465,7 +1547,7 @@ img#smflogo {
 	width: 50%;
 	float: left;
 	overflow: auto;
-	padding: 0 4px;
+	padding: 0 4px 6px 4px;
 	font-size: 0.9em;
 }
 .user ul{
@@ -1508,7 +1590,7 @@ ul li.greeting {
 /* The upshrink image needs some tweaking */
 #upshrink, #upshrink:hover {
 	padding: 5px 4px 3px 4px;
-	background: #none;
+	background: none;
 }
 
 /* The navigation list (i.e. linktree) */
@@ -1527,11 +1609,15 @@ ul li.greeting {
 	padding: 0 10px;
 	font-size: 0.9em;
 	overflow: hidden;
-	background: #f0f4f7 url(../images/theme/upper_section.png) 0 -55px repeat-x;
 	border: 1px solid #ccc;
 	border-radius: 2px;
 	box-shadow: 0 -2px 2px rgba(0,0,0,0.08);
 	-moz-box-sizing: border-box; box-sizing: border-box; -webkit-box-sizing: border-box;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 .navigate_section ul li {
 	float: left;
@@ -1591,7 +1677,7 @@ ul li.greeting {
 	padding: 0;
 	overflow: auto;
 	background: #3e5a78;
-	border-top: 3px solid #bbb;
+	border-top: 3px solid #b2b6bd;
 
 }
 /* min-width should be equal to #wrapper min-width. */
@@ -1705,8 +1791,12 @@ ul li.greeting {
 	padding: 4px 0 0 0;
 }
 .table_list .icon, .table_list .info, .table_list .stats, .table_list .lastpost {
-	background: #fff url(../images/theme/upper_section.png) 0 -57px repeat-x;
 	border-top: double #ddd;
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 /* Hiding unwanted border repeats. */
 .table_list .content tr:first-child .icon, .table_list .content tr:first-child .info,
@@ -2111,9 +2201,16 @@ div#pollmoderation {
 	width: 100%;
 	-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
 }
-.poster .dropmenu  li ul li, .poster .dropmenu  li ul li:hover {
-	background: none;
+.poster .dropmenu  li ul li, .poster  {
+	border: none;
+}
+.dropmenu  li ul li:hover {
 	border: none;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .poster .dropmenu  li ul li.im_icons, .poster .dropmenu   ul ol li {
 	padding: 3px;
@@ -2153,26 +2250,15 @@ div#pollmoderation {
 }
 /* @todo Re-code this a bit to give background on anchor. */
 .poster li.poster_online, .poster li.poster_online:hover {
-	background: #fff url(../images/theme/lower_section.png) 0 40% repeat-x;
-	border: 1px solid #ccc;
-	border-right: 1px solid #bbb;
-	border-bottom: 1px solid #aaa;
-	box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
-	border-radius: 2px;
 	padding: 1px 1px 1px 1px;
-	color: #222;
 	margin: 3px 10px;
 }
-.poster li.poster_online a, .poster li.poster_online:hover a {
-	color: #333;
+.poster li.poster_online a {
+	color: #C06002;
 	line-height: 1.6em;
 }
-.poster li.poster_online:hover {
-	background: #fff url(../images/theme/upper_section.png) 0 -30px repeat-x;
-	box-shadow: 1px 1px 1px rgba(0,0,0,0.07) inset;
-	border: 1px solid #ccc;
-	border-left: 1px solid #bbb;
-	border-top: 1px solid #aaa;
+.poster li.poster_online:hover, .poster li.poster_online:hover a {
+	text-decoration: underline;
 }
 .poster li.warning a img {
 	vertical-align: bottom;
@@ -2320,7 +2406,6 @@ ul.quickbuttons li.inline_mod_check {
 	padding: 1px 1px 1px 1px;
 }
 .quickbuttons li {
-	background: #fff url(../images/theme/lower_section.png) 0 45% repeat-x;
 	border: 1px solid #ccc;
 	border-right: 1px solid #bbb;
 	border-bottom: 1px solid #aaa;
@@ -2330,17 +2415,27 @@ ul.quickbuttons li.inline_mod_check {
 	color: #222;
 	margin: 3px 19px;
 	overflow: visible;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .quickbuttons li:first-child {
 	border-radius: 4px 1px 1px 4px;
 	padding-bottom: 0;
 }
 .quickbuttons li:hover {
-	background: #fff url(../images/theme/upper_section.png) 0 -30px repeat-x;
-	box-shadow: 1px 1px 1px rgba(0,0,0,0.07) inset;
 	border: 1px solid #ccc;
-	border-left: 1px solid #bbb;
-	border-top: 1px solid #aaa;
+	border-right: 1px solid #bbb;
+	border-bottom: 1px solid #aaa;
+	border-radius: 1px;
+	box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
+	background: linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #E2E9F3 70%);
 }
 .quickbuttons li.quick_edit, .quickbuttons li.post_options {
 	padding: 0 6px 0 22px;
@@ -2382,12 +2477,16 @@ ul.quickbuttons li.inline_mod_check {
 	padding: 0.5em;
 	font-weight: normal;
 	text-align: left;
-	background: #fff url(../images/theme/bars.png) 0 -580px repeat-x;
 	border: solid 1px #999;
 	border-left: solid 1px #aaa;
 	border-top: solid 1px #bbb;
 	border-radius: 4px 2px 4px 0;
 	box-shadow: 2px 3px 3px rgba(0,0,0,0.2);
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .quickbuttons li:hover ul, .quickbuttons li.sfhover ul {
 	left: auto;
@@ -2406,7 +2505,11 @@ ul.quickbuttons li.inline_mod_check {
 	border: 1px solid #cfcfcf;
 	border-top: 1px solid #d4dee6;
 	border-bottom: 1px solid #cbdae6;
-	background: #e3e9ef url(../images/theme/lower_section.png) 0 0 repeat-x;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .quickbuttons ul li a, .quickbuttons ul li a:focus {
 	padding: 0 6px 0 26px;
@@ -2418,7 +2521,11 @@ ul.quickbuttons li.inline_mod_check {
 /* Note: The next declarations are for keyboard access with js disabled. */
 .quickbuttons ul li a:focus {
 	margin: 0 -9910px 0 9910px;
-	background: #e3e9ef url(../images/theme/lower_section.png) 0 0 repeat-x;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 /* Cancel for hover and/or js access. */
 .quickbuttons ul li:hover a:focus, .quickbuttons ul li.sfhover a:focus {
@@ -3460,6 +3567,7 @@ dl.stats dd {
 	border-radius: 1px 0 0 1px;
 	box-shadow: 4px -4px 8px rgba(0,0,0,0.1) inset, 4px 4px 8px rgba(255,255,255,0.3) inset;
 	display: block;
+
 	margin: 0 4px 0 0;
 	height: 1.4em;
 }
@@ -3910,7 +4018,11 @@ span.hidelink {
 	border-radius: 7px 7px 3px 3px;
 	max-height: none!important; /* Is this declaration necessary? None is the default anyway. */
 	overflow: visible!important;
-	background: #fff url(../images/theme/lower_section.png) 0 100% repeat-x;
+	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
+    background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
 }
 .popup_heading
 {
@@ -3928,13 +4040,17 @@ span.hidelink {
 	line-height: 1.6em;
 	max-height: 20em;
 	overflow: auto;
-	background: #fff url(../images/theme/upper_section.png) 0 -55px repeat-x;
 	margin: 0;
 	padding: 10px 8px;
 	border: 1px solid #bbb;
 	border-bottom: 1px solid #ccc;
 	border-radius: 6px 6px 2px 2px;
 	box-shadow: 0 -2px 3px rgba(0,0,0,0.15), 0 1px 1px rgba(255,255,255,0.2);
+	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
+    background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
 }
 .popup_heading .hide_popup
 {
@@ -4111,7 +4227,7 @@ span.hidelink {
 .add_buddy .roundframe, .add_buddy .title_bar {
 	background: none;
 	border: none;
-	max-width: 70em;
+	max-width: 100%;
 }
 #activitytime .windowbg2 .flow_hidden {
 	background: none;
@@ -4215,10 +4331,12 @@ tr.catbg th:last-child, #show_attachments th:last-child {
 	font-size: 1em;
 	color: #444;
 	text-shadow: none;
+	background:none;
 }
 #info_center .title_barIC:first-child, #info_center .title_barIC:first-child .titlebg {
 	border-top: none;
 	box-shadow: 0 -1px 0 #999 inset;
+	background: none;
 }
 #postmodify .roundframe .title_bar{
 	background: #f7f7f7;
@@ -4282,6 +4400,7 @@ tr.catbg th:last-child, #show_attachments th:last-child {
 	background: #fff2f2;
 }
 /* Color for background of *topics* requiring approval */
+
 .approvetbg {
 	color: #222;
 	background: #e4a17c;

+ 34 - 7
Themes/default/css/install.css

@@ -77,19 +77,34 @@ img#smflogo {
 	top: 0.5em;
 	left: -3.3em;
 }
+
+#overall_text_upgrade, #step_text_upgrade {
+	z-index: 2;
+	color: #111;
+	font-weight: bold;
+	position: absolute;
+	top: .5em;
+	left: -3.3em;
+}
 #overall_progress, #step_progress {
-	height: 2.3em;
+	height: 2.5em;
+	z-index: 1;
+}
+
+#overall_progress_upgrade, #step_progress_upgrade {
+	height: 2.5em;
 	z-index: 1;
-	background: lime;
+	background: #6BB247;
+	margin: 0px 3px 0px 0px;
 }
+.over_progress {
+
+margin: -33px 5px 0 10px;
+}
+
 #step_progress {
 	background: #ffd000;
 }
-.overall_progress, .progress {
-	position: absolute;
-	top: 0.5em;
-	left: 0.5em;
-}
 #substep_progress {
 	height: 2.3em;
 	z-index: 1;
@@ -153,4 +168,16 @@ img#smflogo {
 	border-radius: 5px;
 	box-shadow: 0 -2px 2px rgba(0,0,0,0.1);
 	/* End [WIP] */
+}
+
+#progress {
+	position: relative;
+	font-size: 1.2em;
+	height: 2.5em;
+	border: 1px solid black;
+	border-radius: 2px;
+	background: #fff;
+	float: left;
+	margin: 0.6em 0 0 4em;
+	width: 33%;
 }

BIN
Themes/default/images/theme/backdrop.png


BIN
Themes/default/images/theme/bars.png


BIN
Themes/default/images/theme/loadingbar.png


BIN
Themes/default/images/theme/lower_section.png


BIN
Themes/default/images/theme/submit_bg.png


BIN
Themes/default/images/theme/upper_section.png


+ 0 - 3
Themes/default/index.template.php

@@ -367,9 +367,6 @@ function template_body_below()
 			<a href="#top" id="bot"><img src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['go_up'], '" /></a>
 			<ul class="reset">
 				<li class="copyright">', theme_copyright(), '</li>
-				<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
-				', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
-				<li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
 			</ul>';
 
 	// Show the load time?

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

@@ -23,6 +23,7 @@ $txt['draft_retain'] = 'this will be retained for %s more days';
 $txt['draft_remove'] = 'Remove this draft';
 $txt['draft_saved'] = 'The contents have been saved as a draft, and will be accessible from the <a href="%1$s">Show Drafts area</a> of your profile.';
 $txt['draft_pm_saved'] = 'The contents have been saved as a draft, and will be accessible from the <a href="%1$s">Show Drafts area</a> of your message center.';
+$txt['draft_save_warning'] = 'Please note that all drafts will be automatically deleted after %1$d days.';
 
 // Admin options
 $txt['drafts_autosave_enabled'] = 'Enable automatic saving of drafts';

+ 2 - 1
Themes/default/languages/ManageMembers.english.php

@@ -36,7 +36,7 @@ $txt['membergroups_edit_hidden_no'] = 'Visible';
 $txt['membergroups_edit_hidden_boardindex'] = 'Visible - Apart from in group key';
 $txt['membergroups_edit_hidden_all'] = 'Invisible';
 // Do not use numeric entities in the below string.
-$txt['membergroups_edit_hidden_warning'] = 'Are you sure you want to disallow assignment of this group as a users primary group?\\n\\nDoing so will restrict assignment to additional groups only, and will update all current &quot;primary&quot; members to have it as an additional group only.';
+$txt['membergroups_edit_hidden_warning'] = 'Are you sure you want to disallow assignment of this group as a users primary group?\\n\\nDoing so will restrict assignment to additional groups only, and will update all current &quot;primary&quot; members to have it as an additional group only.\\n\\nIt will also remove the group as moderator from any boards it is currently assigned to moderate.';
 $txt['membergroups_edit_desc'] = 'Group description';
 $txt['membergroups_edit_group_type'] = 'Group type';
 $txt['membergroups_edit_select_group_type'] = 'Select Group type';
@@ -56,6 +56,7 @@ $txt['membergroups_edit_save'] = 'Save';
 $txt['membergroups_delete'] = 'Delete';
 $txt['membergroups_confirm_delete'] = 'Are you sure you want to delete this group?';
 $txt['membergroups_confirm_delete_mod'] = 'This group is assigned to moderate one or more boards. Are you sure you want to delete it?';
+$txt['membergroups_swap_mod'] = 'This group is assigned to moderate one or more boards. Changing it to a post group will result in that group being dropped as moderator of those boards.';
 
 $txt['membergroups_members_title'] = 'Viewing Group';
 $txt['membergroups_members_group_members'] = 'Group Members';

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

@@ -196,7 +196,7 @@ $txt['setting_warning_mute'] = 'Warning level for user muting';
 $txt['setting_warning_mute_note'] = 'The user warning level after which a user cannot post any further - 0 to disable.';
 $txt['setting_user_limit'] = 'Maximum user warning points per day';
 $txt['setting_user_limit_note'] = 'This value is the maximum amount of warning points a single moderator can assign to a user in a 24 hour period - 0 for no limit.';
-$txt['setting_warning_decrement'] = 'Warning points to decrement from users every 24 hours';
+$txt['setting_warning_decrement'] = 'Warning points that are decreased every 24 hours';
 $txt['setting_warning_decrement_note'] = 'Only applies to users not warned within last 24 hours - set to 0 to disable.';
 $txt['setting_warning_show'] = 'Users who can see warning status';
 $txt['setting_warning_show_note'] = 'Determines who can see the warning level of users on the forum.';

+ 5 - 2
Themes/default/languages/index.english.php

@@ -152,7 +152,6 @@ $txt['post_awaiting_approval'] = 'Note: This message is awaiting approval by a m
 $txt['there_are_unapproved_topics'] = 'There are %1$s topics and %2$s posts awaiting approval in this board. Click <a href="%3$s">here</a> to view them all.';
 $txt['send_message'] = 'Send message';
 
-$txt['msg_alert_none'] = 'No messages...';
 $txt['msg_alert_you_have'] = 'you have'; //Deprecated
 $txt['msg_alert_messages'] = 'messages'; //Deprecated
 $txt['msg_alert_no_messages'] = 'you don\'t have any message';
@@ -162,6 +161,9 @@ $txt['msg_alert_one_new'] = '1 is new';
 $txt['msg_alert_many_new'] = '%1$d are new';
 $txt['remove_message'] = 'Remove this message';
 
+$txt['topic_alert_none'] = 'No messages...';
+$txt['pm_alert_none'] = 'No messages...';
+
 $txt['online_users'] = 'Users Online';
 $txt['personal_message'] = 'Personal Message';
 $txt['jump_to'] = 'Jump to';
@@ -277,6 +279,7 @@ $txt['redirect_board'] = 'Redirect Board';
 
 $txt['sendtopic_send'] = 'Send';
 $txt['report_sent'] = 'Your report has been sent successfully.';
+$txt['topic_sent'] = 'Your email has been sent successfully.';
 
 $txt['time_offset'] = 'Time Offset';
 $txt['or'] = 'or';
@@ -644,7 +647,7 @@ $txt['powered_by_php'] = 'Powered by PHP';
 $txt['powered_by_mysql'] = 'Powered by MySQL';
 $txt['valid_css'] = 'Valid CSS';
 
-// Current footer strings
+// Current footer strings, no longer used
 $txt['valid_html'] = 'Valid HTML 4.01';
 $txt['valid_xhtml'] = 'Valid XHTML 1.0';
 $txt['wap2'] = 'WAP2';

+ 1 - 0
index.php

@@ -47,6 +47,7 @@ if ((empty($cachedir) || !file_exists($cachedir)) && file_exists($boarddir . '/c
 // Without those we can't go anywhere
 require_once($sourcedir . '/QueryString.php');
 require_once($sourcedir . '/Subs.php');
+require_once($sourcedir . '/Errors.php');
 require_once($sourcedir . '/Load.php');
 
 // If $maintenance is set specifically to 2, then we're upgrading or something.

+ 7 - 2
other/install.php

@@ -1099,9 +1099,13 @@ function DatabasePopulation()
 
 		if ($smcFunc['db_query']('', $current_statement, array('security_override' => true, 'db_error_skip' => true), $db_connection) === false)
 		{
+			// Use the appropriate function based on the DB type
+			if ($db_type == 'mysql' || $db_type =='mysqli')
+				$db_errorno = $db_type . '_errno';
+
 			// Error 1050: Table already exists!
 			// @todo Needs to be made better!
-			if ((($db_type != 'mysql' && $db_type != 'mysqli') || mysql_errno($db_connection) === 1050) && preg_match('~^\s*CREATE TABLE ([^\s\n\r]+?)~', $current_statement, $match) == 1)
+			if ((($db_type != 'mysql' && $db_type != 'mysqli') || $db_errno($db_connection) == 1050) && preg_match('~^\s*CREATE TABLE ([^\s\n\r]+?)~', $current_statement, $match) == 1)
 			{
 				$exists[] = $match[1];
 				$incontext['sql_results']['table_dups']++;
@@ -1109,7 +1113,8 @@ function DatabasePopulation()
 			// Don't error on duplicate indexes (or duplicate operators in PostgreSQL.)
 			elseif (!preg_match('~^\s*CREATE( UNIQUE)? INDEX ([^\n\r]+?)~', $current_statement, $match) && !($db_type == 'postgresql' && preg_match('~^\s*CREATE OPERATOR (^\n\r]+?)~', $current_statement, $match)))
 			{
-				$incontext['failures'][$count] = $smcFunc['db_error']();
+				// MySQLi requires a connection object. It's optional with MySQL, Postgres and sqlite
+				$incontext['failures'][$count] = $smcFunc['db_error']($db_connection);
 			}
 		}
 		else

+ 10 - 5
other/install_2-1_mysql.sql

@@ -1650,9 +1650,9 @@ VALUES
 	(8, 0, 0, 1, 'd', 1, 'birthdayemails'),
 	(9, 0, 0, 1, 'w', 0, 'weekly_maintenance'),
 	(10, 0, 120, 1, 'd', 1, 'paid_subscriptions'),
-	(11, 0, 120, 1, 'd', 1, 'remove_temp_attachments'),
-	(12, 0, 180, 1, 'd', 1, 'remove_topic_redirect'),
-	(13, 0, 240, 1, 'd', 1, 'remove_old_drafts');
+	(11, 0, 120, 1, 'd', 0, 'remove_temp_attachments'),
+	(12, 0, 180, 1, 'd', 0, 'remove_topic_redirect'),
+	(13, 0, 240, 1, 'd', 0, 'remove_old_drafts');
 
 # --------------------------------------------------------
 
@@ -1855,7 +1855,10 @@ VALUES ('smfVersion', '{$smf_version}'),
 	('attachment_thumb_png', '1'),
 	('avatar_reencode', '1'),
 	('avatar_paranoid', '0'),
-	('enable_disregard', '0');
+	('enable_disregard', '0'),
+	('drafts_autosave_enabled', '1'),
+	('drafts_show_saved_enabled', '1'),
+	('drafts_keep_days', '7');
 # --------------------------------------------------------
 
 #
@@ -2015,7 +2018,9 @@ VALUES (1, 'name', '{$default_theme_name}'),
 	(1, 'additional_options_collapsable', '1'),
 	(1, 'use_image_buttons', '1'),
 	(1, 'enable_news', '1'),
-	(1, 'forum_width', '90%');
+	(1, 'forum_width', '90%'),
+	(1, 'drafts_autosave_enabled', '1'),
+	(1, 'drafts_show_saved_enabled', '1');
 
 INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'display_quick_reply', '2');
 INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'posts_apply_ignore_list', '1');

+ 8 - 3
other/install_2-1_postgresql.sql

@@ -2141,9 +2141,9 @@ INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_r
 INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (8, 0, 0, 1, 'd', 1, 'birthdayemails');
 INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (9, 0, 0, 1, 'w', 0, 'weekly_maintenance');
 INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (10, 0, 120, 1, 'd', 1, 'paid_subscriptions');
-INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (11, 0, 120, 1, 'd', 1, 'remove_temp_attachments');
-INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (12, 0, 180, 1, 'd', 1, 'remove_topic_redirect');
-INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (13, 0, 240, 1, 'd', 1, 'remove_old_drafts');
+INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (11, 0, 120, 1, 'd', 0, 'remove_temp_attachments');
+INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (12, 0, 180, 1, 'd', 0, 'remove_topic_redirect');
+INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (13, 0, 240, 1, 'd', 0, 'remove_old_drafts');
 
 # --------------------------------------------------------
 
@@ -2345,6 +2345,9 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('attachment_thumb_png
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('avatar_reencode', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('avatar_paranoid', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('enable_disregard', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
 # --------------------------------------------------------
 
 #
@@ -2527,6 +2530,8 @@ INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'additiona
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'use_image_buttons', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'enable_news', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'forum_width', '90%');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'drafts_show_saved_enabled', '1');
 INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'display_quick_reply', '2');
 INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'posts_apply_ignore_list', '1');
 # --------------------------------------------------------

+ 8 - 3
other/install_2-1_sqlite.sql

@@ -1792,9 +1792,9 @@ INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_r
 INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (8, 0, 0, 1, 'd', 1, 'birthdayemails');
 INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (9, 0, 0, 1, 'w', 0, 'weekly_maintenance');
 INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (10, 0, 120, 1, 'd', 1, 'paid_subscriptions');
-INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (11, 0, 120, 1, 'd', 1, 'remove_temp_attachments');
-INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (12, 0, 180, 1, 'd', 1, 'remove_topic_redirect');
-INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (13, 0, 240, 1, 'd', 1, 'remove_old_drafts');
+INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (11, 0, 120, 1, 'd', 0, 'remove_temp_attachments');
+INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (12, 0, 180, 1, 'd', 0, 'remove_topic_redirect');
+INSERT INTO {$db_prefix}scheduled_tasks	(id_task, next_time, time_offset, time_regularity, time_unit, disabled, task) VALUES (13, 0, 240, 1, 'd', 0, 'remove_old_drafts');
 COMMIT;
 
 # --------------------------------------------------------
@@ -2001,6 +2001,9 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('attachment_thumb_png
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('avatar_reencode', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('avatar_paranoid', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('enable_disregard', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
 COMMIT;
 
 # --------------------------------------------------------
@@ -2167,6 +2170,8 @@ INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'additiona
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'use_image_buttons', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'enable_news', '1');
 INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'forum_width', '90%');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES (1, 'drafts_show_saved_enabled', '1');
 INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'display_quick_reply', '2');
 INSERT INTO {$db_prefix}themes (id_member, id_theme, variable, value) VALUES (-1, 1, 'posts_apply_ignore_list', '1');
 COMMIT;

+ 29 - 29
other/upgrade.php

@@ -2550,7 +2550,7 @@ function upgrade_query($string, $unbuffered = false)
 	// Get the query result - working around some SMF specific security - just this once!
 	$modSettings['disableQueryCheck'] = true;
 	$db_unbuffered = $unbuffered;
-	$result = $smcFunc['db_query']('', $string, 'security_override');
+	$result = $smcFunc['db_query']('', $string, array('security_override' => true, 'db_error_skip' => true));
 	$db_unbuffered = false;
 
 	// Failure?!
@@ -3536,19 +3536,13 @@ function template_upgrade_above()
 	</head>
 	<body>
 	<div id="header"><div class="frame">
-		<div id="top_section">
-			<h1 class="forumtitle">', $txt['upgrade_upgrade_utility'], '</h1>
+				<h1 class="forumtitle">', $txt['upgrade_upgrade_utility'], '</h1>
 			<img id="smflogo" src="', $settings['default_theme_url'], '/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />
-		</div>
-		<div id="upper_section" class="middletext flow_hidden">
-			<div class="user"></div>
-			<div class="news normaltext">
-			</div>
-		</div>
 	</div></div>
-	<div id="content_section"><div class="frame">
+	<div id="wrapper">
+	<div id="upper_section">
 		<div id="main_content_section">
-			<div id="main-steps">
+			<div id="main_steps">
 				<h2>', $txt['upgrade_progress'], '</h2>
 				<ul>';
 
@@ -3559,22 +3553,23 @@ function template_upgrade_above()
 	echo '
 					</ul>
 			</div>
-			<div style="float: left; width: 40%;">
-				<div style="font-size: 8pt; height: 12pt; border: 1px solid black; background-color: white; width: 50%; margin: auto;">
-					<div id="overall_text" style="color: #000; position: absolute; margin-left: -5em;">', $upcontext['overall_percent'], '%</div>
-					<div id="overall_progress" style="width: ', $upcontext['overall_percent'], '%; height: 12pt; z-index: 1; background-color: lime;">&nbsp;</div>
-					<div class="progress">', $txt['upgrade_overall_progress'], '</div>
-				</div>
-				';
+
+			<div id="progress">
+				<div id="overall_text_upgrade">', $upcontext['overall_percent'], '%</div>
+				<div id="overall_progress_upgrade" style="width: ', $upcontext['overall_percent'], '%;">&nbsp;</div>
+				<div class="over_progress">', $txt['upgrade_overall_progress'], '</div>
+			</div>';
 
 	if (isset($upcontext['step_progress']))
 		echo '
-				<div style="font-size: 8pt; height: 12pt; border: 1px solid black; background-color: white; width: 50%; margin: 5px auto; ">
-					<div id="step_text" style="color: #000; position: absolute; margin-left: -5em;">', $upcontext['step_progress'], '%</div>
-					<div id="step_progress" style="width: ', $upcontext['step_progress'], '%; height: 12pt; z-index: 1; background-color: #ffd000;">&nbsp;</div>
-					<div class="progress">', $txt['upgrade_step_progress'], '</div>
-				</div>
-				';
+				
+				<br />
+				<br />
+				<div id="progress">
+					<div id="step_text_upgrade">', $upcontext['step_progress'], '%</div>
+					<div id="step_progress_upgrade" style="width: ', $upcontext['step_progress'], '%;background-color: #ffd000;">&nbsp;</div>
+					<div class="over_progress">', $txt['upgrade_step_progress'], '</div>
+					</div>';
 
 	echo '
 				<div id="substep_bar_div" class="smalltext" style="display: ', isset($upcontext['substep_progress']) ? '' : 'none', ';">', isset($upcontext['substep_progress_name']) ? trim(strtr($upcontext['substep_progress_name'], array('.' => ''))) : '', ':</div>
@@ -3588,11 +3583,14 @@ function template_upgrade_above()
 	$mins = (int) ($elapsed / 60);
 	$seconds = $elapsed - $mins * 60;
 	echo '
-								<div class="smalltext" style="padding: 5px; text-align: center;">', $txt['upgrade_time_elapsed'], ':
+								<br /> <br /> <br /> <br />
+								<div class="smalltext" style="padding: 5px; text-align: center;"><br />', $txt['upgrade_time_elapsed'], ':
 									<span id="mins_elapsed">', $mins, '</span> ', $txt['upgrade_time_mins'], ', <span id="secs_elapsed">', $seconds, '</span> ', $txt['upgrade_time_secs'], '.
 								</div>';
 	echo '
 			</div>
+			</div>
+			<div id="content_section">
 			<div id="main_screen" class="clear">
 				<h2>', $upcontext['page_title'], '</h2>
 				<div class="panel">
@@ -3636,10 +3634,12 @@ function template_upgrade_below()
 						</div>
 				</div>
 			</div>
+			</div>
 		</div>
-	</div></div>
 	<div id="footer_section"><div class="frame" style="height: 40px;">
-		<div class="smalltext"><a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank" class="new_win">SMF &copy;2011, Simple Machines</a></div>
+	<ul class="reset">
+		<li class="copyright"><a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank" class="new_win">SMF &copy;2013, Simple Machines</a></li>
+	</ul>
 	</div></div>
 	</body>
 </html>';
@@ -3946,10 +3946,10 @@ function template_upgrade_options()
 					</tr>
 					<tr valign="top">
 						<td width="2%">
-							<input type="checkbox" name="stats" id="stats" value="1"', empty($modSettings['allow_sm_stats']) ? '' : ' checked="checked"', ' class="input_check" />
+							<input type="checkbox" name="stat" id="stat" value="1"', empty($modSettings['allow_sm_stats']) ? '' : ' checked="checked"', ' class="input_check" />
 						</td>
 						<td width="100%">
-							<label for="stats">
+							<label for="stat">
 								Allow Simple Machines to Collect Basic Stats Monthly.<br />
 								<span class="smalltext">If enabled, this will allow Simple Machines to visit your site once a month to collect basic statistics. This will help us make decisions as to which configurations to optimise the software for. For more information please visit our <a href="http://www.simplemachines.org/about/stats.php" target="_blank">info page</a>.</span>
 							</label>

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

@@ -269,7 +269,7 @@ if (@$modSettings['smfVersion'] < '2.1')
 			VALUES
 				" . implode(',', $inserts));
 
-	// Next we find people who can send PM's, and assume they can save pm_drafts as well
+	// Next we find people who can send PMs, and assume they can save pm_drafts as well
 	$request = upgrade_query("
 		SELECT id_group, add_deny, permission
 		FROM {$db_prefix}permissions
@@ -290,6 +290,18 @@ if (@$modSettings['smfVersion'] < '2.1')
 				" . implode(',', $inserts));
 }
 ---}
+INSERT INTO {$db_prefix}settings
+	(variable, value)
+VALUES
+	('drafts_autosave_enabled', '1'),
+	('drafts_show_saved_enabled', '1'),
+	('drafts_keep_days', '7');
+
+INSERT INTO {$db_prefix}themes
+	(id_theme, variable, value)
+VALUES
+	('1', 'drafts_autosave_enabled', '1'),
+	('1', 'drafts_show_saved_enabled', '1');
 ---#
 
 /******************************************************************************/
@@ -301,3 +313,12 @@ CREATE TABLE IF NOT EXISTS {$db_prefix}moderator_groups (
   id_group smallint(5) unsigned NOT NULL default '0',
   PRIMARY KEY (id_board, id_group)
 ) ENGINE=MyISAM;
+---#
+
+/******************************************************************************/
+--- Cleaning up integration hooks
+/******************************************************************************/
+---# Deleting integration hooks
+DELETE FROM {$db_prefix}settings
+WHERE variable LIKE 'integrate_%';
+---#

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

@@ -317,13 +317,18 @@ if (@$modSettings['smfVersion'] < '2.1')
 	$smcFunc['db_free_result']($request);
 
 	if (!empty($inserts))
-		upgrade_query("
-			INSERT IGNORE INTO {$db_prefix}board_permissions
-				(id_group, id_board, permission, add_deny)
-			VALUES
-				" . implode(',', $inserts));
+	{
+		foreach ($inserts AS $insert)
+		{
+			upgrade_query("
+				INSERT INTO {$db_prefix}board_permissions
+					(id_group, id_board, permission, add_deny)
+				VALUES
+					" . $insert);
+		}
+	}
 
-	// Next we find people who can send PM's, and assume they can save pm_drafts as well
+	// Next we find people who can send PMs, and assume they can save pm_drafts as well
 	$request = upgrade_query("
 		SELECT id_group, add_deny, permission
 		FROM {$db_prefix}permissions
@@ -337,13 +342,23 @@ if (@$modSettings['smfVersion'] < '2.1')
 	$smcFunc['db_free_result']($request);
 
 	if (!empty($inserts))
-		upgrade_query("
-			INSERT IGNORE INTO {$db_prefix}permissions
-				(id_group, permission, add_deny)
-			VALUES
-				" . implode(',', $inserts));
+	{
+		foreach ($inserts AS $insert)
+		{
+			upgrade_query("
+				INSERT INTO {$db_prefix}permissions
+					(id_group, permission, add_deny)
+				VALUES
+					" . $insert);
+		}
+	}
 }
 ---}
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES ('1', 'drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES ('1', 'drafts_show_saved_enabled', '1');
 ---#
 
 /******************************************************************************/
@@ -355,3 +370,12 @@ CREATE TABLE IF NOT EXISTS {$db_prefix}moderator_groups (
   id_group smallint NOT NULL default '0',
   PRIMARY KEY (id_board, id_group)
 );
+---#
+
+/******************************************************************************/
+--- Cleaning up integration hooks
+/******************************************************************************/
+---#
+DELETE FROM {$db_prefix}settings
+WHERE variable LIKE 'integrate_%';
+---#

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

@@ -301,13 +301,18 @@ if (@$modSettings['smfVersion'] < '2.1')
 	$smcFunc['db_free_result']($request);
 
 	if (!empty($inserts))
-		upgrade_query("
-			INSERT IGNORE INTO {$db_prefix}board_permissions
-				(id_group, id_board, permission, add_deny)
-			VALUES
-				" . implode(',', $inserts));
+	{
+		foreach ($inserts AS $insert)
+		{
+			upgrade_query("
+				INSERT INTO {$db_prefix}board_permissions
+					(id_group, id_board, permission, add_deny)
+				VALUES
+					" . $insert);
+		}
+	}
 
-	// Next we find people who can send PM's, and assume they can save pm_drafts as well
+	// Next we find people who can send PMs, and assume they can save pm_drafts as well
 	$request = upgrade_query("
 		SELECT id_group, add_deny, permission
 		FROM {$db_prefix}permissions
@@ -321,13 +326,23 @@ if (@$modSettings['smfVersion'] < '2.1')
 	$smcFunc['db_free_result']($request);
 
 	if (!empty($inserts))
-		upgrade_query("
-			INSERT IGNORE INTO {$db_prefix}permissions
-				(id_group, permission, add_deny)
-			VALUES
-				" . implode(',', $inserts));
+	{
+		foreach ($inserts AS $insert)
+		{
+			upgrade_query("
+				INSERT INTO {$db_prefix}permissions
+					(id_group, permission, add_deny)
+				VALUES
+					" . $insert);
+		}
+	}
 }
 ---}
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES ('1', 'drafts_autosave_enabled', '1');
+INSERT INTO {$db_prefix}themes (id_theme, variable, value) VALUES ('1', 'drafts_show_saved_enabled', '1');
 ---#
 
 /******************************************************************************/
@@ -339,3 +354,12 @@ CREATE TABLE IF NOT EXISTS {$db_prefix}moderator_groups (
   id_group smallint NOT NULL default '0',
   PRIMARY KEY (id_board, id_group)
 );
+---#
+
+/******************************************************************************/
+--- Cleaning up integration hooks
+/******************************************************************************/
+---#
+DELETE FROM {$db_prefix}settings
+WHERE variable LIKE 'integrate_%';
+---#