Browse Source

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

Suki 10 years ago
parent
commit
a3b9c9a75c
95 changed files with 922 additions and 842 deletions
  1. 35 35
      SSI.php
  2. 21 16
      Sources/Calendar.php
  3. 1 4
      Sources/Display.php
  4. 50 2
      Sources/Help.php
  5. 18 3
      Sources/Load.php
  6. 2 2
      Sources/ManageAttachments.php
  7. 0 1
      Sources/ManageCalendar.php
  8. 1 1
      Sources/ManageLanguages.php
  9. 4 3
      Sources/ManageMaintenance.php
  10. 1 1
      Sources/ManageNews.php
  11. 16 1
      Sources/ManagePaid.php
  12. 0 3
      Sources/ManagePermissions.php
  13. 2 2
      Sources/ManageScheduledTasks.php
  14. 2 2
      Sources/ManageSearch.php
  15. 1 2
      Sources/ManageSettings.php
  16. 2 2
      Sources/ManageSmileys.php
  17. 0 7
      Sources/Memberlist.php
  18. 90 77
      Sources/MessageIndex.php
  19. 7 7
      Sources/ModerationCenter.php
  20. 7 42
      Sources/News.php
  21. 30 0
      Sources/Packages.php
  22. 24 0
      Sources/Poll.php
  23. 3 3
      Sources/Post.php
  24. 4 4
      Sources/Profile-Actions.php
  25. 45 8
      Sources/Profile-Modify.php
  26. 7 4
      Sources/Profile-View.php
  27. 1 1
      Sources/Register.php
  28. 0 2
      Sources/Security.php
  29. 7 128
      Sources/SendTopic.php
  30. 4 4
      Sources/SplitTopics.php
  31. 5 0
      Sources/Subs-Admin.php
  32. 3 45
      Sources/Subs-Calendar.php
  33. 1 1
      Sources/Subs-Charset.php
  34. 5 2
      Sources/Subs-Graphics.php
  35. 2 2
      Sources/Subs-Membergroups.php
  36. 1 1
      Sources/Subs-Members.php
  37. 1 1
      Sources/Subs-OpenID.php
  38. 2 2
      Sources/Subs-Post.php
  39. 1 1
      Sources/Subs-Recent.php
  40. 2 9
      Sources/Subs.php
  41. 90 0
      Sources/tasks/EventNew-Notify.php
  42. 1 1
      Sources/tasks/GroupReq-Notify.php
  43. 2 2
      Themes/default/Admin.template.php
  44. 1 5
      Themes/default/BoardIndex.template.php
  45. 7 11
      Themes/default/Calendar.template.php
  46. 9 7
      Themes/default/Display.template.php
  47. 7 7
      Themes/default/Errors.template.php
  48. 15 0
      Themes/default/Help.template.php
  49. 3 3
      Themes/default/ManageLanguages.template.php
  50. 2 2
      Themes/default/ManageMembergroups.template.php
  51. 6 6
      Themes/default/ManagePaid.template.php
  52. 1 4
      Themes/default/Memberlist.template.php
  53. 8 5
      Themes/default/MessageIndex.template.php
  54. 12 12
      Themes/default/Packages.template.php
  55. 49 11
      Themes/default/Profile.template.php
  56. 4 4
      Themes/default/Recent.template.php
  57. 1 1
      Themes/default/Register.template.php
  58. 0 76
      Themes/default/SendTopic.template.php
  59. 1 1
      Themes/default/Who.template.php
  60. 0 49
      Themes/default/Xml.template.php
  61. 5 0
      Themes/default/css/admin.css
  62. 6 0
      Themes/default/css/index.css
  63. BIN
      Themes/default/fonts/AnonymousPro_end.gdf
  64. BIN
      Themes/default/fonts/ConsolaMono_end.gdf
  65. BIN
      Themes/default/fonts/Pfennig_end.gdf
  66. BIN
      Themes/default/images/filter.png
  67. BIN
      Themes/default/images/generic_icons.png
  68. 4 1
      Themes/default/index.template.php
  69. 5 2
      Themes/default/languages/Alerts.english.php
  70. 1 41
      Themes/default/languages/EmailTemplates.english.php
  71. 0 3
      Themes/default/languages/Errors.english.php
  72. 8 26
      Themes/default/languages/Help.english.php
  73. 0 1
      Themes/default/languages/ManageCalendar.english.php
  74. 5 0
      Themes/default/languages/ManagePaid.english.php
  75. 1 3
      Themes/default/languages/ManagePermissions.english.php
  76. 0 1
      Themes/default/languages/ManageSettings.english.php
  77. 10 2
      Themes/default/languages/Modlog.english.php
  78. 2 0
      Themes/default/languages/Post.english.php
  79. 3 0
      Themes/default/languages/Profile.english.php
  80. 0 1
      Themes/default/languages/Reports.english.php
  81. 0 1
      Themes/default/languages/Who.english.php
  82. 10 5
      Themes/default/languages/index.english.php
  83. 11 1
      cron.php
  84. 0 1
      index.php
  85. 6 1
      other/install.php
  86. 1 14
      other/install_2-1_mysql.sql
  87. 2 15
      other/install_2-1_postgresql.sql
  88. 2 15
      other/install_2-1_sqlite.sql
  89. 2 15
      other/install_2-1_sqlite3.sql
  90. 3 3
      other/upgrade.php
  91. 56 4
      other/upgrade_2-1_mysql.sql
  92. 55 3
      other/upgrade_2-1_postgresql.sql
  93. 55 3
      other/upgrade_2-1_sqlite.sql
  94. 4 4
      ssi_examples.php
  95. 38 38
      ssi_examples.shtml

+ 35 - 35
SSI.php

@@ -400,19 +400,19 @@ function ssi_queryPosts($query_where = '', $query_where_params = array(), $query
 		return $posts;
 
 	echo '
-		<table border="0" class="ssi_table">';
+		<table style="border: none" class="ssi_table">';
 	foreach ($posts as $post)
 		echo '
 			<tr>
-				<td align="right" valign="top" nowrap="nowrap">
+				<td style="text-align: right; vertical-align: top; white-space: nowrap">
 					[', $post['board']['link'], ']
 				</td>
-				<td valign="top">
+				<td style="vertical-align: top">
 					<a href="', $post['href'], '">', $post['subject'], '</a>
 					', $txt['by'], ' ', $post['poster']['link'], '
 					', $post['is_new'] ? '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts">' . $txt['new'] . '</span></a>' : '', '
 				</td>
-				<td align="right" nowrap="nowrap">
+				<td style="text-align: right; white-space: nowrap">
 					', $post['time'], '
 				</td>
 			</tr>';
@@ -556,19 +556,19 @@ function ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boar
 		return $posts;
 
 	echo '
-		<table border="0" class="ssi_table">';
+		<table style="border: none" class="ssi_table">';
 	foreach ($posts as $post)
 		echo '
 			<tr>
-				<td align="right" valign="top" nowrap="nowrap">
+				<td style="text-align: right; vertical-align: top; white-space: nowrap">
 					[', $post['board']['link'], ']
 				</td>
-				<td valign="top">
+				<td style="vertical-align: top">
 					<a href="', $post['href'], '">', $post['subject'], '</a>
 					', $txt['by'], ' ', $post['poster']['link'], '
 					', !$post['is_new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts">' . $txt['new'] . '</span></a>', '
 				</td>
-				<td align="right" nowrap="nowrap">
+				<td style="text-align: right; white-space: nowrap">
 					', $post['time'], '
 				</td>
 			</tr>';
@@ -654,16 +654,16 @@ function ssi_topBoards($num_top = 10, $output_method = 'echo')
 	echo '
 		<table class="ssi_table">
 			<tr>
-				<th align="left">', $txt['board'], '</th>
-				<th align="left">', $txt['board_topics'], '</th>
-				<th align="left">', $txt['posts'], '</th>
+				<th style="text-align: left">', $txt['board'], '</th>
+				<th style="text-align: left">', $txt['board_topics'], '</th>
+				<th style="text-align: left">', $txt['posts'], '</th>
 			</tr>';
 	foreach ($boards as $board)
 		echo '
 			<tr>
 				<td>', $board['link'], $board['new'] ? ' <a href="' . $board['href'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>' : '', '</td>
-				<td align="right">', comma_format($board['num_topics']), '</td>
-				<td align="right">', comma_format($board['num_posts']), '</td>
+				<td style="text-align: right">', comma_format($board['num_topics']), '</td>
+				<td style="text-align: right">', comma_format($board['num_posts']), '</td>
 			</tr>';
 	echo '
 		</table>';
@@ -672,7 +672,7 @@ function ssi_topBoards($num_top = 10, $output_method = 'echo')
 // Shows the top topics.
 function ssi_topTopics($type = 'replies', $num_topics = 10, $output_method = 'echo')
 {
-	global $txt, $scripturl, $user_info, $modSettings, $smcFunc, $context;
+	global $txt, $scripturl, $modSettings, $smcFunc, $context;
 
 	if ($modSettings['totalMessages'] > 100000)
 	{
@@ -737,18 +737,18 @@ function ssi_topTopics($type = 'replies', $num_topics = 10, $output_method = 'ec
 	echo '
 		<table class="ssi_table">
 			<tr>
-				<th align="left"></th>
-				<th align="left">', $txt['views'], '</th>
-				<th align="left">', $txt['replies'], '</th>
+				<th style="text-align: left"></th>
+				<th style="text-align: left">', $txt['views'], '</th>
+				<th style="text-align: left">', $txt['replies'], '</th>
 			</tr>';
 	foreach ($topics as $topic)
 		echo '
 			<tr>
-				<td align="left">
+				<td style="text-align: left">
 					', $topic['link'], '
 				</td>
-				<td align="right">', comma_format($topic['num_views']), '</td>
-				<td align="right">', comma_format($topic['num_replies']), '</td>
+				<td style="text-align: right">', comma_format($topic['num_views']), '</td>
+				<td style="text-align: right">', comma_format($topic['num_replies']), '</td>
 			</tr>';
 	echo '
 		</table>';
@@ -868,7 +868,7 @@ function ssi_fetchGroupMembers($group_id = null, $output_method = 'echo')
 // Fetch some member data!
 function ssi_queryMembers($query_where = null, $query_where_params = array(), $query_limit = '', $query_order = 'id_member DESC', $output_method = 'echo')
 {
-	global $context, $scripturl, $txt, $user_info;
+	global $context, $scripturl, $txt;
 	global $modSettings, $smcFunc, $memberContext;
 
 	if ($query_where === null)
@@ -898,7 +898,7 @@ function ssi_queryMembers($query_where = null, $query_where_params = array(), $q
 	// Draw the table!
 	if ($output_method == 'echo')
 		echo '
-		<table border="0" class="ssi_table">';
+		<table style="border: none" class="ssi_table">';
 
 	$query_members = array();
 	foreach ($members as $member)
@@ -914,7 +914,7 @@ function ssi_queryMembers($query_where = null, $query_where_params = array(), $q
 		if ($output_method == 'echo')
 			echo '
 			<tr>
-				<td align="right" valign="top" nowrap="nowrap">
+				<td style="text-align: right; vertical-align: top; white-space: nowrap">
 					', $query_members[$member]['link'], '
 					<br>', $query_members[$member]['blurb'], '
 					<br>', $query_members[$member]['avatar']['image'], '
@@ -1043,21 +1043,21 @@ function ssi_login($redirect_to = '', $output_method = 'echo')
 
 	echo '
 		<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
-			<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
+			<table style="border: none" class="ssi_table">
 				<tr>
-					<td align="right"><label for="user">', $txt['username'], ':</label>&nbsp;</td>
+					<td style="text-align: right; border-spacing: 1"><label for="user">', $txt['username'], ':</label>&nbsp;</td>
 					<td><input type="text" id="user" name="user" size="9" value="', $user_info['username'], '" class="input_text"></td>
 				</tr><tr>
-					<td align="right"><label for="passwrd">', $txt['password'], ':</label>&nbsp;</td>
+					<td style="text-align: right; border-spacing: 1"><label for="passwrd">', $txt['password'], ':</label>&nbsp;</td>
 					<td><input type="password" name="passwrd" id="passwrd" size="9" class="input_password"></td>
 				</tr>';
 
 	// Open ID?
 	if (!empty($modSettings['enableOpenID']))
 		echo '<tr>
-					<td colspan="2" align="center"><strong>&mdash;', $txt['or'], '&mdash;</strong></td>
+					<td colspan="2" style="text-align :center"><strong>&mdash;', $txt['or'], '&mdash;</strong></td>
 				</tr><tr>
-					<td align="right"><label for="openid_url">', $txt['openid'], ':</label>&nbsp;</td>
+					<td style="text-align: right"><label for="openid_url">', $txt['openid'], ':</label>&nbsp;</td>
 					<td><input type="text" name="openid_identifier" id="openid_url" class="input_text openid_login" size="17"></td>
 				</tr>';
 
@@ -2026,23 +2026,23 @@ function ssi_recentAttachments($num_attachments = 10, $attachment_ext = array(),
 
 	// Give them the default.
 	echo '
-		<table class="ssi_downloads" cellpadding="2">
+		<table class="ssi_downloads">
 			<tr>
-				<th align="left">', $txt['file'], '</th>
-				<th align="left">', $txt['posted_by'], '</th>
-				<th align="left">', $txt['downloads'], '</th>
-				<th align="left">', $txt['filesize'], '</th>
+				<th style="text-align: left; padding: 2">', $txt['file'], '</th>
+				<th style="text-align: left; padding: 2">', $txt['posted_by'], '</th>
+				<th style="text-align: left; padding: 2">', $txt['downloads'], '</th>
+				<th style="text-align: left; padding: 2">', $txt['filesize'], '</th>
 			</tr>';
 	foreach ($attachments as $attach)
 		echo '
 			<tr>
 				<td>', $attach['file']['link'], '</td>
 				<td>', $attach['member']['link'], '</td>
-				<td align="center">', $attach['file']['downloads'], '</td>
+				<td style="text-align: center">', $attach['file']['downloads'], '</td>
 				<td>', $attach['file']['filesize'], '</td>
 			</tr>';
 	echo '
 		</table>';
 }
 
-?>
+?>

+ 21 - 16
Sources/Calendar.php

@@ -135,7 +135,6 @@ function CalendarMain()
 			'birthdays' => isset($modSettings['cal_highlight_birthdays']) ? $modSettings['cal_highlight_birthdays'] : 0,
 		),
 		'show_week_num' => true,
-		'tpl_show_week_num' => !empty($modSettings['cal_week_numbers']),
 		'short_day_titles' => !empty($modSettings['cal_short_days']),
 		'short_month_titles' => !empty($modSettings['cal_short_months']),
 		'show_next_prev' => !empty($modSettings['cal_prev_next_links']),
@@ -150,9 +149,11 @@ function CalendarMain()
 
 	// Load up the previous and next months.
 	$context['calendar_grid_current'] = getCalendarGrid($curPage['month'], $curPage['year'], $calendarOptions);
+
 	// Only show previous month if it isn't pre-January of the min-year
 	if ($context['calendar_grid_current']['previous_calendar']['year'] > $modSettings['cal_minyear'] || $curPage['month'] != 1)
 		$context['calendar_grid_prev'] = getCalendarGrid($context['calendar_grid_current']['previous_calendar']['month'], $context['calendar_grid_current']['previous_calendar']['year'], $calendarOptions, true);
+
 	// Only show next month if it isn't post-December of the max-year
 	if ($context['calendar_grid_current']['next_calendar']['year'] < $modSettings['cal_maxyear'] || $curPage['month'] != 12)
 		$context['calendar_grid_next'] = getCalendarGrid($context['calendar_grid_current']['next_calendar']['month'], $context['calendar_grid_current']['next_calendar']['year'], $calendarOptions);
@@ -173,10 +174,9 @@ function CalendarMain()
 	$context['current_year'] = $curPage['year'];
 	$context['show_all_birthdays'] = isset($_GET['showbd']);
 	$context['blocks_disabled'] = !empty($modSettings['cal_disable_prev_next']) ? 1 : 0;
-	$context['tpl_show_week_num'] = !empty($calendarOptions['tpl_show_week_num']) ? 1 : 0;
 
 	// Set the page title to mention the month or week, too
-	$context['page_title'] .= ' - ' . ($context['view_week'] ? sprintf($txt['calendar_week_title'], $context['calendar_grid_main']['week_number'], ($context['calendar_grid_main']['week_number'] == 53 ? $context['current_year'] - 1 : $context['current_year'])) : $txt['months'][$context['current_month']] . ' ' . $context['current_year']);
+	$context['page_title'] .= ' - ' . ($context['view_week'] ? $context['calendar_grid_main']['week_title'] : $txt['months'][$context['current_month']] . ' ' . $context['current_year']);
 
 	// Load up the linktree!
 	$context['linktree'][] = array(
@@ -192,7 +192,7 @@ function CalendarMain()
 	if ($context['view_week'])
 		$context['linktree'][] = array(
 			'url' => $scripturl . '?action=calendar;viewweek;year=' . $context['current_year'] . ';month=' . $context['current_month'] . ';day=' . $context['current_day'],
-			'name' => $txt['calendar_week'] . ' ' . $context['calendar_grid_main']['week_number']
+			'name' => $context['calendar_grid_main']['week_title'],
 		);
 
 	// Build the calendar button array.
@@ -243,7 +243,7 @@ function CalendarPost()
 			isAllowedTo('calendar_edit_' . (!empty($user_info['id']) && getEventPoster($_REQUEST['eventid']) == $user_info['id'] ? 'own' : 'any'));
 
 		// New - and directing?
-		if ($_REQUEST['eventid'] == -1 && (isset($_POST['link_to_board']) || empty($modSettings['allow_cal_unlinked'])))
+		if ($_REQUEST['eventid'] == -1 && (isset($_POST['link_to_board']) || empty($modSettings['cal_allow_unlinked'])))
 		{
 			$_REQUEST['calendar'] = 1;
 			require_once($sourcedir . '/Post.php');
@@ -331,17 +331,22 @@ function CalendarPost()
 		// Get list of boards that can be posted in.
 		$boards = boardsAllowedTo('post_new');
 		if (empty($boards))
-			fatal_lang_error('cannot_post_new', 'permission');
-
-		// Load the list of boards and categories in the context.
-		require_once($sourcedir . '/Subs-MessageIndex.php');
-		$boardListOptions = array(
-			'included_boards' => in_array(0, $boards) ? null : $boards,
-			'not_redirection' => true,
-			'use_permissions' => true,
-			'selected_board' => $modSettings['cal_defaultboard'],
-		);
-		$context['event']['categories'] = getBoardList($boardListOptions);
+		{
+			// You can post new events but can't link them to anything...
+			$context['event']['categories'] = array();
+		}
+		else
+		{
+			// Load the list of boards and categories in the context.
+			require_once($sourcedir . '/Subs-MessageIndex.php');
+			$boardListOptions = array(
+				'included_boards' => in_array(0, $boards) ? null : $boards,
+				'not_redirection' => true,
+				'use_permissions' => true,
+				'selected_board' => $modSettings['cal_defaultboard'],
+			);
+			$context['event']['categories'] = getBoardList($boardListOptions);
+		}
 	}
 	else
 	{

+ 1 - 4
Sources/Display.php

@@ -1063,7 +1063,6 @@ function Display()
 		'can_merge' => 'merge_any',
 		'can_split' => 'split_any',
 		'calendar_post' => 'calendar_post',
-		'can_send_topic' => 'send_topic',
 		'can_send_pm' => 'pm_send',
 		'can_send_email' => 'send_email_to_members',
 		'can_report_moderator' => 'report_any',
@@ -1113,7 +1112,6 @@ function Display()
 	$context['can_mark_unread'] = !$user_info['is_guest'];
 	$context['can_unwatch'] = !$user_info['is_guest'] && $modSettings['enable_unwatch'];
 
-	$context['can_send_topic'] = (!$modSettings['postmod_active'] || $topicinfo['approved']) && allowedTo('send_topic');
 	$context['can_print'] = empty($modSettings['disable_print_topic']);
 
 	// Start this off for quick moderation - it will be or'd for each post.
@@ -1180,10 +1178,9 @@ function Display()
 	$context['normal_buttons'] = array(
 		'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.png', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], 'active' => true),
 		'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.png', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']),
-		'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
+		'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unwatch_topic' : 'watch_topic', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
 		'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.png', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
 		'unwatch' => array('test' => 'can_unwatch', 'text' => ($context['topic_unwatched'] ? '' : 'un') . 'watch', 'image' => ($context['topic_unwatched'] ? 'un' : '') . 'watch.png', 'lang' => true, 'url' => $scripturl . '?action=unwatchtopic;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sa=' . ($context['topic_unwatched'] ? 'off' : 'on') . ';' . $context['session_var'] . '=' . $context['session_id']),
-		'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.png', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'),
 		'print' => array('test' => 'can_print', 'text' => 'print', 'image' => 'print.png', 'lang' => true, 'custom' => 'rel="nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
 	);
 

+ 50 - 2
Sources/Help.php

@@ -24,14 +24,27 @@ if (!defined('SMF'))
  */
 function ShowHelp()
 {
-	global $scripturl, $context, $txt;
-
 	loadTemplate('Help');
 	loadLanguage('Manual');
 
+	$subActions = array(
+		'index' => 'HelpIndex',
+		'rules' => 'HelpRules',
+	);
+
+	$sa = isset($_GET['sa'], $subActions[$_GET['sa']]) ? $_GET['sa'] : 'index';
+	$subActions[$sa]();
+}
+
+function HelpIndex()
+{
+	global $scripturl, $context, $txt;
+
 	// We need to know where our wiki is.
 	$context['wiki_url'] = 'http://wiki.simplemachines.org/smf';
 
+	$context['canonical_url'] = $scripturl . '?action=help';
+
 	// Sections were are going to link...
 	$context['manual_sections'] = array(
 		'registering' => 'Registering',
@@ -57,6 +70,41 @@ function ShowHelp()
 	$context['sub_template'] = 'manual';
 }
 
+function HelpRules()
+{
+	global $context, $txt, $boarddir, $user_info, $scripturl;
+
+	// Build the link tree.
+	$context['linktree'][] = array(
+		'url' => $scripturl . '?action=help',
+		'name' => $txt['help'],
+	);
+	$context['linktree'][] = array(
+		'url' => $scripturl . '?action=help;sa=rules',
+		'name' => $txt['terms_and_rules'],
+	);
+
+	// Have we got a localized one?
+	if (file_exists($boarddir . '/agreement.' . $user_info['language'] . '.txt'))
+		$context['agreement'] = parse_bbc(file_get_contents($boarddir . '/agreement.' . $user_info['language'] . '.txt'), true, 'agreement_' . $user_info['language']);
+	elseif (file_exists($boarddir . '/agreement.txt'))
+		$context['agreement'] = parse_bbc(file_get_contents($boarddir . '/agreement.txt'), true, 'agreement');
+	else
+		$context['agreement'] = '';
+
+	// Nothing to show, so let's get out of here
+	if (empty($context['agreement']))
+	{
+		// No file found or a blank file! Just leave...
+		redirectexit();
+	}
+
+	$context['canonical_url'] = $scripturl . '?action=help;sa=rules';
+
+	$context['page_title'] = $txt['terms_and_rules'];
+	$context['sub_template'] = 'terms';
+}
+
 /**
  * Show some of the more detailed help to give the admin an idea...
  * It shows a popup for administrative or user help.

+ 18 - 3
Sources/Load.php

@@ -1433,7 +1433,7 @@ function loadTheme($id_theme = 0, $initialize = true)
 	elseif (!empty($_SESSION['id_theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
 		$id_theme = (int) $_SESSION['id_theme'];
 	// The theme is just the user's choice. (might use ?board=1;theme=0 to force board theme.)
-	elseif (!empty($user_info['theme']) && !isset($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
+	elseif (!empty($user_info['theme']) && !isset($_REQUEST['theme']))
 		$id_theme = $user_info['theme'];
 	// The theme was specified by the board.
 	elseif (!empty($board_info['theme']))
@@ -1885,10 +1885,22 @@ function loadTheme($id_theme = 0, $initialize = true)
 			tempImage.src = smf_scripturl + "?scheduled=' . $type . ';ts=' . $ts . '";
 		}
 		window.setTimeout("smfAutoTask();", 1);');
-
 		}
 	}
 
+	// And we should probably trigger the cron too.
+	if (empty($modSettings['cron_is_real_cron']))
+	{
+		$ts = time();
+		$ts -= $ts % 15;
+		addInlineJavaScript('
+	function triggerCron() {
+		var tempImage = new Image();
+		tempImage.src = ' . JavaScriptEscape($boardurl) . ' + "/cron.php?ts=' . $ts . '";
+	}
+	window.setTimeout(triggerCron, 1);', true);
+	}
+
 	// Any files to include at this point?
 	if (!empty($modSettings['integrate_theme_include']))
 	{
@@ -2548,6 +2560,7 @@ function template_include($filename, $once = false)
 			$txt['template_parse_error'] = 'Template Parse Error!';
 			$txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system.  This problem should only be temporary, so please come back later and try again.  If you continue to see this message, please contact the administrator.<br><br>You can also try <a href="javascript:location.reload();">refreshing this page</a>.';
 			$txt['template_parse_error_details'] = 'There was a problem loading the <tt><strong>%1$s</strong></tt> template or language file.  Please check the syntax and try again - remember, single quotes (<tt>\'</tt>) often have to be escaped with a slash (<tt>\\</tt>).  To see more specific error information from PHP, try <a href="' . $boardurl . '%1$s" class="extern">accessing the file directly</a>.<br><br>You may want to try to <a href="javascript:location.reload();">refresh this page</a> or <a href="' . $scripturl . '?theme=1">use the default theme</a>.';
+			$txt['template_parse_errmsg'] = 'Unfortunately more information is not available at this time as to exactly what is wrong.';
 		}
 
 		// First, let's get the doctype and language information out of the way.
@@ -2581,8 +2594,10 @@ function template_include($filename, $once = false)
 			require_once($sourcedir . '/Subs-Package.php');
 
 			$error = fetch_web_data($boardurl . strtr($filename, array($boarddir => '', strtr($boarddir, '\\', '/') => '')));
-			if (empty($error) && ini_get('track_errors'))
+			if (empty($error) && ini_get('track_errors') && !empty($php_errormsg))
 				$error = $php_errormsg;
+			if (empty($error))
+				$error = $txt['template_parse_errmsg'];
 
 			$error = strtr($error, array('<b>' => '<strong>', '</b>' => '</strong>'));
 

+ 2 - 2
Sources/ManageAttachments.php

@@ -853,7 +853,7 @@ function RemoveAttachmentBySize()
  */
 function RemoveAttachment()
 {
-	global $txt, $smcFunc, $language;
+	global $txt, $smcFunc, $language, $user_info;
 
 	checkSession();
 
@@ -2006,7 +2006,7 @@ function ManageAttachmentPaths()
 							$path = $boarddir . DIRECTORY_SEPARATOR . $path;
 						}
 
-						if (isset($doit))
+						if (isset($doit) && realpath($path) != realpath($boarddir))
 						{
 							unlink($path . '/.htaccess');
 							unlink($path . '/index.php');

+ 0 - 1
Sources/ManageCalendar.php

@@ -361,7 +361,6 @@ function ModifyCalendarSettings($return_config = false)
 				array('check', 'cal_prev_next_links'),
 				array('check', 'cal_short_days'),
 				array('check', 'cal_short_months'),
-				array('check', 'cal_week_numbers'),
 		);
 	else
 		$config_vars = array(

+ 1 - 1
Sources/ManageLanguages.php

@@ -565,7 +565,7 @@ function DownloadLanguage()
 function ModifyLanguages()
 {
 	global $txt, $context, $scripturl;
-	global $user_info, $smcFunc, $sourcedir, $language, $boarddir, $forum_version;
+	global $smcFunc, $sourcedir, $language, $boarddir, $forum_version;
 
 	// Setting a new default?
 	if (!empty($_POST['set_default']) && !empty($_POST['def_language']))

+ 4 - 3
Sources/ManageMaintenance.php

@@ -720,7 +720,7 @@ function ConvertUtf8()
 function ConvertMsgBody()
 {
 	global $scripturl, $context, $txt, $language, $db_character_set, $db_type;
-	global $modSettings, $user_info, $sourcedir, $smcFunc, $time_start;
+	global $modSettings, $sourcedir, $smcFunc, $time_start;
 
 	// Show me your badge!
 	isAllowedTo('admin_forum');
@@ -1921,7 +1921,7 @@ function MaintainMassMoveTopics()
 	if ($sticky)
 	{
 		$conditions .= '
-			AND t.sticky = {int:sticky}';
+			AND t.is_sticky = {int:sticky}';
 		$params['sticky'] = 1;
 	}
 
@@ -2132,6 +2132,7 @@ function MaintainRecountPosts()
 			'zero' => 0,
 			'string_zero' => '0',
 			'db_error_skip' => true,
+			'recycle' => !empty($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,
 		)
 	) !== false;
 
@@ -2613,4 +2614,4 @@ function get_integration_hooks()
 	return $integration_hooks;
 }
 
-?>
+?>

+ 1 - 1
Sources/ManageNews.php

@@ -85,7 +85,7 @@ function ManageNews()
  */
 function EditNews()
 {
-	global $txt, $modSettings, $context, $sourcedir, $user_info, $scripturl;
+	global $txt, $modSettings, $context, $sourcedir, $scripturl;
 	global $smcFunc;
 
 	require_once($sourcedir . '/Subs-Post.php');

+ 16 - 1
Sources/ManagePaid.php

@@ -502,7 +502,6 @@ function ModifySubscription()
 	if (isset($_POST['save']))
 	{
 		checkSession();
-		validateToken('admin-pms');
 
 		// Some cleaning...
 		$isActive = isset($_POST['active']) ? 1 : 0;
@@ -514,6 +513,19 @@ function ModifySubscription()
 		// Is this a fixed one?
 		if ($_POST['duration_type'] == 'fixed')
 		{
+			// There are sanity check limits on these things.
+			$limits = array(
+				'D' => 90,
+				'W' => 52,
+				'M' => 24,
+				'Y' => 5,
+			);
+			if (empty($_POST['span_unit']) || empty($limits[$_POST['span_unit']]) || empty($_POST['span_value']) || $_POST['span_value'] < 1)
+				fatal_lang_error('paid_invalid_duration', false);
+
+			if ($_POST['span_value'] > $limits[$_POST['span_unit']])
+				fatal_lang_error('paid_invalid_duration_' . $_POST['span_unit'], false);
+
 			// Clean the span.
 			$span = $_POST['span_value'] . $_POST['span_unit'];
 
@@ -541,6 +553,9 @@ function ModifySubscription()
 		}
 		$cost = serialize($cost);
 
+		// Having now validated everything that might throw an error, let's also now deal with the token.
+		validateToken('admin-pms');
+
 		// Yep, time to do additional groups.
 		$addgroups = array();
 		if (!empty($_POST['addgroup']))

+ 0 - 3
Sources/ManagePermissions.php

@@ -1093,7 +1093,6 @@ function setPermissionLevel($level, $group, $profile = 'null')
 		'delete_own',
 		'modify_own',
 		'report_any',
-		'send_topic',
 	);
 
 	// Standard - ie. members.  They can do anything Restrictive can.
@@ -1181,7 +1180,6 @@ function setPermissionLevel($level, $group, $profile = 'null')
 	$boardLevels['locked'] = array(
 		'poll_view',
 		'report_any',
-		'send_topic',
 		'view_attachments',
 	);
 
@@ -1470,7 +1468,6 @@ function loadAllPermissions()
 			'post_reply' => array(true, 'topic'),
 			'merge_any' => array(false, 'topic'),
 			'split_any' => array(false, 'topic'),
-			'send_topic' => array(false, 'topic'),
 			'make_sticky' => array(false, 'topic'),
 			'move' => array(true, 'topic', 'moderate'),
 			'lock' => array(true, 'topic', 'moderate'),

+ 2 - 2
Sources/ManageScheduledTasks.php

@@ -73,7 +73,7 @@ function ManageScheduledTasks()
  */
 function ScheduledTasks()
 {
-	global $context, $txt, $sourcedir, $smcFunc, $user_info, $scripturl;
+	global $context, $txt, $sourcedir, $smcFunc, $scripturl;
 
 	// Mama, setup the template first - cause it's like the most important bit, like pickle in a sandwich.
 	// ... ironically I don't like pickle. </grudge>
@@ -323,7 +323,7 @@ function list_getScheduledTasks($start, $items_per_page, $sort)
  */
 function EditTask()
 {
-	global $context, $txt, $sourcedir, $smcFunc, $user_info;
+	global $context, $txt, $sourcedir, $smcFunc;
 
 	// Just set up some lovely context stuff.
 	$context[$context['admin_menu_name']]['current_subsection'] = 'tasks';

+ 2 - 2
Sources/ManageSearch.php

@@ -499,8 +499,8 @@ function CreateMessageIndex()
 		$context['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
 		$context['step'] = isset($_REQUEST['step']) ? (int) $_REQUEST['step'] : 0;
 
-		// admin timeouts are painful when building these long indexes
-		if ($_SESSION['admin_time'] + 3300 < time() && $context['step'] >= 1)
+		// admin timeouts are painful when building these long indexes - but only if we actually have such things enabled
+		if (empty($modSettings['securityDisable']) && $_SESSION['admin_time'] + 3300 < time() && $context['step'] >= 1)
 			$_SESSION['admin_time'] = time();
 	}
 

+ 1 - 2
Sources/ManageSettings.php

@@ -237,7 +237,6 @@ function ModifyLayoutSettings($return_config = false)
 		'',
 			// Stuff that just is everywhere - today, search, online, etc.
 			array('select', 'todayMod', array($txt['today_disabled'], $txt['today_only'], $txt['yesterday_today'])),
-			array('check', 'topbottomEnable'),
 			array('check', 'onlineEnable'),
 			array('check', 'enableVBStyleLogin'),
 		'',
@@ -349,7 +348,7 @@ function ModifyWarningSettings($return_config = false)
 	if (!empty($modSettings['warning_settings']) && $currently_enabled)
 		$config_vars += array(
 			'',
-				array('int', 'warning_watch', 'subtext' => $txt['setting_warning_watch_note'], 'help' => 'warning_enable'),
+				array('int', 'warning_watch', 'subtext' => $txt['setting_warning_watch_note']),
 				'moderate' => array('int', 'warning_moderate', 'subtext' => $txt['setting_warning_moderate_note']),
 				array('int', 'warning_mute', 'subtext' => $txt['setting_warning_mute_note']),
 				'rem1' => array('int', 'user_limit', 'subtext' => $txt['setting_user_limit_note']),

+ 2 - 2
Sources/ManageSmileys.php

@@ -1699,7 +1699,7 @@ function ImportSmileys($smileyPath)
  */
 function EditMessageIcons()
 {
-	global $user_info, $context, $settings, $txt;
+	global $context, $settings, $txt;
 	global $boarddir, $smcFunc, $scripturl, $sourcedir;
 
 	// Get a list of icons.
@@ -1966,7 +1966,7 @@ function EditMessageIcons()
  */
 function list_getMessageIcons($start, $items_per_page, $sort)
 {
-	global $smcFunc, $user_info;
+	global $smcFunc;
 
 	$request = $smcFunc['db_query']('', '
 		SELECT m.id_icon, m.title, m.filename, m.icon_order, m.id_board, b.name AS board_name

+ 0 - 7
Sources/Memberlist.php

@@ -75,13 +75,6 @@ function Memberlist()
 				'up' => 'mem.real_name ASC'
 			),
 		),
-		'email_address' => array(
-			'label' => $txt['email'],
-			'sort' => array(
-				'down' => allowedTo('moderate_forum') ? 'mem.email_address DESC' : 'mem.hide_email DESC, mem.email_address DESC',
-				'up' => allowedTo('moderate_forum') ? 'mem.email_address ASC' : 'mem.hide_email ASC, mem.email_address ASC'
-			),
-		),
 		'website_url' => array(
 			'label' => $txt['website'],
 			'link_with' => 'website',

+ 90 - 77
Sources/MessageIndex.php

@@ -45,6 +45,18 @@ function MessageIndex()
 	else
 		loadTemplate('MessageIndex');
 
+	if (!$user_info['is_guest'])
+	{
+		// We can't know they read it if we allow prefetches.
+		// But we'll actually mark it read later after we've done everything else.
+		if (isset($_SERVER['HTTP_X_MOZ']) && $_SERVER['HTTP_X_MOZ'] == 'prefetch')
+		{
+			ob_end_clean();
+			header('HTTP/1.1 403 Prefetch Forbidden');
+			die;
+		}
+	}
+
 	$context['name'] = $board_info['name'];
 	$context['description'] = $board_info['description'];
 	if (!empty($board_info['description']))
@@ -139,82 +151,6 @@ function MessageIndex()
 	 	$context['linktree'][count($context['linktree']) - 1]['extra_after'] = '<span class="board_moderators">(' . (count($context['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators']) . ': ' . implode(', ', $context['link_moderators']) . ')</span>';
 	}
 
-	// Mark current and parent boards as seen.
-	if (!$user_info['is_guest'])
-	{
-		// We can't know they read it if we allow prefetches.
-		if (isset($_SERVER['HTTP_X_MOZ']) && $_SERVER['HTTP_X_MOZ'] == 'prefetch')
-		{
-			ob_end_clean();
-			header('HTTP/1.1 403 Prefetch Forbidden');
-			die;
-		}
-
-		$smcFunc['db_insert']('replace',
-			'{db_prefix}log_boards',
-			array('id_msg' => 'int', 'id_member' => 'int', 'id_board' => 'int'),
-			array($modSettings['maxMsgID'], $user_info['id'], $board),
-			array('id_member', 'id_board')
-		);
-
-		if (!empty($board_info['parent_boards']))
-		{
-			$smcFunc['db_query']('', '
-				UPDATE {db_prefix}log_boards
-				SET id_msg = {int:id_msg}
-				WHERE id_member = {int:current_member}
-					AND id_board IN ({array_int:board_list})',
-				array(
-					'current_member' => $user_info['id'],
-					'board_list' => array_keys($board_info['parent_boards']),
-					'id_msg' => $modSettings['maxMsgID'],
-				)
-			);
-
-			// We've seen all these boards now!
-			foreach ($board_info['parent_boards'] as $k => $dummy)
-				if (isset($_SESSION['topicseen_cache'][$k]))
-					unset($_SESSION['topicseen_cache'][$k]);
-		}
-
-		if (isset($_SESSION['topicseen_cache'][$board]))
-			unset($_SESSION['topicseen_cache'][$board]);
-
-		$request = $smcFunc['db_query']('', '
-			SELECT sent
-			FROM {db_prefix}log_notify
-			WHERE id_board = {int:current_board}
-				AND id_member = {int:current_member}
-			LIMIT 1',
-			array(
-				'current_board' => $board,
-				'current_member' => $user_info['id'],
-			)
-		);
-		$context['is_marked_notify'] = $smcFunc['db_num_rows']($request) != 0;
-		if ($context['is_marked_notify'])
-		{
-			list ($sent) = $smcFunc['db_fetch_row']($request);
-			if (!empty($sent))
-			{
-				$smcFunc['db_query']('', '
-					UPDATE {db_prefix}log_notify
-					SET sent = {int:is_sent}
-					WHERE id_board = {int:current_board}
-						AND id_member = {int:current_member}',
-					array(
-						'current_board' => $board,
-						'current_member' => $user_info['id'],
-						'is_sent' => 0,
-					)
-				);
-			}
-		}
-		$smcFunc['db_free_result']($request);
-	}
-	else
-		$context['is_marked_notify'] = false;
-
 	// 'Print' the header and board info.
 	$context['page_title'] = strip_tags($board_info['name']);
 
@@ -549,6 +485,7 @@ function MessageIndex()
 				'is_redirect' => !empty($row['id_redirect_topic']),
 				'is_poll' => $modSettings['pollMode'] == '1' && $row['id_poll'] > 0,
 				'is_posted_in' => false,
+				'is_watched' => false,
 				'icon' => $row['first_icon'],
 				'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.png',
 				'subject' => $row['first_subject'],
@@ -658,6 +595,82 @@ function MessageIndex()
 		call_integration_hook('integrate_quick_mod_actions');
 	}
 
+	// Mark current and parent boards as seen.
+	if (!$user_info['is_guest'])
+	{
+		$smcFunc['db_insert']('replace',
+			'{db_prefix}log_boards',
+			array('id_msg' => 'int', 'id_member' => 'int', 'id_board' => 'int'),
+			array($modSettings['maxMsgID'], $user_info['id'], $board),
+			array('id_member', 'id_board')
+		);
+
+		if (!empty($board_info['parent_boards']))
+		{
+			$smcFunc['db_query']('', '
+				UPDATE {db_prefix}log_boards
+				SET id_msg = {int:id_msg}
+				WHERE id_member = {int:current_member}
+					AND id_board IN ({array_int:board_list})',
+				array(
+					'current_member' => $user_info['id'],
+					'board_list' => array_keys($board_info['parent_boards']),
+					'id_msg' => $modSettings['maxMsgID'],
+				)
+			);
+
+			// We've seen all these boards now!
+			foreach ($board_info['parent_boards'] as $k => $dummy)
+				if (isset($_SESSION['topicseen_cache'][$k]))
+					unset($_SESSION['topicseen_cache'][$k]);
+		}
+
+		if (isset($_SESSION['topicseen_cache'][$board]))
+			unset($_SESSION['topicseen_cache'][$board]);
+
+		$request = $smcFunc['db_query']('', '
+			SELECT id_topic, id_board, sent
+			FROM {db_prefix}log_notify
+			WHERE id_member = {int:current_member}
+				AND (' . (!empty($context['topics']) ? 'id_topic IN ({array_int:topics}) OR ' : '') . 'id_board = {int:current_board})',
+			array(
+				'current_board' => $board,
+				'topics' => !empty($context['topics']) ? array_keys($context['topics']) : array(),
+				'current_member' => $user_info['id'],
+			)
+		);
+		$context['is_marked_notify'] = false; // this is for the *board* only
+		$notify = array();
+		while ($row = $smcFunc['db_fetch_assoc']($request))
+		{
+			if (!empty($row['id_board']))
+			{
+				$context['is_marked_notify'] = true;
+				$board_sent = $row['sent'];
+			}
+			if (!empty($row['id_topic']))
+				$context['topics'][$row['id_topic']]['is_watched'] = true;
+		}
+		$smcFunc['db_free_result']($request);
+
+		if ($context['is_marked_notify'] && !empty($board_sent))
+		{
+			$smcFunc['db_query']('', '
+				UPDATE {db_prefix}log_notify
+				SET sent = {int:is_sent}
+				WHERE id_member = {int:current_member}
+					AND id_board = {int:current_board}',
+				array(
+					'current_board' => $board,
+					'current_member' => $user_info['id'],
+					'is_sent' => 0,
+				)
+			);
+		}
+	}
+	else
+		$context['is_marked_notify'] = false;
+
 	// If there are children, but no topics and no ability to post topics...
 	$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];
 
@@ -665,7 +678,7 @@ function MessageIndex()
 	$context['normal_buttons'] = array(
 		'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.png', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
 		'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.png', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
-		'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
+		'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unwatch_board' : 'watch_board', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
 		'markread' => array('text' => 'mark_read_short', 'image' => 'markread.png', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_mark_read'] . '\');"', 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
 	);
 

+ 7 - 7
Sources/ModerationCenter.php

@@ -223,7 +223,7 @@ function ModerationMain($dont_call = false)
  */
 function ModerationHome()
 {
-	global $txt, $context, $scripturl, $user_info, $user_settings, $options;
+	global $txt, $context, $scripturl, $user_settings, $options;
 
 	loadTemplate('ModerationCenter');
 	loadJavascriptFile('admin.js', array('default_theme' => true), 'admin.js');
@@ -606,7 +606,7 @@ function ShowNotice()
  */
 function ViewWatchedUsers()
 {
-	global $smcFunc, $modSettings, $context, $txt, $scripturl, $user_info, $sourcedir;
+	global $smcFunc, $modSettings, $context, $txt, $scripturl, $sourcedir;
 
 	// Some important context!
 	$context['page_title'] = $txt['mc_watched_users_title'];
@@ -945,7 +945,7 @@ function list_getWatchedUsers($start, $items_per_page, $sort, $approve_query, $d
  */
 function list_getWatchedUserPostsCount($approve_query)
 {
-	global $smcFunc, $modSettings, $user_info;
+	global $smcFunc, $modSettings;
 
 	$request = $smcFunc['db_query']('', '
 		SELECT COUNT(*)
@@ -976,7 +976,7 @@ function list_getWatchedUserPostsCount($approve_query)
  */
 function list_getWatchedUserPosts($start, $items_per_page, $sort, $approve_query, $delete_boards)
 {
-	global $smcFunc, $txt, $scripturl, $modSettings, $user_info;
+	global $smcFunc, $txt, $scripturl, $modSettings;
 
 	$request = $smcFunc['db_query']('', '
 		SELECT m.id_msg, m.id_topic, m.id_board, m.id_member, m.subject, m.body, m.poster_time,
@@ -1114,7 +1114,7 @@ function ViewWarningLog()
 				),
 				'data' => array(
 					'function' => create_function('$warning', '
-						global $scripturl, $settings, $txt;
+						global $scripturl, $txt;
 
 						$output = \'
 							<div class="floatleft">
@@ -1123,7 +1123,7 @@ function ViewWarningLog()
 
 						if (!empty($warning[\'id_notice\']))
 							$output .= \'
-								<a href="\' . $scripturl . \'?action=moderate;area=notice;nid=\' . $warning[\'id_notice\'] . \'" onclick="window.open(this.href, \\\'\\\', \\\'scrollbars=yes,resizable=yes,width=400,height=250\\\');return false;" target="_blank" class="new_win" title="\' . $txt[\'profile_warning_previous_notice\'] . \'"><img src="\' . $settings[\'default_images_url\'] . \'/filter.png" alt="\' . $txt[\'profile_warning_previous_notice\'] . \'"></a>\';
+								&nbsp;<a href="\' . $scripturl . \'?action=moderate;area=notice;nid=\' . $warning[\'id_notice\'] . \'" onclick="window.open(this.href, \\\'\\\', \\\'scrollbars=yes,resizable=yes,width=400,height=250\\\');return false;" target="_blank" class="new_win" title="\' . $txt[\'profile_warning_previous_notice\'] . \'"><span class="generic_icons filter centericon"></span></a>\';
 						return $output;
 					'),
 				),
@@ -1176,7 +1176,7 @@ function list_getWarningCount()
  */
 function list_getWarnings($start, $items_per_page, $sort)
 {
-	global $smcFunc, $txt, $scripturl, $user_info;
+	global $smcFunc, $txt, $scripturl;
 
 	$request = $smcFunc['db_query']('', '
 		SELECT IFNULL(mem.id_member, 0) AS id_member, IFNULL(mem.real_name, lc.member_name) AS member_name_col,

+ 7 - 42
Sources/News.php

@@ -168,7 +168,7 @@ function ShowXmlFeed()
 	}
 
 	// Show in rss or proprietary format?
-	$xml_format = isset($_GET['type']) && in_array($_GET['type'], array('smf', 'rss', 'rss2', 'atom', 'rdf', 'webslice')) ? $_GET['type'] : 'smf';
+	$xml_format = isset($_GET['type']) && in_array($_GET['type'], array('smf', 'rss', 'rss2', 'atom', 'rdf')) ? $_GET['type'] : 'smf';
 
 	// @todo Birthdays?
 
@@ -186,17 +186,6 @@ function ShowXmlFeed()
 	if (empty($_GET['sa']) || !isset($subActions[$_GET['sa']]))
 		$_GET['sa'] = 'recent';
 
-	// @todo Temp - webslices doesn't do everything yet.
-	if ($xml_format == 'webslice' && $_GET['sa'] != 'recent')
-		$xml_format = 'rss2';
-	// If this is webslices we kinda cheat - we allow a template that we call direct for the HTML, and we override the CDATA.
-	elseif ($xml_format == 'webslice')
-	{
-		$context['user'] += $user_info;
-		$cdata_override = true;
-		loadTemplate('Xml');
-	}
-
 	// We only want some information, not all of it.
 	$cachekey = array($xml_format, $_GET['action'], $_GET['limit'], $_GET['sa']);
 	foreach (array('board', 'boards', 'c') as $var)
@@ -228,7 +217,7 @@ function ShowXmlFeed()
 
 	if ($xml_format == 'smf' || isset($_REQUEST['debug']))
 		header('Content-Type: text/xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
-	elseif ($xml_format == 'rss' || $xml_format == 'rss2' || $xml_format == 'webslice')
+	elseif ($xml_format == 'rss' || $xml_format == 'rss2')
 		header('Content-Type: application/rss+xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
 	elseif ($xml_format == 'atom')
 		header('Content-Type: application/atom+xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
@@ -255,30 +244,6 @@ function ShowXmlFeed()
 		// Output the footer of the xml.
 		echo '
 	</channel>
-</rss>';
-	}
-	elseif ($xml_format == 'webslice')
-	{
-		$context['recent_posts_data'] = $xml;
-		$context['can_pm_read'] = allowedTo('pm_read');
-
-		// This always has RSS 2
-		echo '
-<rss version="2.0" xmlns:mon="http://www.microsoft.com/schemas/rss/monitoring/2007" xml:lang="', strtr($txt['lang_locale'], '_', '-'), '">
-	<channel>
-		<title>', $feed_title, ' - ', $txt['recent_posts'], '</title>
-		<link>', $scripturl, '?action=recent</link>
-		<description><![CDATA[', strip_tags($txt['xml_rss_desc']), ']]></description>
-		<item>
-			<title>', $feed_title, ' - ', $txt['recent_posts'], '</title>
-			<link>', $scripturl, '?action=recent</link>
-			<description><![CDATA[
-				', template_webslice_header_above(), '
-				', template_webslice_recent_posts(), '
-				', template_webslice_header_below(), '
-			]]></description>
-		</item>
-	</channel>
 </rss>';
 	}
 	elseif ($xml_format == 'atom')
@@ -290,8 +255,8 @@ function ShowXmlFeed()
 		echo '
 <feed xmlns="http://www.w3.org/2005/Atom">
 	<title>', $feed_title, '</title>
-	<link rel="alternate" type="text/html" href="', $scripturl, '">
-	<link rel="self" type="application/rss+xml" href="', $scripturl, '?type=atom;action=.xml', !empty($url_parts) ? ';' . implode(';', $url_parts) : '', '">
+	<link rel="alternate" type="text/html" href="', $scripturl, '" />
+	<link rel="self" type="application/rss+xml" href="', $scripturl, '?type=atom;action=.xml', !empty($url_parts) ? ';' . implode(';', $url_parts) : '', '" />
 	<id>', $scripturl, '</id>
 	<icon>', $boardurl, '/favicon.ico</icon>
 
@@ -320,7 +285,7 @@ function ShowXmlFeed()
 
 		foreach ($xml as $item)
 			echo '
-				<rdf:li rdf:resource="', $item['link'], '">';
+				<rdf:li rdf:resource="', $item['link'], '" />';
 
 		echo '
 			</rdf:Seq>
@@ -477,7 +442,7 @@ function dumpTags($data, $i, $tag = null, $xml_format = '')
 		// Grr, I hate kludges... almost worth doing it properly, here, but not quite.
 		if ($xml_format == 'atom' && $key == 'link')
 		{
-			echo '<link rel="alternate" type="text/html" href="', fix_possible_url($val), '">';
+			echo '<link rel="alternate" type="text/html" href="', fix_possible_url($val), '" />';
 			continue;
 		}
 
@@ -485,7 +450,7 @@ function dumpTags($data, $i, $tag = null, $xml_format = '')
 		if ($val == '')
 			echo '<', $key, '>';
 		elseif ($xml_format == 'atom' && $key == 'category')
-			echo '<', $key, ' term="', $val, '">';
+			echo '<', $key, ' term="', $val, '" />';
 		else
 		{
 			// Beginning tag.

+ 30 - 0
Sources/Packages.php

@@ -1911,6 +1911,36 @@ function ViewOperations()
 		$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
 	$smcFunc['db_free_result']($request);
 
+	// If we're viewing uninstall operations, only consider themes that
+	// the package is actually installed into.
+	if (isset($_REQUEST['reverse']) && !empty($_REQUEST['install_id']))
+	{
+		$install_id = (int) $_REQUEST['install_id'];
+		if ($install_id > 0)
+		{
+			$old_themes = array();
+			$request = $smcFunc['db_query']('', '
+				SELECT themes_installed
+				FROM {db_prefix}log_packages
+				WHERE id_install = {int:install_id}',
+				array(
+					'install_id' => $install_id,
+				)
+			);
+			
+			if ($smcFunc['db_num_rows']($request) == 1)
+			{
+				list ($old_themes) = $smcFunc['db_fetch_row']($request);
+				$old_themes = explode(',', $old_themes);
+
+				foreach ($theme_paths as $id => $data)
+					if ($id != 1 && !in_array($id, $old_themes))
+						unset($theme_paths[$id]);
+			}
+			$smcFunc['db_free_result']($request);
+		}
+	}
+
 	// Boardmod?
 	if (isset($_REQUEST['boardmod']))
 		$mod_actions = parseBoardMod(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $_REQUEST['filename']), true, $reverse, $theme_paths);

+ 24 - 0
Sources/Poll.php

@@ -280,6 +280,8 @@ function LockVoting()
 		)
 	);
 
+	logAction(($voting_locked ? '' : 'un') . 'lock_poll', array('topic' => $topic));
+
 	redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
 }
 
@@ -885,6 +887,25 @@ function EditPoll2()
 
 	call_integration_hook('integrate_poll_add_edit', array($bcinfo['id_poll'], $isEdit));
 
+	/* Log this edit, but don't go crazy.
+		Only specifically adding a poll	or resetting votes is logged.
+		Everything else is simply an edit.*/
+	if (isset($_REQUEST['add']))
+	{
+		// Added a poll
+		logAction('add_poll', array('topic' => $topic));
+	}
+	elseif (isset($_REQUEST['deletevotes']))
+	{
+		// Reset votes
+		logAction('reset_poll', array('topic' => $topic));
+	}
+	else
+	{
+		// Something else
+		logAction('editpoll', array('topic' => $topic));
+	}
+
 	// Off we go.
 	redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
 }
@@ -980,6 +1001,9 @@ function RemovePoll()
 	// A mod might have logged this (social network?), so let them remove, it too
 	call_integration_hook('integrate_poll_remove', array($pollID));
 
+	// Log this!
+	logAction('remove_poll', array('topic' => $topic));
+
 	// Take the moderator back to the topic.
 	redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
 }

+ 3 - 3
Sources/Post.php

@@ -1125,12 +1125,12 @@ function Post($post_errors = array())
 		foreach ($attachmentRestrictionTypes as $type)
 			if (!empty($modSettings[$type]))
 			{
-				$context['attachment_restrictions'][] = sprintf($txt['attach_restrict_' . $type], comma_format($modSettings[$type], 0));
+				$context['attachment_restrictions'][] = sprintf($txt['attach_restrict_' . $type . ($modSettings[$type] >= 1024 ? '_MB' : '')], comma_format($modSettings[$type], 0));
 				// Show some numbers. If they exist.
 				if ($type == 'attachmentNumPerPostLimit' && $context['attachments']['quantity'] > 0)
 					$context['attachment_restrictions'][] = sprintf($txt['attach_remaining'], $modSettings['attachmentNumPerPostLimit'] - $context['attachments']['quantity']);
 				elseif ($type == 'attachmentPostLimit' && $context['attachments']['total_size'] > 0)
-					$context['attachment_restrictions'][] = sprintf($txt['attach_available'], comma_format(round(max($modSettings['attachmentPostLimit'] - ($context['attachments']['total_size'] / 1028), 0)), 0));
+					$context['attachment_restrictions'][] = sprintf($txt['attach_available'], comma_format(round(max($modSettings['attachmentPostLimit'] - ($context['attachments']['total_size'] / 1024), 0)), 0));
 			}
 	}
 
@@ -2186,7 +2186,7 @@ function AnnouncementSelectMembergroup()
 function AnnouncementSend()
 {
 	global $topic, $board, $board_info, $context, $modSettings;
-	global $language, $scripturl, $txt, $user_info, $sourcedir, $smcFunc;
+	global $language, $scripturl, $txt, $sourcedir, $smcFunc;
 
 	checkSession();
 

+ 4 - 4
Sources/Profile-Actions.php

@@ -23,7 +23,7 @@ if (!defined('SMF'))
  */
 function activateAccount($memID)
 {
-	global $sourcedir, $context, $user_profile, $modSettings, $user_info;
+	global $sourcedir, $context, $user_profile, $modSettings;
 
 	isAllowedTo('moderate_forum');
 
@@ -336,7 +336,7 @@ function issueWarning($memID)
 				),
 				'data' => array(
 					'function' => create_function('$warning', '
-						global $scripturl, $txt, $settings;
+						global $scripturl, $txt;
 
 						$ret = \'
 						<div class="floatleft">
@@ -346,7 +346,7 @@ function issueWarning($memID)
 						if (!empty($warning[\'id_notice\']))
 							$ret .= \'
 						<div class="floatright">
-							<a href="\' . $scripturl . \'?action=moderate;area=notice;nid=\' . $warning[\'id_notice\'] . \'" onclick="window.open(this.href, \\\'\\\', \\\'scrollbars=yes,resizable=yes,width=400,height=250\\\');return false;" target="_blank" class="new_win" title="\' . $txt[\'profile_warning_previous_notice\'] . \'"><img src="\' . $settings[\'images_url\'] . \'/filter.png" alt=""></a>
+							<a href="\' . $scripturl . \'?action=moderate;area=notice;nid=\' . $warning[\'id_notice\'] . \'" onclick="window.open(this.href, \\\'\\\', \\\'scrollbars=yes,resizable=yes,width=400,height=250\\\');return false;" target="_blank" class="new_win" title="\' . $txt[\'profile_warning_previous_notice\'] . \'"><span class="generic_icons filter centericon"></span></a>
 						</div>\';
 
 						return $ret;'),
@@ -520,7 +520,7 @@ function list_getUserWarnings($start, $items_per_page, $sort, $memID)
  */
 function deleteAccount($memID)
 {
-	global $txt, $context, $user_info, $modSettings, $cur_profile, $smcFunc;
+	global $txt, $context, $modSettings, $cur_profile, $smcFunc;
 
 	if (!$context['user']['is_owner'])
 		isAllowedTo('profile_remove_any');

+ 45 - 8
Sources/Profile-Modify.php

@@ -931,7 +931,7 @@ function saveProfileFields()
  */
 function saveProfileChanges(&$profile_vars, &$post_errors, $memID)
 {
-	global $user_info, $txt, $user_profile;
+	global $txt, $user_profile;
 	global $context, $sourcedir;
 	global $smcFunc;
 
@@ -1747,7 +1747,7 @@ function getAvatars($directory, $level)
  */
 function theme($memID)
 {
-	global $txt, $context, $user_profile, $user_info, $smcFunc;
+	global $txt, $context, $user_profile, $smcFunc;
 
 	loadThemeOptions($memID);
 	if (allowedTo(array('profile_extra_own', 'profile_extra_any')))
@@ -1857,7 +1857,7 @@ function authentication($memID, $saving = false)
  */
 function notification($memID)
 {
-	global $txt, $scripturl, $user_profile, $user_info, $context, $smcFunc, $sourcedir;
+	global $txt, $scripturl, $user_profile, $context, $smcFunc, $sourcedir;
 
 	// Going to want this for consistency.
 	loadCSSFile('admin.css', array(), 'admin');
@@ -1865,6 +1865,7 @@ function notification($memID)
 	// This is just a bootstrap for everything else.
 	$sa = array(
 		'alerts' => 'alert_configuration',
+		'markread' => 'alert_markread',
 		'topics' => 'alert_notifications_topics',
 		'boards' => 'alert_notifications_boards',
 	);
@@ -1882,7 +1883,7 @@ function notification($memID)
 
 function alert_configuration($memID)
 {
-	global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir;
+	global $txt, $scripturl, $user_profile, $context, $modSettings, $smcFunc, $sourcedir;
 
 	$context['token_check'] = 'profile-nt' . $memID;
 	is_not_guest();
@@ -2080,9 +2081,45 @@ function alert_configuration($memID)
 	createToken($context['token_check'], 'post');
 }
 
+function alert_markread($memID)
+{
+	global $context, $db_show_debug, $smcFunc;
+
+	// We do not want to output debug information here.
+	$db_show_debug = false;
+
+	// We only want to output our little layer here.
+	$context['template_layers'] = array();
+	$context['sub_template'] = 'alerts_all_read';
+
+	loadLanguage('Alerts');
+
+	// Now we're all set up.
+	is_not_guest();
+	if (!$context['user']['is_owner'])
+		fatal_error('no_access');
+
+	checkSession('get');
+
+	// Assuming we're here, mark everything as read and head back.
+	// We only spit back the little layer because this should be called AJAXively.
+	$smcFunc['db_query']('', '
+		UPDATE {db_prefix}user_alerts
+		SET is_read = {int:now}
+		WHERE id_member = {int:current_member}
+			AND is_read = 0',
+		array(
+			'now' => time(),
+			'current_member' => $memID,
+		)
+	);
+
+	updateMemberData($memID, array('alerts' => 0));
+}
+
 function alert_notifications_topics($memID)
 {
-	global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir;
+	global $txt, $scripturl, $user_profile, $context, $modSettings, $smcFunc, $sourcedir;
 
 	// Because of the way this stuff works, we want to do this ourselves.
 	if (isset($_POST['edit_notify_topics']))
@@ -2222,7 +2259,7 @@ function alert_notifications_topics($memID)
 
 function alert_notifications_boards($memID)
 {
-	global $txt, $scripturl, $user_profile, $user_info, $context, $smcFunc, $sourcedir;
+	global $txt, $scripturl, $user_profile, $context, $smcFunc, $sourcedir;
 
 	// Because of the way this stuff works, we want to do this ourselves.
 	if (isset($_POST['edit_notify_boards']))
@@ -2517,7 +2554,7 @@ function loadThemeOptions($memID)
  */
 function ignoreboards($memID)
 {
-	global $txt, $user_info, $context, $modSettings, $smcFunc, $cur_profile;
+	global $txt, $context, $modSettings, $smcFunc, $cur_profile;
 
 	// Have the admins enabled this option?
 	if (empty($modSettings['allow_ignore_boards']))
@@ -3453,7 +3490,7 @@ function profileSendActivation()
  */
 function groupMembership($memID)
 {
-	global $txt, $scripturl, $user_profile, $user_info, $context, $smcFunc;
+	global $txt, $scripturl, $user_profile, $context, $smcFunc;
 
 	$curMember = $user_profile[$memID];
 	$context['primary_group'] = $curMember['id_group'];

+ 7 - 4
Sources/Profile-View.php

@@ -20,7 +20,7 @@ if (!defined('SMF'))
  */
 function summary($memID)
 {
-	global $context, $memberContext, $txt, $modSettings, $user_info, $user_profile, $sourcedir, $scripturl, $smcFunc;
+	global $context, $memberContext, $txt, $modSettings, $user_profile, $sourcedir, $scripturl, $smcFunc;
 
 	// Attempt to load the member's profile data.
 	if (!loadMemberContext($memID) || !isset($memberContext[$memID]))
@@ -188,6 +188,9 @@ function summary($memID)
 		$smcFunc['db_free_result']($request);
 	}
 
+	// Are they hidden?
+	if ($context['member']['online']['is_online'] && empty($user_profile[$memID]['show_online']))
+		$context['member']['is_hidden'] = true;
 	loadCustomFields($memID);
 }
 
@@ -685,7 +688,7 @@ function showPosts($memID)
  */
 function showAttachments($memID)
 {
-	global $txt, $user_info, $scripturl, $modSettings, $board;
+	global $txt, $scripturl, $modSettings, $board;
 	global $context, $user_profile, $sourcedir, $smcFunc;
 
 	// OBEY permissions!
@@ -1088,7 +1091,7 @@ function list_getUnwatched($start, $items_per_page, $sort, $memID)
  */
 function list_getNumUnwatched($memID)
 {
-	global $smcFunc, $user_info;
+	global $smcFunc;
 
 	// Get the total number of attachments they have posted.
 	$request = $smcFunc['db_query']('', '
@@ -2537,7 +2540,7 @@ function list_getGroupRequests($start, $items_per_page, $sort, $memID)
 function showPermissions($memID)
 {
 	global $scripturl, $txt, $board, $modSettings;
-	global $user_profile, $context, $user_info, $sourcedir, $smcFunc;
+	global $user_profile, $context, $sourcedir, $smcFunc;
 
 	// Verify if the user has sufficient permissions.
 	isAllowedTo('manage_permissions');

+ 1 - 1
Sources/Register.php

@@ -220,7 +220,7 @@ function Register($reg_errors = array())
 function Register2($verifiedOpenID = false)
 {
 	global $scripturl, $txt, $modSettings, $context, $sourcedir;
-	global $user_info, $smcFunc;
+	global $smcFunc;
 
 	checkSession();
 	validateToken('register');

+ 0 - 2
Sources/Security.php

@@ -450,7 +450,6 @@ function banPermissions()
 			'merge_any', 'split_any',
 			'modify_own', 'modify_any', 'modify_replies',
 			'move_any',
-			'send_topic',
 			'lock_own', 'lock_any',
 			'remove_own', 'remove_any',
 			'post_unapproved_topics', 'post_unapproved_replies_own', 'post_unapproved_replies_any',
@@ -1188,7 +1187,6 @@ function spamProtection($error_type)
 		'login' => 2,
 		'register' => 2,
 		'remind' => 30,
-		'sendtopic' => $modSettings['spamWaitTime'] * 4,
 		'sendmail' => $modSettings['spamWaitTime'] * 5,
 		'reporttm' => $modSettings['spamWaitTime'] * 4,
 		'search' => !empty($modSettings['search_floodcontrol_time']) ? $modSettings['search_floodcontrol_time'] : 1,

+ 7 - 128
Sources/SendTopic.php

@@ -15,140 +15,13 @@
 if (!defined('SMF'))
 	die('No direct access...');
 
-/**
- * The main handling function for sending specialist (Or otherwise) emails to a user.
- */
-function EmailUser()
-{
-	global $context;
-
-	// Don't index anything here.
-	$context['robot_no_index'] = true;
-
-	// Load the template.
-	loadTemplate('SendTopic');
-
-	$sub_actions = array(
-		'email' => 'CustomEmail',
-		'sendtopic' => 'SendTopic',
-	);
-
-	if (!isset($_GET['sa']) || !isset($sub_actions[$_GET['sa']]))
-		$_GET['sa'] = 'sendtopic';
-
-	$sub_actions[$_GET['sa']]();
-}
-
-/**
- * Send a topic to a friend.
- * Uses the SendTopic template, with the main sub template.
- * Requires the send_topic permission.
- * Redirects back to the first page of the topic when done.
- * Is accessed via ?action=emailuser;sa=sendtopic.
- */
-function SendTopic()
-{
-	global $topic, $txt, $context, $scripturl, $sourcedir, $smcFunc, $modSettings;
-
-	// Check permissions...
-	isAllowedTo('send_topic');
-
-	// We need at least a topic... go away if you don't have one.
-	if (empty($topic))
-		fatal_lang_error('not_a_topic', false);
-
-	// Get the topic's subject.
-	$request = $smcFunc['db_query']('', '
-		SELECT m.subject, t.approved
-		FROM {db_prefix}topics AS t
-			INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
-		WHERE t.id_topic = {int:current_topic}
-		LIMIT 1',
-		array(
-			'current_topic' => $topic,
-		)
-	);
-	if ($smcFunc['db_num_rows']($request) == 0)
-		fatal_lang_error('not_a_topic', false);
-	$row = $smcFunc['db_fetch_assoc']($request);
-	$smcFunc['db_free_result']($request);
-
-	// Can't send topic if its unapproved and using post moderation.
-	if ($modSettings['postmod_active'] && !$row['approved'])
-		fatal_lang_error('not_approved_topic', false);
-
-	// Censor the subject....
-	censorText($row['subject']);
-
-	// Sending yet, or just getting prepped?
-	if (empty($_POST['send']))
-	{
-		$context['page_title'] = sprintf($txt['sendtopic_title'], $row['subject']);
-		$context['start'] = $_REQUEST['start'];
-
-		return;
-	}
-
-	// Actually send the message...
-	checkSession();
-	spamProtection('sendtopic');
-
-	// This is needed for sendmail().
-	require_once($sourcedir . '/Subs-Post.php');
-
-	// Trim the names..
-	$_POST['y_name'] = trim($_POST['y_name']);
-	$_POST['r_name'] = trim($_POST['r_name']);
-
-	// Make sure they aren't playing "let's use a fake email".
-	if ($_POST['y_name'] == '_' || !isset($_POST['y_name']) || $_POST['y_name'] == '')
-		fatal_lang_error('no_name', false);
-	if (!isset($_POST['y_email']) || $_POST['y_email'] == '')
-		fatal_lang_error('no_email', false);
-	if (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $_POST['y_email']) == 0)
-		fatal_lang_error('email_invalid_character', false);
-
-	// The receiver should be valid to.
-	if ($_POST['r_name'] == '_' || !isset($_POST['r_name']) || $_POST['r_name'] == '')
-		fatal_lang_error('no_name', false);
-	if (!isset($_POST['r_email']) || $_POST['r_email'] == '')
-		fatal_lang_error('no_email', false);
-	if (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $_POST['r_email']) == 0)
-		fatal_lang_error('email_invalid_character', false);
-
-	// Emails don't like entities...
-	$row['subject'] = un_htmlspecialchars($row['subject']);
-
-	$replacements = array(
-		'TOPICSUBJECT' => $row['subject'],
-		'SENDERNAME' => $_POST['y_name'],
-		'RECPNAME' => $_POST['r_name'],
-		'TOPICLINK' => $scripturl . '?topic=' . $topic . '.0',
-	);
-
-	$emailtemplate = 'send_topic';
-
-	if (!empty($_POST['comment']))
-	{
-		$emailtemplate .= '_comment';
-		$replacements['COMMENT'] = $_POST['comment'];
-	}
-
-	$emaildata = loadEmailTemplate($emailtemplate, $replacements);
-	// And off we go!
-	sendmail($_POST['r_email'], $emaildata['subject'], $emaildata['body'], $_POST['y_email'], 'sendtopic');
-
-	// Back to the topic!
-	redirectexit('topic=' . $topic . '.0;topicsent');
-}
-
 /**
  * Allow a user to send an email.
  * Send an email to the user - allow the sender to write the message.
  * Can either be passed a user ID as uid or a message id as msg.
  * Does not check permissions for a message ID as there is no information disclosed.
  */
-function CustomEmail()
+function EmailUser()
 {
 	global $context, $user_info, $smcFunc, $txt, $scripturl, $sourcedir;
 
@@ -158,6 +31,12 @@ function CustomEmail()
 
 	isAllowedTo('send_email_to_members');
 
+	// Don't index anything here.
+	$context['robot_no_index'] = true;
+
+	// Load the template.
+	loadTemplate('SendTopic');
+
 	// Are we sending to a user?
 	$context['form_hidden_vars'] = array();
 	if (isset($_REQUEST['uid']))

+ 4 - 4
Sources/SplitTopics.php

@@ -130,7 +130,7 @@ function SplitIndex()
  */
 function SplitExecute()
 {
-	global $txt, $board, $topic, $context, $user_info, $smcFunc;
+	global $txt, $board, $topic, $context, $smcFunc;
 
 	// Check the session to make sure they meant to do this.
 	checkSession();
@@ -464,7 +464,7 @@ function SplitSelectTopics()
  */
 function SplitSelectionExecute()
 {
-	global $txt, $board, $topic, $context, $user_info;
+	global $txt, $board, $topic, $context;
 
 	// Make sure the session id was passed with post.
 	checkSession();
@@ -499,7 +499,7 @@ function SplitSelectionExecute()
  */
 function splitTopic($split1_ID_TOPIC, $splitMessages, $new_subject)
 {
-	global $user_info, $topic, $board, $smcFunc, $txt, $sourcedir;
+	global $topic, $board, $smcFunc, $txt, $sourcedir;
 
 	// Nothing to split?
 	if (empty($splitMessages))
@@ -831,7 +831,7 @@ function MergeTopics()
 function MergeIndex()
 {
 	global $txt, $board, $context, $smcFunc, $sourcedir;
-	global $scripturl, $topic, $user_info, $modSettings;
+	global $scripturl, $topic, $modSettings;
 
 	if (!isset($_GET['from']))
 		fatal_lang_error('no_access', false);

+ 5 - 0
Sources/Subs-Admin.php

@@ -392,6 +392,11 @@ function updateSettingsFile($config_vars)
 				@copy($boarddir . '/Settings_bak.php', $boarddir . '/Settings.php');
 		}
 	}
+
+	// Even though on normal installations the filemtime should prevent this being used by the installer incorrectly
+	// it seems that there are times it might not. So let's MAKE it dump the cache.
+	if (function_exists('opcache_invalidate'))
+		opcache_invalidate($boarddir . '/Settings.php', true);
 }
 
 /**

+ 3 - 45
Sources/Subs-Calendar.php

@@ -395,35 +395,6 @@ function getCalendarGrid($month, $year, $calendarOptions, $is_previous = false)
 			$count = 0;
 	}
 
-	// An adjustment value to apply to all calculated week numbers.
-	if (!empty($calendarOptions['show_week_num']))
-	{
-		// If the first day of the year is a Sunday, then there is no
-		// adjustment to be made. However, if the first day of the year is not
-		// a Sunday, then there is a partial week at the start of the year
-		// that needs to be accounted for.
-		if ($calendarOptions['start_day'] === 0)
-			$nWeekAdjust = $month_info['first_day_of_year'] === 0 ? 0 : 1;
-		// If we are viewing the weeks, with a starting date other than Sunday,
-		// then things get complicated! Basically, as PHP is calculating the
-		// weeks with a Sunday starting date, we need to take this into account
-		// and offset the whole year dependant on whether the first day in the
-		// year is above or below our starting date. Note that we offset by
-		// two, as some of this will get undone quite quickly by the statement
-		// below.
-		else
-			$nWeekAdjust = $calendarOptions['start_day'] > $month_info['first_day_of_year'] && $month_info['first_day_of_year'] !== 0 ? 2 : 1;
-
-		// If our week starts on a day greater than the day the month starts
-		// on, then our week numbers will be one too high. So we need to
-		// reduce it by one - all these thoughts of offsets makes my head
-		// hurt...
-		if ($month_info['first_day']['day_of_week'] < $calendarOptions['start_day'] || $month_info['first_day_of_year'] > 4)
-			$nWeekAdjust--;
-	}
-	else
-		$nWeekAdjust = 0;
-
 	// Iterate through each week.
 	$calendarGrid['weeks'] = array();
 	for ($nRow = 0; $nRow < $nRows; $nRow++)
@@ -431,11 +402,7 @@ function getCalendarGrid($month, $year, $calendarOptions, $is_previous = false)
 		// Start off the week - and don't let it go above 52, since that's the number of weeks in a year.
 		$calendarGrid['weeks'][$nRow] = array(
 			'days' => array(),
-			'number' => $month_info['first_day']['week_num'] + $nRow + $nWeekAdjust
 		);
-		// Handle the dreaded "week 53", it can happen, but only once in a blue moon ;)
-		if ($calendarGrid['weeks'][$nRow]['number'] == 53 && $nShift != 4 && $month_info['first_day_of_next_year'] < 4)
-			$calendarGrid['weeks'][$nRow]['number'] = 1;
 
 		// And figure out all the days.
 		for ($nCol = 0; $nCol < 7; $nCol++)
@@ -484,7 +451,7 @@ function getCalendarGrid($month, $year, $calendarOptions, $is_previous = false)
  */
 function getCalendarWeek($month, $year, $day, $calendarOptions)
 {
-	global $scripturl, $modSettings;
+	global $scripturl, $modSettings, $txt;
 
 	// Get today's date.
 	$today = getTodayInfo();
@@ -541,17 +508,8 @@ function getCalendarWeek($month, $year, $day, $calendarOptions)
 		$first_day_of_next_year = (int) strftime('%w', mktime(0, 0, 0, 1, 1, $year + 1));
 		$last_day_of_last_year = (int) strftime('%w', mktime(0, 0, 0, 12, 31, $year - 1));
 
-		// All this is as getCalendarGrid.
-		if ($calendarOptions['start_day'] === 0)
-			$nWeekAdjust = $first_day_of_year === 0 && $first_day_of_year > 3 ? 0 : 1;
-		else
-			$nWeekAdjust = $calendarOptions['start_day'] > $first_day_of_year && $first_day_of_year !== 0 ? 2 : 1;
-
-		$calendarGrid['week_number'] = (int) strftime('%U', mktime(0, 0, 0, $month, $day, $year)) + $nWeekAdjust;
-
-		// If this crosses a year boundry and includes january it should be week one.
-		if ((int) strftime('%Y', $curTimestamp + 518400) != $year && $calendarGrid['week_number'] > 53 && $first_day_of_next_year < 5)
-			$calendarGrid['week_number'] = 1;
+		$timestamp = mktime(0, 0, 0, $month, $day, $year);
+		$calendarGrid['week_title'] = sprintf($txt['calendar_week_beginning'], date('F', $timestamp), date('j', $timestamp), date('Y', $timestamp));
 	}
 
 	// This holds all the main data - there is at least one month!

+ 1 - 1
Sources/Subs-Charset.php

@@ -323,7 +323,7 @@ function utf8_strtoupper($string)
 		"\xc5\xa5" => "\xc5\xa4",		"\xc5\xa7" => "\xc5\xa6",		"\xc5\xa9" => "\xc5\xa8",		"\xc5\xab" => "\xc5\xaa",
 		"\xc5\xad" => "\xc5\xac",		"\xc5\xaf" => "\xc5\xae",		"\xc5\xb1" => "\xc5\xb0",		"\xc5\xb3" => "\xc5\xb2",
 		"\xc5\xb5" => "\xc5\xb4",		"\xc5\xb7" => "\xc5\xb6",		"\xc3\xbf" => "\xc5\xb8",		"\xc5\xba" => "\xc5\xb9",
-		"\xc5\xbc" => "\xc5\xbb",		"\xc5\xbe" => "\xc5\xbd",		"s" => "\xc5\xbf",		"\xc9\x93" => "\xc6\x81",
+		"\xc5\xbc" => "\xc5\xbb",		"\xc5\xbe" => "\xc5\xbd",		"\xc9\x93" => "\xc6\x81",
 		"\xc6\x83" => "\xc6\x82",		"\xc6\x85" => "\xc6\x84",		"\xc9\x94" => "\xc6\x86",		"\xc6\x88" => "\xc6\x87",
 		"\xc9\x96" => "\xc6\x89",		"\xc9\x97" => "\xc6\x8a",		"\xc6\x8c" => "\xc6\x8b",		"\xc7\x9d" => "\xc6\x8e",
 		"\xc9\x99" => "\xc6\x8f",		"\xc9\x9b" => "\xc6\x90",		"\xc6\x92" => "\xc6\x91",		"\xc9\xa0" => "\xc6\x93",

+ 5 - 2
Sources/Subs-Graphics.php

@@ -855,10 +855,14 @@ function showCodeImage($code)
 	$font_dir = dir($settings['default_theme_dir'] . '/fonts');
 	$font_list = array();
 	$ttfont_list = array();
+	$endian = unpack('v', pack('S', 0x00FF)) === 0x00FF;
 	while ($entry = $font_dir->read())
 	{
 		if (preg_match('~^(.+)\.gdf$~', $entry, $matches) === 1)
-			$font_list[] = $entry;
+		{
+			if ($endian ^ (strpos($entry, '_end.gdf') === false))
+				$font_list[] = $entry;
+		}
 		elseif (preg_match('~^(.+)\.ttf$~', $entry, $matches) === 1)
 			$ttfont_list[] = $entry;
 	}
@@ -946,7 +950,6 @@ function showCodeImage($code)
 			// Can we use true type fonts?
 			$can_do_ttf = function_exists('imagettftext');
 
-
 			// How much rotation will we give?
 			if ($rotationType == 'none')
 				$angle = 0;

+ 2 - 2
Sources/Subs-Membergroups.php

@@ -247,7 +247,7 @@ function deleteMembergroups($groups)
  */
 function removeMembersFromGroups($members, $groups = null, $permissionCheckDone = false, $ignoreProtected = false)
 {
-	global $smcFunc, $user_info, $modSettings, $sourcedir;
+	global $smcFunc, $modSettings, $sourcedir;
 
 	// You're getting nowhere without this permission, unless of course you are the group's moderator.
 	if (!$permissionCheckDone)
@@ -473,7 +473,7 @@ function removeMembersFromGroups($members, $groups = null, $permissionCheckDone
  */
 function addMembersToGroup($members, $group, $type = 'auto', $permissionCheckDone = false, $ignoreProtected = false)
 {
-	global $smcFunc, $user_info, $modSettings, $sourcedir;
+	global $smcFunc, $modSettings, $sourcedir;
 
 	// Show your licence, but only if it hasn't been done yet.
 	if (!$permissionCheckDone)

+ 1 - 1
Sources/Subs-Members.php

@@ -882,7 +882,7 @@ function registerMember(&$regOptions, $return_errors = false)
  */
 function isReservedName($name, $current_ID_MEMBER = 0, $is_name = true, $fatal = true)
 {
-	global $user_info, $modSettings, $smcFunc, $context;
+	global $modSettings, $smcFunc, $context;
 
 	$name = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'replaceEntities__callback', $name);
 	$checkName = $smcFunc['strtolower']($name);

+ 1 - 1
Sources/Subs-OpenID.php

@@ -237,7 +237,7 @@ function smf_openID_removeAssociation($handle)
 
 function smf_openID_return()
 {
-	global $smcFunc, $user_info, $user_profile, $sourcedir, $modSettings, $context, $sc, $user_settings;
+	global $smcFunc, $user_profile, $sourcedir, $modSettings, $context, $sc, $user_settings;
 
 	// Is OpenID even enabled?
 	if (empty($modSettings['enableOpenID']))

+ 2 - 2
Sources/Subs-Post.php

@@ -2788,7 +2788,7 @@ function updateLastMessages($setboards, $id_msg = 0)
  */
 function adminNotify($type, $memberID, $member_name = null)
 {
-	global $txt, $modSettings, $language, $scripturl, $user_info, $context, $smcFunc;
+	global $txt, $modSettings, $language, $scripturl, $context, $smcFunc;
 
 	if ($member_name == null)
 	{
@@ -2830,7 +2830,7 @@ function adminNotify($type, $memberID, $member_name = null)
  */
 function loadEmailTemplate($template, $replacements = array(), $lang = '', $loadLang = true)
 {
-	global $txt, $mbname, $scripturl, $settings, $user_info;
+	global $txt, $mbname, $scripturl, $settings;
 
 	// First things first, load up the email templates language file, if we need to.
 	if ($loadLang)

+ 1 - 1
Sources/Subs-Recent.php

@@ -24,7 +24,7 @@ if (!defined('SMF'))
  */
 function getLastPosts($latestPostOptions)
 {
-	global $scripturl, $txt, $user_info, $modSettings, $smcFunc, $context;
+	global $scripturl, $txt, $modSettings, $smcFunc, $context;
 
 	// Find all the posts.  Newer ones will have higher IDs.  (assuming the last 20 * number are accessable...)
 	// @todo SLOW This query is now slow, NEEDS to be fixed.  Maybe break into two?

+ 2 - 9
Sources/Subs.php

@@ -2034,7 +2034,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 		// Item codes are complicated buggers... they are implicit [li]s and can make [list]s!
 		if ($smileys !== false && $tag === null && isset($itemcodes[$message[$pos + 1]]) && $message[$pos + 2] == ']' && !isset($disabled['list']) && !isset($disabled['li']))
 		{
-			if ($message[$pos + 1] == '0' && !in_array($message[$pos - 1], array(';', ' ', "\t", '>')))
+			if ($message[$pos + 1] == '0' && !in_array($message[$pos - 1], array(';', ' ', "\t", "\n", '>')))
 				continue;
 
 			$tag = $itemcodes[$message[$pos + 1]];
@@ -2080,7 +2080,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 			if ($pos2 !== false && ($pos2 <= $pos3 || $pos3 === false))
 			{
 				preg_match('~^(<br>|&nbsp;|\s|\[)+~', substr($message, $pos2 + 6), $matches);
-				$message = substr($message, 0, $pos2) . "\n" . (!empty($matches[0]) && substr($matches[0], -1) == '[' ? '[/li]' : '[/li][/list]') . "\n" . substr($message, $pos2);
+				$message = substr($message, 0, $pos2) . (!empty($matches[0]) && substr($matches[0], -1) == '[' ? '[/li]' : '[/li][/list]') . substr($message, $pos2);
 
 				$open_tags[count($open_tags) - 2]['after'] = '</ul>';
 			}
@@ -3730,13 +3730,6 @@ function setupMenuContext()
 				),
 				'is_last' => $context['right_to_left'],
 			),
-			'help' => array(
-				'title' => $txt['help'],
-				'href' => $scripturl . '?action=help',
-				'show' => true,
-				'sub_buttons' => array(
-				),
-			),
 			'search' => array(
 				'title' => $txt['search'],
 				'href' => $scripturl . '?action=search',

+ 90 - 0
Sources/tasks/EventNew-Notify.php

@@ -0,0 +1,90 @@
+<?php
+
+/**
+ * This taks handles notifying someone that a new event has been
+ * added to the calendar - but only when no topic has been created.
+ * 
+ * Simple Machines Forum (SMF)
+ * 
+ * @package SMF
+ * @author Simple Machines http://www.simplemachines.org
+ * @copyright 2014 Simple Machines and individual contributors
+ * @license http://www.simplemachines.org/about/smf/license.php BSD
+ * 
+ * @version SMF 2.1 Alpha 1
+ */
+
+class EventNew_Notify_Background extends SMF_BackgroundTask
+{
+	public function execute()
+ 	{
+ 		global $sourcedir, $smcFunc, $language, $modSettings, $user_profile;
+
+		// Get everyone who could be notified - those are the people who can see the calendar.
+		require_once($sourcedir . '/Subs-Members.php');
+		$members = membersAllowedTo('calendar_view');
+
+		// Having successfully figured this out, now let's get the preferences of everyone.
+		require_once($sourcedir . '/Subs-Notify.php');
+		$prefs = getNotifyPrefs($members, 'event_new', true);
+
+		// Just before we go any further, we may not have the sender's name. Let's just quickly fix that.
+		// If a guest creates the event, we wouldn't be capturing a username or anything.
+		if (!empty($this->_details['sender_id']) && empty($this->_details['sender_name']))
+		{
+			loadMemberData($this->_details['sender_id'], 'minimal');
+			if (!empty($user_profile[$this->_details['sender_id']))
+				$this->_details['sender_name'] = $user_profile[$this->_details['sender_id']]['real_name'];
+			else
+				$this->_details['sender_id'] = 0;
+		}
+
+		// So now we find out who wants what.
+		$alert_bits = array(
+			'alert' => 0x01,
+			'email' => 0x02,
+		);
+		$notifies = array();
+
+		foreach ($prefs as $member => $pref_option)
+		{
+			foreach ($alert_bits as $type => $bitvalue)
+				if ($pref_option['event_new'] & $bitvalue)
+					$notifies[$type][] = $member;
+		}
+
+		// Firstly, anyone who wants alerts.
+		if (!empty($notifies['alert']))
+		{
+			// Alerts are relatively easy.
+			$insert_rows = array();
+			foreach ($notifies['alert'] as $member)
+			{
+				$insert_rows[] = array(
+					'alert_time' => $this->_details['time'],
+					'id_member' => $member,
+					'id_member_started' => $this->_details['sender_id'],
+					'member_name' => $this->_details['sender_name'],
+					'content_type' => 'event',
+					'content_id' => $this->_details['event_id'],
+					'content_action' => empty($this->_details['sender_id']) ? 'new_guest' : 'new',
+					'is_read' => 0,
+					'extra' => '',
+				);
+			}
+
+			$smcFunc['db_insert']('insert',
+				'{db_prefix}user_alerts',
+				array('alert_time' => 'int', 'id_member' => 'int', 'id_member_started' => 'int',
+					'member_name' => 'string', 'content_type' => 'string', 'content_id' => 'int',
+					'content_action' => 'string', 'is_read' => 'int', 'extra' => 'string'),
+				$insert_rows,
+				array('id_alert')
+			);
+
+			// And update the count of alerts for those people.
+			updateMemberData($notifies['alert'], array('alerts' => '+'));
+		}
+	}
+}
+?>

+ 1 - 1
Sources/tasks/GroupReq-Notify.php

@@ -18,7 +18,7 @@ class GroupReq_Notify_Background extends SMF_BackgroundTask
 {
 	public function execute()
  	{
- 		global $sourcedir, $smcFunc, $language, $modSettings;		
+ 		global $sourcedir, $smcFunc, $language, $modSettings, $scripturl;		
 
 		// Do we have any group moderators?
 		$request = $smcFunc['db_query']('', '

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

@@ -1544,12 +1544,12 @@ function template_clean_cache_button_below()
 
 function template_admin_quick_search()
 {
-	global $context, $settings, $txt, $scripturl;
+	global $context, $txt, $scripturl;
 	if ($context['user']['is_admin'])
 		echo '
 							<object id="quick_search">
 								<form action="', $scripturl, '?action=admin;area=search" method="post" accept-charset="', $context['character_set'], '" class="floatright">
-									<img class="icon" src="', $settings['images_url'] , '/filter.png" alt="">
+									<span class="generic_icons filter centericon"></span>
 									<input type="text" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';" class="input_text">
 									<select name="search_type">
 										<option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected' : ''), '>', $txt['admin_search_type_internal'], '</option>

+ 1 - 5
Themes/default/BoardIndex.template.php

@@ -298,11 +298,7 @@ function template_ic_block_recent()
 					<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.png" alt="">', $txt['recent_posts'], '</a>
 				</h4>
 			</div>
-			<div class="hslice" id="recent_posts_content">
-				<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
-				<div class="entry-content" style="display: none;">
-					<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
-				</div>';
+			<div id="recent_posts_content">';
 
 	// Only show one post.
 	if ($settings['number_recent_posts'] == 1)

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

@@ -206,10 +206,6 @@ function template_show_month_grid($grid_name, $is_mini = false)
 				// A lot of stuff, we're not showing on mini-calendars to conserve space.
 				if ($is_mini === false)
 				{
-					// If this is the first day of a week and we're showing week numbers, go ahead and do so now.
-					if ($day['is_first_day'] && !empty($context['tpl_show_week_num']))
-						echo '<span class="smalltext"> - <a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $day['day'], '">', $txt['calendar_week'], ' ', $week['number'], '</a></span>';
-
 					// Holidays are always fun, let's show them!
 					if (!empty($day['holidays']))
 						echo '<div class="smalltext holiday"><span>', $txt['calendar_prompt'], '</span> ', implode(', ', $day['holidays']), '</div>';
@@ -282,9 +278,9 @@ function template_show_month_grid($grid_name, $is_mini = false)
 			// Otherwise, assuming it's not a mini-calendar, we can show previous / next month days!
 			elseif ($is_mini === false)
 			{
-				if ($current_month_started === false && !empty($context['calendar_grid_prev']))
+				if (empty($current_month_started) && !empty($context['calendar_grid_prev']))
 					echo '<a href="', $scripturl, '?action=calendar;year=', $context['calendar_grid_prev']['current_year'], ';month=', $context['calendar_grid_prev']['current_month'], '">', $context['calendar_grid_prev']['last_of_month'] - $calendar_data['shift']-- + 1, '</a>';
-				elseif (!empty($context['calendar_grid_next']))
+				elseif (!empty($current_month_started) && !empty($context['calendar_grid_next']))
 					echo '<a href="', $scripturl, '?action=calendar;year=', $context['calendar_grid_next']['current_year'], ';month=', $context['calendar_grid_next']['current_month'], '">', $current_month_started + 1 == $count ? (!empty($calendar_data['short_month_titles']) ? $txt['months_short'][$context['calendar_grid_next']['current_month']] . ' ' : $txt['months_titles'][$context['calendar_grid_next']['current_month']] . ' ') : '', $final_count++, '</a>';
 			}
 
@@ -331,15 +327,15 @@ function template_show_week_grid($grid_name)
 					if (empty($calendar_data['previous_calendar']['disabled']) && !empty($calendar_data['show_next_prev']))
 					{
 						echo '
-							<span class="floatleft xlarge_text>
+							<span class="floatleft xlarge_text">
 								<a href="', $calendar_data['previous_week']['href'], '">&#171;</a>
 							</span>
 						';
 					}
 
 					// The Month Title + Week Number...
-					if (!empty($calendar_data['week_number']))
-							echo $txt['calendar_week'], ' ', $calendar_data['week_number'], ' - ', $month_data['current_year'];
+					if (!empty($calendar_data['week_title']))
+							echo $calendar_data['week_title'];
 
 					// Next Week Link...
 					if (empty($calendar_data['next_calendar']['disabled']) && !empty($calendar_data['show_next_prev']))
@@ -519,7 +515,7 @@ function template_calendar_base($col_span = 1)
 // Template for posting a calendar event.
 function template_event_post()
 {
-	global $context, $txt, $scripturl;
+	global $context, $txt, $scripturl, $modSettings;
 
 	echo '
 		<form action="', $scripturl, '?action=calendar;sa=post" method="post" name="postevent" accept-charset="', $context['character_set'], '" onsubmit="submitonce(this);smc_saveEntities(\'postevent\', [\'evtitle\']);" style="margin: 0;">';
@@ -615,7 +611,7 @@ function template_event_post()
 	}
 
 	// If this is a new event let the user specify which board they want the linked post to be put into.
-	if ($context['event']['new'])
+	if ($context['event']['new'] && !empty($context['event']['categories']))
 	{
 		echo '
 							<li>

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

@@ -155,7 +155,7 @@ function template_main()
 	echo '
 			<div class="pagesection">
 				', template_button_strip($context['normal_buttons'], 'right'), '
-				', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#bot" class="topbottom floatleft">' . $txt['go_down'] . '</a>' : '', '
+				', $context['menu_separator'], '<a href="#bot" class="topbottom floatleft">', $txt['go_down'], '</a>
 				<div class="pagelinks floatleft">
 					', $context['page_index'], '
 				</div>
@@ -206,7 +206,7 @@ function template_main()
 	echo '
 			<div class="pagesection">
 				', template_button_strip($context['normal_buttons'], 'right'), '
-				', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#main_content_section" class="topbottom floatleft">' . $txt['go_up'] . '</a>' : '', '
+				', $context['menu_separator'], '<a href="#main_content_section" class="topbottom floatleft">', $txt['go_up'], '</a>
 				<div class="pagelinks floatleft">
 					', $context['page_index'], '
 				</div>
@@ -709,12 +709,14 @@ function template_single_post($message, $force_alternate = null)
 								<h5>
 									<a href="', $message['href'], '" rel="nofollow" title="', !empty($message['counter']) ? sprintf($txt['reply_number'], $message['counter']) : '', ' - ', $message['subject'], '" class="smalltext">', $message['time'], '</a>';
 
-	// Show "<< Last Edit: Time by Person >>" if this post was edited.
+	// Show "<< Last Edit: Time by Person >>" if this post was edited. But we need the div even if it wasn't modified!
+	// Because we insert into it through AJAX and we don't want to stop themers moving it around if they so wish so they can put it where they want it.
+	echo '
+									<span class="smalltext modified" id="modified_', $message['id'], '">';
+	
 	if ($settings['show_modify'] && !empty($message['modified']['name']))
-		echo '
-									<span class="smalltext modified" id="modified_', $message['id'], '">
-										', $message['modified']['last_edit_text'], '
-									</span>';
+		echo $message['modified']['last_edit_text'];
+	echo '</span>';
 
 	echo '
 								</h5>

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

@@ -108,14 +108,14 @@ function template_error_log()
 					<td>
 
 						<div style="float: left; width: 50%; line-height: 1.8em; padding: 0 4px 4px 4px; vertical-align: bottom;">
-							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=id_member;value=', $error['member']['id'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_member'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_member'], '"></a>
+							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=id_member;value=', $error['member']['id'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_member'], '"><span class="generic_icons filter centericon"></span></a>
 							<strong>', $error['member']['link'], '</strong><br>
 							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? '' : ';desc', $context['has_filter'] ? $context['filter']['href'] : '', '" title="', $txt['reverse_direction'], '"><span class="sort sort_' . $context['sort_direction'] . '">', $txt['reverse_direction'], '</span></a>
 							', $error['time'], '<br>';
 
 		if (!empty($error['member']['ip']))
 			echo '
-							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=ip;value=', $error['member']['ip'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"></a>
+							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=ip;value=', $error['member']['ip'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"><span class="generic_icons filter centericon"></span></a>
 							<strong><a href="', $scripturl, '?action=trackip;searchip=', $error['member']['ip'], '">', $error['member']['ip'], '</a></strong>&nbsp;&nbsp;<br>';
 
 		echo '
@@ -125,25 +125,25 @@ function template_error_log()
 
 		if ($error['member']['session'] != '')
 			echo '
-							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $error['member']['session'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '"></a>
+							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $error['member']['session'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '"><span class="generic_icons filter centericon"></span></a>
 							', $error['member']['session'], '<br>';
 
 		echo '
-							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=error_type;value=', $error['error_type']['type'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '"></a>
+							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=error_type;value=', $error['error_type']['type'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '"><span class="generic_icons filter centericon"></span></a>
 							', $txt['error_type'], ': ', $error['error_type']['name'], '<br>
-							<a style="display: table-cell; padding: 4px 0; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=message;value=', $error['message']['href'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_message'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_message'], '"></a>
+							<a style="display: table-cell; padding: 4px 0; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=message;value=', $error['message']['href'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_message'], '"><span class="generic_icons filter"></span></a>
 							<span style="display: table-cell;">', $error['message']['html'], '</span>
 						</div>
 
 						<div style="float: left; width: 100%; padding: 4px 0; line-height: 1.6em; border-top: 1px solid #e3e3e3;">
-							<a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=url;value=', $error['url']['href'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_url'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_url'], '"></a>
+							<a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=url;value=', $error['url']['href'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_url'], '"><span class="generic_icons filter"></span></a>
 							<a style="display: table-cell;" href="', $error['url']['html'], '">', $error['url']['html'], '</a>
 						</div>';
 
 		if (!empty($error['file']))
 			echo '
 						<div style="float: left; width: 100%; padding: 4px 0; line-height: 1.6em; border-top: 1px solid #e3e3e3;">
-							<a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=file;value=', $error['file']['search'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '"></a>
+							<a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=file;value=', $error['file']['search'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '"><span class="generic_icons filter"></span></a>
 							<div style="display: table-cell;">
 								', $txt['file'], ': ', $error['file']['link'], '<br>
 								', $txt['line'], ': ', $error['file']['line'], '

+ 15 - 0
Themes/default/Help.template.php

@@ -171,4 +171,19 @@ function template_manual()
 			</div>';
 }
 
+function template_terms()
+{
+	global $txt, $context;
+
+	echo '
+		<div class="cat_bar">
+			<h3 class="catbg">
+				', $txt['terms_and_rules'], ' - ', $context['forum_name'], '
+			</h3>
+		</div>
+		<div class="roundframe">
+			', $context['agreement'], '
+		</div>';
+}
+
 ?>

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

@@ -81,13 +81,13 @@ function template_download_language()
 						<th class="first_th" scope="col">
 							', $txt['languages_download_filename'], '
 						</th>
-						<th scope="col" width="100">
+						<th scope="col" style="width: 100px">
 							', $txt['languages_download_writable'], '
 						</th>
-						<th scope="col" width="100">
+						<th scope="col" style="width: 100px">
 							', $txt['languages_download_exists'], '
 						</th>
-						<th class="last_th centercol" scope="col" width="4%">
+						<th class="last_th centercol" scope="col" style="width: 4%">
 							', $txt['languages_download_copy'], '
 						</th>
 					</tr>

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

@@ -580,7 +580,7 @@ function template_group_members()
 						<th ', empty($context['group']['assignable']) ? ' class="last_th" colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="sort sort_' . $context['sort_direction'] . '"></span>' : '','</a></th>';
 	if (!empty($context['group']['assignable']))
 		echo '
-						<th class="last_th" width="4%" align="center"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>';
+						<th class="last_th" style="width: 4%" align="center"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>';
 	echo '
 					</tr>
 				</thead>
@@ -630,7 +630,7 @@ function template_group_members()
 						<td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>';
 		if (!empty($context['group']['assignable']))
 			echo '
-						<td align="center" width="4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" class="input_check" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>';
+						<td align="center" style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" class="input_check" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>';
 		echo '
 					</tr>';
 	}

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

@@ -101,7 +101,7 @@ function template_modify_subscription()
 					</dl>
 					<hr class="hrcolor">
 					<input type="radio" name="duration_type" id="duration_type_fixed" value="fixed"', empty($context['sub']['duration']) || $context['sub']['duration'] == 'fixed' ? ' checked' : '', ' class="input_radio" onclick="toggleDuration(\'fixed\');">
-					<strong>', $txt['paid_mod_fixed_price'], '</strong>
+					<strong><label for="duration_type_fixed">', $txt['paid_mod_fixed_price'], '</label></strong>
 					<br>
 					<div id="fixed_area" ', empty($context['sub']['duration']) || $context['sub']['duration'] == 'fixed' ? '' : 'style="display: none;"', '>
 						<fieldset>
@@ -128,7 +128,7 @@ function template_modify_subscription()
 						</fieldset>
 					</div>
 					<input type="radio" name="duration_type" id="duration_type_flexible" value="flexible"', !empty($context['sub']['duration']) && $context['sub']['duration'] == 'flexible' ? ' checked' : '', ' class="input_radio" onclick="toggleDuration(\'flexible\');">
-					<strong>', $txt['paid_mod_flexible_price'], '</strong>
+					<strong><label for="duration_type_flexible">', $txt['paid_mod_flexible_price'], '</label></strong>
 					<br>
 					<div id="flexible_area" ', !empty($context['sub']['duration']) && $context['sub']['duration'] == 'flexible' ? '' : 'style="display: none;"', '>
 						<fieldset>';
@@ -408,14 +408,14 @@ function template_user_subscription()
 	if (empty($context['subscriptions']))
 	{
 		echo '
-			<div class="information">
+			<div class="description">
 				', $txt['paid_subs_none'], '
 			</div>';
 	}
 	else
 	{
 		echo '
-			<div class="information">
+			<div class="description">
 				', $txt['paid_subs_desc'], '
 			</div>';
 
@@ -484,13 +484,13 @@ function template_user_subscription()
 		<div class="title_bar">
 			<h3 class="titlebg">', $txt['paid_current'], '</h3>
 		</div>
-		<div class="information">
+		<div class="description">
 			', $txt['paid_current_desc'], '
 		</div>
 		<table class="table_grid">
 			<thead>
 				<tr class="catbg">
-					<th class="first_th" width="30%">', $txt['paid_name'], '</th>
+					<th class="first_th" style="width: 30%">', $txt['paid_name'], '</th>
 					<th align="center">', $txt['paid_status'], '</th>
 					<th align="center">', $txt['start_date'], '</th>
 					<th class="last_th" align="center">', $txt['end_date'], '</th>

+ 1 - 4
Themes/default/Memberlist.template.php

@@ -52,7 +52,7 @@ function template_main()
 		// This is just some column... show the link and be done with it.
 		else
 			echo '
-					<th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
+					<th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' style="width: ' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
 						', $column['link'], '</th>';
 	}
 	echo '
@@ -72,9 +72,6 @@ function template_main()
 						', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" class="centericon">' : $member['online']['label'], $context['can_send_pm'] ? '</a>' : '', '
 					</td>
 					<td class="lefttext">', $member['link'], '</td>';
-			if ($context['can_send_email'])
-				echo '
-					<td class="centertext">', $member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><span class="generic_icons mail icon" title="' . $txt['email'] . ' ' . $member['name'] . '"></span></a>', '</td>';
 
 		if (!isset($context['disabled_fields']['website']))
 			echo '

+ 8 - 5
Themes/default/MessageIndex.template.php

@@ -120,7 +120,7 @@ function template_main()
 	{
 		echo '
 	<div class="pagesection">
-		', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#bot" class="topbottom floatleft">' . $txt['go_down'] . '</a>' : '', '
+		', $context['menu_separator'], '<a href="#bot" class="topbottom floatleft">', $txt['go_down'], '</a>
 		<div class="pagelinks floatleft">', $context['page_index'], '</div>
 		', template_button_strip($context['normal_buttons'], 'right'), '
 	</div>';
@@ -192,14 +192,14 @@ function template_main()
 			// If it's on in "image" mode, don't show anything but the column.
 			elseif (!empty($context['can_quick_mod']))
 				echo '
-					<th class="last_th" width="4%">&nbsp;</th>';
+					<th class="last_th" style="width: 4%">&nbsp;</th>';
 		}
 		// No topics.... just say, "sorry bub".
 		else
 			echo '
-					<th scope="col" class="first_th" width="8%">&nbsp;</th>
+					<th scope="col" class="first_th" style="width: 8%">&nbsp;</th>
 					<th colspan="3"><strong>', $txt['topic_alert_none'], '</strong></th>
-					<th scope="col" class="last_th" width="8%">&nbsp;</th>';
+					<th scope="col" class="last_th" style="width: 8%">&nbsp;</th>';
 
 		echo '
 				</tr>
@@ -250,6 +250,9 @@ function template_main()
 			// Now we handle the icons
 			echo '
 							<div class="icons">';
+			if ($topic['is_watched'])
+				echo '
+								<span class="generic_icons watch floatright" title="', $txt['watching_this_topic'], '"></span>';
 			if ($topic['is_locked'])
 				echo '
 								<span class="generic_icons lock floatright"></span>';
@@ -357,7 +360,7 @@ function template_main()
 		echo '
 	<div class="pagesection">
 		', template_button_strip($context['normal_buttons'], 'right'), '
-		', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#main_content_section" class="topbottom floatleft">' . $txt['go_up'] . '</a>' : '', '
+		', $context['menu_separator'], '<a href="#main_content_section" class="topbottom floatleft">', $txt['go_up'], '</a>
 		<div class="pagelinks">', $context['page_index'], '</div>
 	</div>';
 	}

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

@@ -183,7 +183,7 @@ function template_view_package()
 					echo '
 							<tr class="windowbg', $alternate2 ? '' : '2', '">
 								<td width="0"></td>
-								<td width="30" class="smalltext"><a href="' . $scripturl . '?action=admin;area=packages;sa=showoperations;operation_key=', $operation['operation_key'], ';package=', $_REQUEST['package'], ';filename=', $operation['filename'], ($operation['is_boardmod'] ? ';boardmod' : ''), (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'uninstall' ? ';reverse' : ''), '" onclick="return reqWin(this.href, 680, 400, false);"><img src="', $settings['default_images_url'], '/admin/package_ops.png" alt=""></a></td>
+								<td width="30" class="smalltext"><a href="' . $scripturl . '?action=admin;area=packages;sa=showoperations;operation_key=', $operation['operation_key'], !empty($context['install_id']) ? ';install_id=' . $context['install_id'] : '', ';package=', $_REQUEST['package'], ';filename=', $operation['filename'], ($operation['is_boardmod'] ? ';boardmod' : ''), (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'uninstall' ? ';reverse' : ''), '" onclick="return reqWin(this.href, 680, 400, false);"><img src="', $settings['default_images_url'], '/admin/package_ops.png" alt=""></a></td>
 								<td width="30" class="smalltext">', $operation_num, '.</td>
 								<td width="23%" class="smalltext">', $txt[$operation_text], '</td>
 								<td width="50%" class="smalltext">', $operation['action'], '</td>
@@ -277,7 +277,7 @@ function template_view_package()
 							echo '
 								<tr class="windowbg', $alternate2 ? '' : '2', '">
 									<td width="0"></td>
-									<td width="30" class="smalltext"><a href="' . $scripturl . '?action=admin;area=packages;sa=showoperations;operation_key=', $operation['operation_key'], ';package=', $_REQUEST['package'], ';filename=', $operation['filename'], ($operation['is_boardmod'] ? ';boardmod' : ''), (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'uninstall' ? ';reverse' : ''), '" onclick="return reqWin(this.href, 600, 400, false);"><img src="', $settings['default_images_url'], '/admin/package_ops.png" alt=""></a></td>
+									<td width="30" class="smalltext"><a href="' . $scripturl . '?action=admin;area=packages;sa=showoperations;operation_key=', $operation['operation_key'], !empty($context['install_id']) ? ';install_id=' . $context['install_id'] : '', ';package=', $_REQUEST['package'], ';filename=', $operation['filename'], ($operation['is_boardmod'] ? ';boardmod' : ''), (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'uninstall' ? ';reverse' : ''), '" onclick="return reqWin(this.href, 600, 400, false);"><img src="', $settings['default_images_url'], '/admin/package_ops.png" alt=""></a></td>
 									<td width="30" class="smalltext">', $operation_num, '.</td>
 									<td width="23%" class="smalltext">', $txt[$operation_text], '</td>
 									<td width="50%" class="smalltext">', $operation['action'], '</td>
@@ -1554,11 +1554,11 @@ function template_file_permissions()
 						<span style="color: ', ($dir['perms']['chmod'] ? 'green' : 'red'), '">', ($dir['perms']['chmod'] ? $txt['package_file_perms_writable'] : $txt['package_file_perms_not_writable']), '</span>
 						', ($dir['perms']['perms'] ? '&nbsp;(' . $txt['package_file_perms_chmod'] . ': ' . substr(sprintf('%o', $dir['perms']['perms']), -4) . ')' : ''), '
 					</td>
-					<td align="center" class="perm_read" width="8%"><input type="radio" name="permStatus[', $name, ']" value="read" class="input_radio"></td>
-					<td align="center" class="perm_write" width="8%"><input type="radio" name="permStatus[', $name, ']" value="writable" class="input_radio"></td>
-					<td align="center" class="perm_execute" width="8%"><input type="radio" name="permStatus[', $name, ']" value="execute" class="input_radio"></td>
-					<td align="center" class="perm_custom" width="8%"><input type="radio" name="permStatus[', $name, ']" value="custom" class="input_radio"></td>
-					<td align="center" class="perm_nochange" width="8%"><input type="radio" name="permStatus[', $name, ']" value="no_change" checked class="input_radio"></td>
+					<td align="center" class="perm_read"><input type="radio" name="permStatus[', $name, ']" value="read" class="input_radio"></td>
+					<td align="center" class="perm_write"><input type="radio" name="permStatus[', $name, ']" value="writable" class="input_radio"></td>
+					<td align="center" class="perm_execute"><input type="radio" name="permStatus[', $name, ']" value="execute" class="input_radio"></td>
+					<td align="center" class="perm_custom"><input type="radio" name="permStatus[', $name, ']" value="custom" class="input_radio"></td>
+					<td align="center" class="perm_nochange"><input type="radio" name="permStatus[', $name, ']" value="no_change" checked class="input_radio"></td>
 				</tr>
 			';
 
@@ -1662,11 +1662,11 @@ function template_permission_show_contents($ident, $contents, $level, $has_more
 					<span class="', ($dir['perms']['chmod'] ? 'success' : 'error'), '">', ($dir['perms']['chmod'] ? $txt['package_file_perms_writable'] : $txt['package_file_perms_not_writable']), '</span>
 					', ($dir['perms']['perms'] ? '&nbsp;(' . $txt['package_file_perms_chmod'] . ': ' . substr(sprintf('%o', $dir['perms']['perms']), -4) . ')' : ''), '
 				</td>
-				<td align="center" width="8%" class="perm_read"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="read" class="input_radio"></td>
-				<td align="center" width="8%" class="perm_write"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="writable" class="input_radio"></td>
-				<td align="center" width="8%" class="perm_execute"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="execute" class="input_radio"></td>
-				<td align="center" width="8%" class="perm_custom"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="custom" class="input_radio"></td>
-				<td align="center" width="8%" class="perm_nochange"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="no_change" checked class="input_radio"></td>
+				<td align="center" class="perm_read"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="read" class="input_radio"></td>
+				<td align="center" class="perm_write"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="writable" class="input_radio"></td>
+				<td align="center" class="perm_execute"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="execute" class="input_radio"></td>
+				<td align="center" class="perm_custom"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="custom" class="input_radio"></td>
+				<td align="center" class="perm_nochange"><input type="radio" name="permStatus[', $ident . '/' . $name, ']" value="no_change" checked class="input_radio"></td>
 			</tr>
 			<tr id="insert_div_loc_' . $cur_ident . '" style="display: none;"><td></td></tr>';
 

+ 49 - 11
Themes/default/Profile.template.php

@@ -95,20 +95,18 @@ function template_alerts_popup()
 	echo '
 		<div class="alert_bar">
 			<div class="alerts_opts floatright">
-				<a href="' . $scripturl . '?action=pm;sa=send">', $txt['mark_alerts_read'], '</a>
+				<a href="' . $scripturl . '?action=profile;area=notification;sa=markread;', $context['session_var'], '=', $context['session_id'], '" onclick="return markAlertsRead(this)">', $txt['mark_alerts_read'], '</a>
 				| <a href="', $scripturl, '?action=profile;area=notification;sa=alerts">', $txt['alert_settings'], '</a>
 			</div>
 			<div class="alerts_box floatleft">
-				', $txt['unread_alerts'], '
-				| <a href="', $scripturl, '?action=pm">', $txt['all_alerts'], '</a>
+				<a href="', $scripturl, '?action=pm">', $txt['all_alerts'], '</a>
 			</div>
 		</div>
 		<div class="alerts_unread">';
 
 	if (empty($context['unread_alerts']))
 	{
-		echo '
-			<div class="no_unread">', $txt['alerts_no_unread'], '</div>';
+		template_alerts_all_read();
 	}
 	else
 	{
@@ -126,7 +124,28 @@ function template_alerts_popup()
 	}
 
 	echo '
-		</div>';
+		</div>
+		<script><!-- // --><![CDATA[
+		function markAlertsRead(obj) {
+			ajax_indicator(true);
+			$.get(
+				obj.href,
+				function(data) {
+					ajax_indicator(false);
+					$("#alerts_menu_top span.amt").remove();
+					$("#alerts_menu div.alerts_unread").html(data);
+				}
+			);
+			return false;
+		}
+		// ]]></script>';
+}
+
+function template_alerts_all_read()
+{
+	global $txt;
+
+	echo '<div class="no_unread">', $txt['alerts_no_unread'], '</div>';
 }
 
 // This template displays users details without any option to edit them.
@@ -370,9 +389,12 @@ function template_summary()
 					<dt>', $txt['language'], ':</dt>
 					<dd>', $context['member']['language'], '</dd>';
 
-	echo '
+	if ($context['member']['online']['is_online'])
+		echo '
 					<dt>', $txt['lastLoggedIn'], ': </dt>
-					<dd>', $context['member']['last_login'], '</dd>
+					<dd>', $context['member']['last_login'], (!empty($context['member']['is_hidden']) ? ' (' . $txt['hidden'] . ')' : ''), '</dd>';
+
+	echo '
 				</dl>';
 
 	// Are there any custom profile fields for the summary?
@@ -2957,7 +2979,7 @@ function template_profile_avatar_select()
 	{
 		echo '
 								<div id="avatar_external">
-									<div class="smalltext">', $txt['avatar_by_url'], '</div>
+									<div class="smalltext">', $txt['avatar_by_url'], '</div>', !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_download_and_resize' ? template_max_size('external') : '', '
 									<input type="text" name="userpicpersonal" size="45" value="', $context['member']['avatar']['external'], '" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'external\');" onchange="if (typeof(previewExternalAvatar) != \'undefined\') previewExternalAvatar(this.value);" class="input_text">
 								</div>';
 	}
@@ -2967,8 +2989,8 @@ function template_profile_avatar_select()
 	{
 		echo '
 								<div id="avatar_upload">
-									<input type="file" size="44" name="attachment" id="avatar_upload_box" value="" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'upload\');" class="input_file">
-									', ($context['member']['avatar']['id_attach'] > 0 ? '<br><br><img src="' . $context['member']['avatar']['href'] . (strpos($context['member']['avatar']['href'], '?') === false ? '?' : '&amp;') . 'time=' . time() . '" alt=""><input type="hidden" name="id_attach" value="' . $context['member']['avatar']['id_attach'] . '">' : ''), '
+									<input type="file" size="44" name="attachment" id="avatar_upload_box" value="" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'upload\');" class="input_file">', template_max_size('upload'), '
+									', ($context['member']['avatar']['id_attach'] > 0 ? '<br><img src="' . $context['member']['avatar']['href'] . (strpos($context['member']['avatar']['href'], '?') === false ? '?' : '&amp;') . 'time=' . time() . '" alt=""><input type="hidden" name="id_attach" value="' . $context['member']['avatar']['id_attach'] . '">' : ''), '
 								</div>';
 	}
 
@@ -3008,6 +3030,22 @@ function template_profile_avatar_select()
 							</dd>';
 }
 
+// This is just a really little helper to avoid duplicating code unnecessarily
+function template_max_size($type)
+{
+	global $modSettings, $txt;
+
+	$w = !empty($modSettings['avatar_max_width_' . $type]) ? comma_format($modSettings['avatar_max_width_' . $type]) : 0;
+	$h = !empty($modSettings['avatar_max_height_' . $type]) ? comma_format($modSettings['avatar_max_height_' . $type]) : 0;
+
+	$suffix = (!empty($w) ? 'w' : '') . (!empty($h) ? 'h' : '');
+	if (empty($suffix))
+		return;
+
+	echo '
+									<div class="smalltext">', sprintf($txt['avatar_max_size_' . $suffix], $w, $h), '</div>';
+}
+
 // Callback for modifying karam.
 function template_profile_karma_modify()
 {

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

@@ -96,7 +96,7 @@ function template_unread()
 	{
 		echo '
 			<div class="pagesection">
-				', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#bot" class="topbottom floatleft">' . $txt['go_down'] . '</a>' : '', '
+				', $context['menu_separator'], '<a href="#bot" class="topbottom floatleft">', $txt['go_down'], '</a>
 				<div class="pagelinks floatleft">', $context['page_index'], '</div>
 				', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', '
 			</div>';
@@ -213,7 +213,7 @@ function template_unread()
 			</div>
 			<div class="pagesection">
 				', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', '
-				', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#recent" class="topbottom floatleft">' . $txt['go_up'] . '</a>' : '', '
+				', $context['menu_separator'], '<a href="#recent" class="topbottom floatleft">', $txt['go_up'], '</a>
 				<div class="pagelinks">', $context['page_index'], '</div>
 			</div>';
 	}
@@ -254,7 +254,7 @@ function template_replies()
 	{
 		echo '
 			<div class="pagesection">
-				', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#bot" class="topbottom floatleft">' . $txt['go_down'] . '</a>' : '', '
+				', $context['menu_separator'], '<a href="#bot" class="topbottom floatleft">', $txt['go_down'], '</a>
 				<div class="pagelinks floatleft">', $context['page_index'], '</div>
 				', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', '
 			</div>';
@@ -367,7 +367,7 @@ function template_replies()
 			</div>
 			<div class="pagesection">
 				', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', '
-				', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#recent" class="topbottom floatleft">' . $txt['go_up'] . '</a>' : '', '
+				', $context['menu_separator'], '<a href="#recent" class="topbottom floatleft">', $txt['go_up'], '</a>
 				<div class="pagelinks">', $context['page_index'], '</div>
 			</div>';
 	}

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

@@ -435,7 +435,7 @@ function template_coppa_form()
 
 	// Show the form (As best we can)
 	echo '
-		<table border="0" width="100%" cellpadding="3" cellspacing="0" class="tborder" align="center">
+		<table style="width: 100%; padding: 3px; border: 0" class="tborder" align="center">
 			<tr>
 				<td align="left">', $context['forum_contacts'], '</td>
 			</tr><tr>

+ 0 - 76
Themes/default/SendTopic.template.php

@@ -14,19 +14,6 @@
 /*	This template contains two humble sub templates - main. Its job is pretty
 	simple: it collects the information we need to actually send the topic.
 
-	The main sub template gets shown from:
-		'?action=emailuser;sa=sendtopic;topic=##.##'
-	And should submit to:
-		'?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.' . $context['start']
-	It should send the following fields:
-		y_name: sender's name.
-		y_email: sender's email.
-		comment: any additional comment.
-		r_name: receiver's name.
-		r_email: receiver's email address.
-		send: this just needs to be set, as by the submit button.
-		sc: the session id, or $context['session_id'].
-
 	The report sub template gets shown from:
 		'?action=reporttm;topic=##.##;msg=##'
 	It should submit to:
@@ -36,69 +23,6 @@
 		sc: the session id, or $context['session_id'].
 */
 
-// This is where we get information about who they want to send the topic to, etc.
-function template_main()
-{
-	global $context, $txt, $scripturl;
-
-	echo '
-	<div id="send_topic">
-		<form action="', $scripturl, '?action=emailuser;sa=sendtopic;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '">
-			<div class="cat_bar">
-				<h3 class="catbg">
-					<span class="generic_icons mail icon"></span>', $context['page_title'], '
-				</h3>
-			</div>
-			<div class="windowbg2">
-				<div class="content">
-					<fieldset id="sender" class="send_topic">
-						<dl class="settings send_topic">
-							<dt>
-								<label for="y_name"><strong>', $txt['sendtopic_sender_name'], ':</strong></label>
-							</dt>
-							<dd>
-								<input type="text" id="y_name" name="y_name" size="30" maxlength="40" value="', $context['user']['name'], '" class="input_text">
-							</dd>
-							<dt>
-								<label for="y_email"><strong>', $txt['sendtopic_sender_email'], ':</strong></label>
-							</dt>
-							<dd>
-								<input type="text" id="y_email" name="y_email" size="30" maxlength="50" value="', $context['user']['email'], '" class="input_text">
-							</dd>
-							<dt>
-								<label for="comment"><strong>', $txt['sendtopic_comment'], ':</strong></label>
-							</dt>
-							<dd>
-								<input type="text" id="comment" name="comment" size="30" maxlength="100" class="input_text">
-							</dd>
-						</dl>
-					</fieldset>
-					<fieldset id="recipient" class="send_topic">
-						<dl class="settings send_topic">
-							<dt>
-								<label for="r_name"><strong>', $txt['sendtopic_receiver_name'], ':</strong></label>
-							</dt>
-							<dd>
-								<input type="text" id="r_name" name="r_name" size="30" maxlength="40" class="input_text">
-							</dd>
-							<dt>
-								<label for="r_email"><strong>', $txt['sendtopic_receiver_email'], ':</strong></label>
-							</dt>
-							<dd>
-								<input type="text" id="r_email" name="r_email" size="30" maxlength="50" class="input_text">
-							</dd>
-						</dl>
-					</fieldset>
-					<div class="flow_auto">
-						<input type="submit" name="send" value="', $txt['sendtopic_send'], '" class="button_submit">
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
-					</div>
-				</div>
-			</div>
-		</form>
-	</div>';
-}
-
 // Send an email to a user!
 function template_custom_email()
 {

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

@@ -80,7 +80,7 @@ function template_main()
 
 		echo '
 							</td>
-							<td nowrap="nowrap">', $member['time'], '</td>
+							<td style="white-space: nowrap">', $member['time'], '</td>
 							<td>', $member['action'], '</td>
 						</tr>';
 

+ 0 - 49
Themes/default/Xml.template.php

@@ -397,53 +397,4 @@ function template_generic_xml_recursive($xml_data, $parent_ident, $child_ident,
 	echo "\n", str_repeat("\t", $level), '</', $parent_ident, '>';
 }
 
-function template_webslice_header_above()
-{
-	global $settings;
-
-	echo '
-	<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/wireless.css" type="text/css" />';
-}
-
-function template_webslice_header_below()
-{
-}
-
-// This shows a webslice of the recent posts.
-function template_webslice_recent_posts()
-{
-	global $context, $scripturl, $txt;
-
-	echo '
-	<div style="width: 100%; height: 100%; border: 1px solid black; padding: 0; margin: 0 0 0 0; font: 100.01%/100% Verdana, Helvetica, sans-serif;">
-		<div style="background-color: #080436; color: #ffffff; padding: 4px;">
-			', cleanXml($txt['recent_posts']), '
-		</div>';
-
-	$alternate = 0;
-	foreach ($context['recent_posts_data'] as $item)
-	{
-		echo '
-		<div style="background-color: ', $alternate ? '#ECEDF3' : '#F6F6F6', '; font-size: 90%; padding: 2px;">
-			<strong><a href="', $item['link'], '">', cleanXml(sprintf($txt['post_by_member'], $item['subject'], !empty($item['poster']['link']) ? '<a href="' . $item['poster']['link'] . '">' . $item['poster']['name'] . '</a>' : $item['poster']['name'])), '
-		</div>';
-		$alternate = !$alternate;
-	}
-
-	echo '
-	</div>
-	<div style="width: 100%; height: 100%; border: 0; padding: 0; margin: 0 0 0 0; font: 100.01%/100% Verdana, Helvetica, sans-serif;">
-		<div style="font-size: xx-small;" class="righttext">';
-
-	if ($context['user']['is_guest'])
-		echo '
-			<a href="', $scripturl, '?action=login">', $txt['login'], '</a>';
-	else
-		echo '
-			', cleanXml($context['user']['name']), cleanXml(!empty($context['can_pm_read']) ? ', ' . (empty($context['user']['messages']) ? $txt['msg_alert_no_messages'] : (($context['user']['messages'] == 1 ? sprintf($txt['msg_alert_one_message'], $scripturl . '?action=pm') : sprintf($txt['msg_alert_many_message'], $scripturl . '?action=pm', $context['user']['messages'])) . ', ' . ($context['user']['unread_messages'] == 1 ? $txt['msg_alert_one_new'] : sprintf($txt['msg_alert_many_new'], $context['user']['unread_messages'])))) : '');
-	echo '
-		</div>
-	</div>';
-}
-
 ?>

+ 5 - 0
Themes/default/css/admin.css

@@ -676,18 +676,23 @@ pre.file_content {
 }
 .perm_read {
 	background-color: #d1f7bf;
+	width: 8%;
 }
 .perm_write {
 	background-color: #ffbbbb;
+	width: 8%;
 }
 .perm_execute {
 	background-color: #fdd7af;
+	width: 8%;
 }
 .perm_custom {
 	background-color: #c2c6c0;
+	width: 8%;
 }
 .perm_nochange {
 	background-color: #eee;
+	width: 8%;
 }
 
 .select_spot {

+ 6 - 0
Themes/default/css/index.css

@@ -3101,6 +3101,12 @@ tr.windowbg td, tr.windowbg2 td, tr.highlight2 td {
 .generic_icons.split_sel {
 	background-position: -112px -64px;
 }
+.generic_icons.watch {
+	background-position: 0px -80px;
+}
+.generic_icons.filter {
+	background-position: -16px -80px;
+}
 
 /* Styles for (fatal) errors.
 ------------------------------------------------- */

BIN
Themes/default/fonts/AnonymousPro_end.gdf


BIN
Themes/default/fonts/ConsolaMono_end.gdf


BIN
Themes/default/fonts/Pfennig_end.gdf


BIN
Themes/default/images/filter.png


BIN
Themes/default/images/generic_icons.png


+ 4 - 1
Themes/default/index.template.php

@@ -330,7 +330,7 @@ function template_body_above()
 
 function template_body_below()
 {
-	global $context, $txt;
+	global $context, $txt, $scripturl;
 
 	echo '
 			</div>
@@ -346,6 +346,9 @@ function template_body_below()
 	// There is now a global "Go to top" link at the right.
 		echo '
 			<a href="#top_section" id="bot" class="go_up">', $txt['go_up'], '</a>
+			<ul class="floatright">
+				<li><a href="', $scripturl, '?action=help">', $txt['help'], '</a> | <a href="', $scripturl, '?action=help;sa=rules">', $txt['terms_and_rules'], '</a></li>
+			</ul>
 			<ul class="reset">
 				<li class="copyright">', theme_copyright(), '</li>
 			</ul>';

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

@@ -4,7 +4,6 @@
 $txt['topic_na'] = '(private topic)';
 $txt['board_na'] = '(private board)';
 
-$txt['unread_alerts'] = 'Unread';
 $txt['all_alerts'] = 'All alerts';
 $txt['mark_alerts_read'] = 'Mark read';
 $txt['alert_settings'] = 'Settings';
@@ -16,5 +15,9 @@ $txt['alert_msg_report_reply'] = '{member_link} replied to <a href="{scripturl}{
 $txt['alert_member_register_standard'] = '{member_link} just signed up';
 $txt['alert_member_register_approval'] = '{member_link} just signed up (account requires approval)';
 $txt['alert_member_register_activation'] = '{member_link} just signed up (account requires activation)';
-$txt['alert_member_group_request'] = '{member_link} has requested to join {group_name}';
+$txt['alert_member_group_request'] = '{member_link} has <a href="{scripturl}?action=moderate;area=groups;sa=requests">requested</a> to join {group_name}';
+
+$txt['alert_event_new_guest'] = 'A new event, <a href="{scripturl}?action=calendar;event={event_id}">{event_title}</a>, was added to the calendar.';
+$txt['alert_event_new'] = '{member_link} added a new event, <a href="{scripturl}?action=calendar;event={event_id}">{event_title}</a> to the calendar.';
+$txt['alert_event_new_topic'] = '{member_link} added a new event, {topic_msg}, to the calendar.'; 
 ?>

+ 1 - 41
Themes/default/languages/EmailTemplates.english.php

@@ -407,46 +407,6 @@ Please log in to the forum to review these items.
 
 {REGARDS}';
 
-/**
-	@additional_params: send_topic
-		TOPICSUBJECT: The subject of the topic being sent.
-		SENDERNAME: The name of the member sending the topic.
-		RECPNAME: The name of the person receiving the email.
-		TOPICLINK: A link to the topic being sent.
-	@description:
-*/
-$txt['send_topic_subject'] = 'Topic: {TOPICSUBJECT} (From: {SENDERNAME})';
-$txt['send_topic_body'] = 'Dear {RECPNAME},
-I want you to check out "{TOPICSUBJECT}" on {FORUMNAME}.  To view it, please click this link:
-
-{TOPICLINK}
-
-Thanks,
-
-{SENDERNAME}';
-
-/**
-	@additional_params: send_topic_comment
-		TOPICSUBJECT: The subject of the topic being sent.
-		SENDERNAME: The name of the member sending the topic.
-		RECPNAME: The name of the person receiving the email.
-		TOPICLINK: A link to the topic being sent.
-		COMMENT: A comment left by the sender.
-	@description:
-*/
-$txt['send_topic_comment_subject'] = 'Topic: {TOPICSUBJECT} (From: {SENDERNAME})';
-$txt['send_topic_comment_body'] = 'Dear {RECPNAME},
-I want you to check out "{TOPICSUBJECT}" on {FORUMNAME}.  To view it, please click this link:
-
-{TOPICLINK}
-
-A comment has also been added regarding this topic:
-{COMMENT}
-
-Thanks,
-
-{SENDERNAME}';
-
 /**
 	@additional_params: send_email
 		EMAILSUBJECT: The subject the user wants to email.
@@ -639,7 +599,7 @@ You may update your profile by visiting this page after you login:
 	@description:
 */
 $txt['register_pending_subject'] = 'Welcome to {FORUMNAME}';
-$txt['register_pending_body'] = 'Hello {REALNAME}, our registration request at {FORUMNAME} has been received, {REALNAME}.
+$txt['register_pending_body'] = 'Hello {REALNAME}, your registration request at {FORUMNAME} has been received.
 
 The username you registered with was {USERNAME}. If you forget your password, you can change it at {FORGOTPASSWORDLINK}.
 

+ 0 - 3
Themes/default/languages/Errors.english.php

@@ -23,7 +23,6 @@ $txt['username_reserved'] = 'The username you tried to use contains the reserved
 $txt['numbers_one_to_nine'] = 'This field only accepts numbers from 0-9';
 $txt['not_a_user'] = 'The user whose profile you are trying to view does not exist.';
 $txt['not_a_topic'] = 'This topic doesn\'t exist on this board.';
-$txt['not_approved_topic'] = 'This topic has not been approved yet.';
 $txt['email_in_use'] = 'That email address (%1$s) is being used by a registered member already. If you feel this is a mistake, go to the login page and use the password reminder with that address.';
 $txt['attachments_no_write'] = 'The attachments directory is not writable';
 
@@ -127,7 +126,6 @@ $txt['cannot_report_any'] = 'You are not allowed to report posts in this board.'
 $txt['cannot_search_posts'] = 'You are not allowed to search for posts in this forum.';
 $txt['cannot_send_mail'] = 'You don\'t have the privilege of sending out emails to everyone.';
 $txt['cannot_issue_warning'] = 'Sorry, you do not have permission to issue warnings to members.';
-$txt['cannot_send_topic'] = 'Sorry, but the administrator has disallowed sending topics on this board.';
 $txt['cannot_send_email_to_members'] = 'Sorry, but the administrator has disallowed sending emails on this board.';
 $txt['cannot_split_any'] = 'Splitting just any topic is not allowed in this board.';
 $txt['cannot_view_attachments'] = 'It seems that you are not allowed to download or view attachments on this board.';
@@ -213,7 +211,6 @@ $txt['register_WaitTime_broken'] = 'You already registered just %1$d seconds ago
 $txt['login_WaitTime_broken'] = 'You will have to wait about %1$d seconds to login again, sorry.';
 $txt['pm_WaitTime_broken'] = 'The last personal message from your IP was less than %1$d seconds ago. Please try again later.';
 $txt['reporttm_WaitTime_broken'] = 'The last topic report from your IP was less than %1$d seconds ago. Please try again later.';
-$txt['sendtopic_WaitTime_broken'] = 'The last topic sent from your IP was less than %1$d seconds ago. Please try again later.';
 $txt['sendmail_WaitTime_broken'] = 'The last email sent from your IP was less than %1$d seconds ago. Please try again later.';
 $txt['search_WaitTime_broken'] = 'Your last search was less than %1$d seconds ago. Please try again later.';
 $txt['remind_WaitTime_broken'] = 'Your last reminder was less than %1$d seconds ago. Please try again later.';

+ 8 - 26
Themes/default/languages/Help.english.php

@@ -174,29 +174,14 @@ $helptxt['userlog'] = '<strong>Profile Edits Log</strong><br>
 $helptxt['warning_enable'] = '<strong>User Warning System</strong><br>
 	This feature enables members of the admin and moderation team to issue warnings to members - and to use a members warning level to determine the
 	actions available to them on the forum. Upon enabling this feature a permission will be available within the permissions section to define
-	which groups may assign warnings to members. Warning levels can be adjusted from a members profile. The following additional options are available:
-	<ul class="normallist">
-		<li>
-			<strong>Warning Level for Member Watch</strong><br>
-			This setting defines the percentage warning level a member must reach to automatically assign a &quot;watch&quot; to the member.
-			Any member who is being &quot;watched&quot; will appear in the relevant area of the moderation center.
-		</li>
-		<li>
-			<strong>Warning Level for Post Moderation</strong><br>
-			Any member passing the value of this setting will find all their posts require moderator approval before they appear to the forum
-			community. This will override any local board permissions which may exist related to post moderation.
-		</li>
-		<li>
-			<strong>Warning Level for Member Muting</strong><br>
-			If this warning level is passed by a member they will find themselves under a post ban. The member will lose all posting rights.
-		</li>
-		<li>
-			<strong>Maximum Member Warning Point per Day</strong><br>
-			This setting limits the amount of points a moderator may add/remove to any particular member in a twenty four hour period. This will
+	which groups may assign warnings to members. Warning levels can be adjusted from a members profile.';
+$helptxt['warning_watch'] = 'This setting defines the percentage warning level a member must reach to automatically assign a &quot;watch&quot; to the member. Any member who is being &quot;watched&quot; will appear in the relevant area of the moderation center.';
+$helptxt['warning_moderate'] = 'Any member passing the value of this setting will find all their posts require moderator approval before they appear to the forum community. This will override any local board permissions which may exist related to post moderation.';
+$helptxt['warning_mute'] = 'If this warning level is passed by a member they will find themselves under a post ban. The member will lose all posting rights.';
+$helptxt['user_limit'] = 'This setting limits the amount of points a moderator may add/remove to any particular member in a twenty four hour period. This will
 			can be used to limit what a moderator can do in a small period of time. This setting can be disabled by setting to a value of zero. Note that
-			any member with administrator permissions are not affected by this value.
-		</li>
-	</ul>';
+			any member with administrator permissions are not affected by this value.';
+
 $helptxt['error_log'] = '<strong>Error Log</strong><br>
 	The error log tracks logs every serious error encountered by users using your forum. It lists all of these errors by date which can be sorted
 	by clicking the black arrow next to each date. Additionally you can filter the errors by clicking the picture next to each error statistic. This
@@ -222,7 +207,6 @@ $helptxt['cal_week_links'] = 'If this setting is checked, links will be added al
 $helptxt['cal_prev_next_links'] = 'If this setting is checked, previous month and next month links will be added to the top of each month for easy navigation.';
 $helptxt['cal_short_months'] = 'If this setting is checked, month names within the calendar will be shortened.<br><br><strong>Enabled:</strong> ' . $txt['months_short'][1] . ' 1<br><strong>Disabled:</strong> ' . $txt['months_titles'][1] . ' 1';
 $helptxt['cal_short_days'] = 'If this setting is checked, day names within the calendar will be shortened.<br><br><strong>Enabled:</strong> ' . $txt['days_short'][1] . '<br><strong>Disbaled:</strong> ' . $txt['days'][1];
-$helptxt['cal_week_numbers'] = 'If this setting is checked, the first day of every week will have the week number next to that day.<br><br><strong>Enabled:</strong> March 3 - Week 10</strong><br><strong>Disabled:</strong> March 3';
 
 $helptxt['serversettings'] = '<strong>Server Settings</strong><br>
 	Here you can perform the core configuration for your forum. This section includes the database and url settings, as well as other
@@ -255,8 +239,6 @@ $helptxt['trackStats'] = 'Stats:<br>This will allow users to see the latest post
 		Page views:<br>Adds another column to the stats page with the number of pageviews on your forum.';
 $helptxt['titlesEnable'] = 'Switching Custom Titles on will allow members with the relevant permission to create a special title for themselves.
 		This will be shown underneath the name.<br><em>For example:</em><br>Jeff<br>Cool Guy';
-$helptxt['topbottomEnable'] = 'This will add go up and go down buttons, so that member can go to the top and bottom of a page
-		without scrolling.';
 $helptxt['onlineEnable'] = 'This will show an image to indicate whether the member is online or offline';
 $helptxt['todayMod'] = 'This will show &quot;Today&quot; or &quot;Yesterday&quot; instead of the date.<br><br>
 		<strong>Examples:</strong><br><br>
@@ -313,7 +295,7 @@ $helptxt['attachmentShowImages'] = 'If the uploaded file is a picture, it will b
 $helptxt['attachmentThumbnails'] = 'If the above option is selected, this will save a separate (smaller) attachment for the thumbnail to decrease bandwidth.';
 $helptxt['attachmentThumbWidth'] = 'Only used with the &quot;Resize images when showing under posts&quot; option, the maximum width to resize attachments down from.  They will be resized proportionally.';
 $helptxt['attachmentThumbHeight'] = 'Only used with the &quot;Resize images when showing under posts&quot; option, the maximum height to resize attachments down from.  They will be resized proportionally.';
-$helptxt['attachmentDirFileLimit'] = 'Max number of files per directory help text';
+$helptxt['attachmentDirFileLimit'] = 'Max number of files per directory';
 $helptxt['attachmentEnable'] = 'This option enables you to configure how attachments can be made.<br><br>
 	<ul class="normallist">
 		<li>

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

@@ -54,7 +54,6 @@ $txt['setting_cal_prev_next_links'] = 'Show <em>Previous / Next</em> Month Links
 // The name of this setting is kind of misleading...we can't shorten actual months unfortunately!
 $txt['setting_cal_short_months'] = 'Short Month Titles';
 $txt['setting_cal_short_days'] = 'Short Day Titles';
-$txt['setting_cal_week_numbers'] = 'Show Week Numbers';
 
 // Adding/Editing/Viewing Holidays
 $txt['manage_holidays_desc'] = 'From here you can add and remove holidays from your forum calendar.';

+ 5 - 0
Themes/default/languages/ManagePaid.english.php

@@ -185,6 +185,11 @@ $txt['paid_admin_add'] = 'Add This Subscription';
 
 $txt['paid_not_set_currency'] = 'You have not setup your currency yet. Please do so from the <a href="%1$s">Settings</a> section before continuing.';
 $txt['paid_no_cost_value'] = 'You must enter a cost and subscription length.';
+$txt['paid_invalid_duration'] = 'You must enter a valid duration for this subscription.';
+$txt['paid_invalid_duration_D'] = 'If putting in a subscription length measured in days, you can only use 1 to 90 days. If you want a subscription that long, you should use weeks, months or years.';
+$txt['paid_invalid_duration_W'] = 'If putting in a subscription length measured in weeks, you can only use 1 to 52 weeks. If you want a subscription that long, you should use months or years';
+$txt['paid_invalid_duration_M'] = 'If putting in a subscription length measured in months, you can only use 1 to 24 months. If you want a subscription that long, you should use years';
+$txt['paid_invalid_duration_Y'] = 'If putting in a subscription length measured in years, you can only use 1 to 5 years.';
 $txt['paid_all_freq_blank'] = 'You must enter a cost for at least one of the four durations.';
 
 // Some error strings.

+ 1 - 3
Themes/default/languages/ManagePermissions.english.php

@@ -194,8 +194,6 @@ $txt['permissionname_merge_any'] = 'Merge any topic';
 $txt['permissionhelp_merge_any'] = 'Merge two or more topic into one. The order of messages within the merged topic will be based on the time the messages were created. A user can only merge topics on those boards a user is allowed to merge. In order to merge multiple topics at once, a user has to enable quickmoderation in their profile settings.';
 $txt['permissionname_split_any'] = 'Split any topic';
 $txt['permissionhelp_split_any'] = 'Split a topic into two separate topics.';
-$txt['permissionname_send_topic'] = 'Send topics to friends';
-$txt['permissionhelp_send_topic'] = 'This permission allows a user to mail a topic to a friend, by entering their email address and allows adding a message.';
 $txt['permissionname_make_sticky'] = 'Make topics sticky';
 $txt['permissionhelp_make_sticky'] = 'Sticky topics are topics that always remain on top of a board. They can be useful for announcements or other important messages.';
 $txt['permissionname_move'] = 'Move topic';
@@ -298,7 +296,7 @@ $txt['permission_settings_enable_postgroups'] = 'Enable permissions for post cou
 // Escape any single quotes in here twice.. 'it\'s' -> 'it\\\'s'.
 $txt['permission_disable_postgroups_warning'] = 'Disabling this setting will remove permissions currently set to post count based groups.';
 
-$txt['permissions_post_moderation_desc'] = 'Post Moderation is the situation where posts are &quot;moderated&quot;, where the author and the moderation team can view posts and decide whether to permit them to be visible to other users or not. From this page you can easily change which groups have their posts moderated for a particular permissions profile.';
+$txt['permissions_post_moderation_desc'] = 'From this page, you can configure the ability to hold users\' posts before being visible to regular forum members, including which group or groups of users can approve them. Users whose posts are held for approval will still be able to see their posts, as well as replies from approvers, e.g. moderator feedback about making a post appropriate.';
 $txt['permissions_post_moderation_enable'] = 'Enable Post Moderation';
 $txt['permissions_post_moderation_deny_note'] = 'Note that while you have advanced permissions enabled you cannot apply the &quot;deny&quot; permission from this page. Please edit the permissions directly if you wish to apply a deny permission.';
 $txt['permissions_post_moderation_select'] = 'Select Profile';

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

@@ -81,7 +81,6 @@ $txt['todayMod'] = 'Enable shorthand date display';
 $txt['today_disabled'] = 'Disabled';
 $txt['today_only'] = 'Only Today';
 $txt['yesterday_today'] = 'Today &amp; Yesterday';
-$txt['topbottomEnable'] = 'Enable Go Up/Go Down buttons';
 $txt['onlineEnable'] = 'Show online/offline in posts and PMs';
 $txt['enableVBStyleLogin'] = 'Show a quick login on every page';
 $txt['defaultMaxMembers'] = 'Members per page in member list';

+ 10 - 2
Themes/default/languages/Modlog.english.php

@@ -33,7 +33,7 @@ $txt['modlog_ac_clearlog_moderate'] = 'Cleared the moderation log';
 $txt['modlog_ac_clearlog_admin'] = 'Cleared the administration log';
 $txt['modlog_enter_comment'] = 'Enter Moderation Comment';
 $txt['modlog_moderation_log'] = 'Moderation Log';
-$txt['modlog_moderation_log_desc'] = 'Below is a list of all the moderation actions that have been carried out by moderators of the forum.<br><strong>Please note:</strong> Entries cannot be removed from this log until they are at least twenty-four hours old.';
+$txt['modlog_moderation_log_desc'] = 'Below is a list of all the moderation actions that have been carried out by moderators of the forum.';
 $txt['modlog_no_entries_found'] = 'There are currently no moderation log entries.';
 $txt['modlog_remove'] = 'Delete Selected';
 $txt['modlog_removeall'] = 'Clear Log';
@@ -57,7 +57,7 @@ $txt['modlog_ac_ban_trigger_ip_range'] = ' <em>IP:</em> {ip_range}';
 $txt['modlog_ac_ban_trigger_hostname'] = ' <em>Hostname:</em> {hostname}';
 
 $txt['modlog_admin_log'] = 'Administration Log';
-$txt['modlog_admin_log_desc'] = 'Below is a list of administration actions which have been logged on your forum.<br><strong>Please note:</strong> Entries cannot be removed from this log until they are at least twenty-four hours old.';
+$txt['modlog_admin_log_desc'] = 'Below is a list of administration actions which have been logged on your forum.';
 $txt['modlog_admin_log_no_entries_found'] = 'There are currently no administration log entries.';
 
 // Admin type strings.
@@ -100,4 +100,12 @@ $txt['modlog_ac_close_report'] = 'Closed {report} on &quot;{message}&quot;';
 $txt['modlog_ac_ignore_report'] = 'Disregarded {report} on &quot;{message}&quot;';
 $txt['modlog_ac_open_report'] = 'Reopened {report} on &quot;{message}&quot;';
 $txt['modlog_ac_unignore_report'] = 'Undone disregard of {report} on &quot;{message}&quot;';
+
+// Poll stuff
+$txt['modlog_add_poll'] = 'Added a poll to &quot;{topic}&quot;';
+$txt['modlog_edit_poll'] = 'Edited the poll in &quot;{topic}&quot;';
+$txt['modlog_lock_poll'] = 'Locked voting in the poll in &quot;{topic}&quot;';
+$txt['modlog_remove_poll'] = 'Removed the poll from &quot;{topic}&quot;';
+$txt['modlog_reset_poll'] = 'Reset votes in the poll in &quot;{topic}&quot;';
+$txt['modlog_unlock_poll'] = 'Unlocked voting in the poll in &quot;{topic}&quot;';
 ?>

+ 2 - 0
Themes/default/languages/Post.english.php

@@ -66,7 +66,9 @@ $txt['board_moderate'] = 'on a board you moderate';
 $txt['report_comment'] = 'The reporter has made the following comment';
 
 $txt['attach_restrict_attachmentPostLimit'] = 'maximum total size %1$d KB';
+$txt['attach_restrict_attachmentPostLimit_MB'] = 'maximum total size %1$d MB';
 $txt['attach_restrict_attachmentSizeLimit'] = 'maximum individual size %1$d KB';
+$txt['attach_restrict_attachmentSizeLimit_MB'] = 'maximum individual size %1$d MB';
 $txt['attach_restrict_attachmentNumPerPostLimit'] = '%1$d per post';
 $txt['attach_restrictions'] = 'Restrictions:';
 

+ 3 - 0
Themes/default/languages/Profile.english.php

@@ -257,6 +257,9 @@ $txt['own_profile_confirm'] = 'Are you sure you want to delete your account?';
 $txt['view_ips_by'] = 'View IPs used by';
 
 $txt['avatar_will_upload'] = 'Upload an avatar';
+$txt['avatar_max_size_wh'] = 'Max size: %1$spx by %2$spx';
+$txt['avatar_max_size_w'] = 'Max size: %1$spx wide';
+$txt['avatar_max_size_h'] = 'Max size: %2$spx high';
 
 $txt['activate_changed_email_title'] = 'Email Address Changed';
 $txt['activate_changed_email_desc'] = 'You\'ve changed your email address. In order to validate this address you will receive an email. Click the link in that email to reactivate your account.';

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

@@ -62,7 +62,6 @@ $txt['board_perms_name_post_autosave_draft'] = 'Automatically save drafts of pos
 $txt['board_perms_name_remove_any'] = 'Remove any topic';
 $txt['board_perms_name_remove_own'] = 'Remove own topics';
 $txt['board_perms_name_report_any'] = 'Report any post';
-$txt['board_perms_name_send_topic'] = 'Send topics to friends';
 $txt['board_perms_name_split_any'] = 'Split any topics';
 $txt['board_perms_name_view_attachments'] = 'View attachments';
 

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

@@ -80,7 +80,6 @@ $txt['whotopic_printpage'] = 'Printing the topic &quot;<a href="' . $scripturl .
 $txt['whotopic_quickmod2'] = 'Moderating the topic <a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>.';
 $txt['whotopic_removepoll'] = 'Removing the poll in &quot;<a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>&quot;.';
 $txt['whotopic_removetopic2'] = 'Removing the topic <a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>.';
-$txt['whotopic_sendtopic'] = 'Sending the topic &quot;<a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>&quot; to a friend.';
 $txt['whotopic_splittopics'] = 'Splitting the topic &quot;<a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>&quot; into two topics.';
 $txt['whotopic_sticky'] = 'Setting the topic &quot;<a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>&quot; as sticky.';
 $txt['whotopic_vote'] = 'Voting in <a href="' . $scripturl . '?topic=%1$d.0">%2$s</a>.';

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

@@ -122,6 +122,12 @@ $txt['admin_login'] = 'Administration Login';
 // Use numeric entities in the below string.
 $txt['topic'] = 'Topic';
 $txt['help'] = 'Help';
+$txt['terms_and_rules'] = 'Terms and Rules';
+$txt['watch_board'] = 'Watch this Board';
+$txt['unwatch_board'] = 'Stop Watching Board';
+$txt['watch_topic'] = 'Watch this Topic';
+$txt['unwatch_topic'] = 'Stop Watching Topic';
+$txt['watching_this_topic'] = 'You are watching this topic, and will receive notifications about it.';
 $txt['notify'] = 'Notify';
 $txt['unnotify'] = 'Unnotify';
 $txt['notify_request'] = 'Do you want a notification email if someone replies to this topic?';
@@ -363,12 +369,10 @@ $txt['send_topic'] = 'Send this topic';
 $txt['watch'] = 'Watch';
 $txt['unwatch'] = 'Stop watching';
 
-$txt['sendtopic_title'] = 'Send the topic &quot;%1$s&quot; to a friend.';
 $txt['sendtopic_sender_name'] = 'Your name';
 $txt['sendtopic_sender_email'] = 'Your email address';
 $txt['sendtopic_receiver_name'] = 'Recipient\'s name';
 $txt['sendtopic_receiver_email'] = 'Recipient\'s email address';
-$txt['sendtopic_comment'] = 'Add a comment';
 
 $txt['allow_user_email'] = 'Allow users to email me';
 
@@ -385,6 +389,7 @@ $txt['database_error_versions'] = '<strong>Note:</strong> It appears that your d
 $txt['template_parse_error'] = 'Template Parse Error!';
 $txt['template_parse_error_message'] = 'It seems something has gone sour on the forum with the template system.  This problem should only be temporary, so please come back later and try again.  If you continue to see this message, please contact the administrator.<br><br>You can also try <a href="javascript:location.reload();">refreshing this page</a>.';
 $txt['template_parse_error_details'] = 'There was a problem loading the <tt><strong>%1$s</strong></tt> template or language file.  Please check the syntax and try again - remember, single quotes (<tt>\'</tt>) often have to be escaped with a slash (<tt>\\</tt>).  To see more specific error information from PHP, try <a href="' . $boardurl . '%1$s">accessing the file directly</a>.<br><br>You may want to try to <a href="javascript:location.reload();">refresh this page</a> or <a href="' . $scripturl . '?theme=1">use the default theme</a>.';
+$txt['template_parse_errmsg'] = 'Unfortunately more information is not available at this time as to exactly what is wrong.';
 
 $txt['today'] = '<strong>Today</strong> at ';
 $txt['yesterday'] = '<strong>Yesterday</strong> at ';
@@ -485,8 +490,7 @@ $txt['status'] = 'Status';
 $txt['go_up'] = 'Go Up';
 $txt['go_down'] = 'Go Down';
 
-$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" class="new_win">%1$s</a> |
- <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; %2$s</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';
+$forum_copyright = '<a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">%1$s &copy; %2$s</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';
 
 $txt['birthdays'] = 'Birthdays:';
 $txt['events'] = 'Events:';
@@ -512,6 +516,8 @@ $txt['calendar_upcoming'] = 'Upcoming Calendar';
 $txt['calendar_today'] = 'Today\'s Calendar';
 $txt['calendar_week'] = 'Week';
 $txt['calendar_week_title'] = 'Week %1$d of %2$d';
+// %1$s is the month, %2$s is the day, %3$s is the year. Change to suit your language.
+$txt['calendar_week_beginning'] = 'Week beginning %1$s %2$s, %3$s';
 $txt['calendar_numb_days'] = 'Number of Days:';
 $txt['calendar_how_edit'] = 'how do you edit these events?';
 $txt['calendar_link_event'] = 'Link Event To Post:';
@@ -779,7 +785,6 @@ $txt['openid'] = 'OpenID';
 
 $txt['downloads'] = 'Downloads';
 $txt['filesize'] = 'Filesize';
-$txt['subscribe_webslice'] = 'Subscribe to Webslice';
 
 // Restore topic
 $txt['restore_topic'] = 'Restore Topic';

+ 11 - 1
cron.php

@@ -21,7 +21,7 @@
  */
 
 define('SMF', 'BACKGROUND');
-define('FROM_CLI', !isset($_SERVER['REQUEST_METHOD']));
+define('FROM_CLI', empty($_SERVER['REQUEST_METHOD']));
 define('WIRELESS', false);
 
 // This one setting is worth bearing in mind. If you are running this from proper cron, make sure you
@@ -65,6 +65,15 @@ if (substr($sourcedir, 0, 1) == '.' && substr($sourcedir, 1, 1) != '.')
 if (file_exists($cachedir . '/cron.lock'))
 	obExit_cron();
 
+// Before we go any further, if this is not a CLI request, we need to do some checking.
+if (!FROM_CLI)
+{
+	// We will clean up $_GET shortly. But we want to this ASAP.
+	$ts = isset($_GET['ts']) ? (int) $_GET['ts'] : 0;
+	if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20)
+		obExit_cron();
+}
+
 // Load the most important includes. In general, a background should be loading its own dependencies.
 require_once($sourcedir . '/Errors.php');
 require_once($sourcedir . '/Load.php');
@@ -107,6 +116,7 @@ while ($task_details = fetch_task())
 		);
 	}
 }
+obExit_cron();
 exit;
 
 // The heart of this cron handler...

+ 0 - 1
index.php

@@ -334,7 +334,6 @@ function smf_main()
 		'restoretopic' => array('RemoveTopic.php', 'RestoreTopic'),
 		'search' => array('Search.php', 'PlushSearch1'),
 		'search2' => array('Search.php', 'PlushSearch2'),
-		'sendtopic' => array('SendTopic.php', 'EmailUser'),
 		'smstats' => array('Stats.php', 'SMStats'),
 		'suggest' => array('Subs-Editor.php', 'AutoSuggestHandler'),
 		'spellcheck' => array('Subs-Post.php', 'SpellCheck'),

+ 6 - 1
other/install.php

@@ -2020,6 +2020,11 @@ function updateSettingsFile($vars)
 	fwrite($fp, $settingsArray[$i] . '?' . '>');
 	fclose($fp);
 
+	// Even though on normal installations the filemtime should prevent this being used by the installer incorrectly
+	// it seems that there are times it might not. So let's MAKE it dump the cache.
+	if (function_exists('opcache_invalidate'))
+		opcache_invalidate(dirname(__FILE__) . '/Settings.php', true);
+
 	return true;
 }
 
@@ -2309,7 +2314,7 @@ function template_chmod_files()
 
 	echo '
 		<form action="', $incontext['form_url'], '" method="post">
-			<table width="520" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: 1em 0;">
+			<table align="center" style="width: 520px; margin: 1em 0; padding: 0; border: 0">
 				<tr>
 					<td width="26%" valign="top" class="textbox"><label for="ftp_server">', $txt['ftp_server'], ':</label></td>
 					<td>

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

@@ -168,7 +168,6 @@ VALUES (-1, 1, 'poll_view'),
 	(0, 1, 'post_unapproved_attachments'),
 	(0, 1, 'delete_own'),
 	(0, 1, 'report_any'),
-	(0, 1, 'send_topic'),
 	(0, 1, 'view_attachments'),
 	(2, 1, 'moderate_board'),
 	(2, 1, 'post_new'),
@@ -189,7 +188,6 @@ VALUES (-1, 1, 'poll_view'),
 	(2, 1, 'poll_edit_any'),
 	(2, 1, 'report_any'),
 	(2, 1, 'lock_own'),
-	(2, 1, 'send_topic'),
 	(2, 1, 'delete_own'),
 	(2, 1, 'modify_own'),
 	(2, 1, 'make_sticky'),
@@ -222,7 +220,6 @@ VALUES (-1, 1, 'poll_view'),
 	(3, 1, 'poll_edit_any'),
 	(3, 1, 'report_any'),
 	(3, 1, 'lock_own'),
-	(3, 1, 'send_topic'),
 	(3, 1, 'delete_own'),
 	(3, 1, 'modify_own'),
 	(3, 1, 'make_sticky'),
@@ -254,7 +251,6 @@ VALUES (-1, 1, 'poll_view'),
 	(0, 2, 'post_unapproved_attachments'),
 	(0, 2, 'delete_own'),
 	(0, 2, 'report_any'),
-	(0, 2, 'send_topic'),
 	(0, 2, 'view_attachments'),
 	(2, 2, 'moderate_board'),
 	(2, 2, 'post_new'),
@@ -275,7 +271,6 @@ VALUES (-1, 1, 'poll_view'),
 	(2, 2, 'poll_edit_any'),
 	(2, 2, 'report_any'),
 	(2, 2, 'lock_own'),
-	(2, 2, 'send_topic'),
 	(2, 2, 'delete_own'),
 	(2, 2, 'modify_own'),
 	(2, 2, 'make_sticky'),
@@ -308,7 +303,6 @@ VALUES (-1, 1, 'poll_view'),
 	(3, 2, 'poll_edit_any'),
 	(3, 2, 'report_any'),
 	(3, 2, 'lock_own'),
-	(3, 2, 'send_topic'),
 	(3, 2, 'delete_own'),
 	(3, 2, 'modify_own'),
 	(3, 2, 'make_sticky'),
@@ -336,7 +330,6 @@ VALUES (-1, 1, 'poll_view'),
 	(0, 3, 'post_unapproved_attachments'),
 	(0, 3, 'delete_own'),
 	(0, 3, 'report_any'),
-	(0, 3, 'send_topic'),
 	(0, 3, 'view_attachments'),
 	(2, 3, 'moderate_board'),
 	(2, 3, 'post_new'),
@@ -357,7 +350,6 @@ VALUES (-1, 1, 'poll_view'),
 	(2, 3, 'poll_edit_any'),
 	(2, 3, 'report_any'),
 	(2, 3, 'lock_own'),
-	(2, 3, 'send_topic'),
 	(2, 3, 'delete_own'),
 	(2, 3, 'modify_own'),
 	(2, 3, 'make_sticky'),
@@ -390,7 +382,6 @@ VALUES (-1, 1, 'poll_view'),
 	(3, 3, 'poll_edit_any'),
 	(3, 3, 'report_any'),
 	(3, 3, 'lock_own'),
-	(3, 3, 'send_topic'),
 	(3, 3, 'delete_own'),
 	(3, 3, 'modify_own'),
 	(3, 3, 'make_sticky'),
@@ -408,7 +399,6 @@ VALUES (-1, 1, 'poll_view'),
 	(0, 4, 'poll_view'),
 	(0, 4, 'poll_vote'),
 	(0, 4, 'report_any'),
-	(0, 4, 'send_topic'),
 	(0, 4, 'view_attachments'),
 	(2, 4, 'moderate_board'),
 	(2, 4, 'post_new'),
@@ -429,7 +419,6 @@ VALUES (-1, 1, 'poll_view'),
 	(2, 4, 'poll_edit_any'),
 	(2, 4, 'report_any'),
 	(2, 4, 'lock_own'),
-	(2, 4, 'send_topic'),
 	(2, 4, 'delete_own'),
 	(2, 4, 'modify_own'),
 	(2, 4, 'make_sticky'),
@@ -462,7 +451,6 @@ VALUES (-1, 1, 'poll_view'),
 	(3, 4, 'poll_edit_any'),
 	(3, 4, 'report_any'),
 	(3, 4, 'lock_own'),
-	(3, 4, 'send_topic'),
 	(3, 4, 'delete_own'),
 	(3, 4, 'modify_own'),
 	(3, 4, 'make_sticky'),
@@ -1772,7 +1760,6 @@ VALUES ('smfVersion', '{$smf_version}'),
 	('cal_prev_next_links', '1'),
 	('cal_short_days', '0'),
 	('cal_short_months', '0'),
-	('cal_week_numbers', '0'),
 	('smtp_host', ''),
 	('smtp_port', '25'),
 	('smtp_username', ''),
@@ -2120,7 +2107,7 @@ CREATE TABLE {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int(10) unsigned NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read tinyint(3) unsigned NOT NULL default '0',
+  is_read int(10) unsigned NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert),
   KEY id_member (id_member),

+ 2 - 15
other/install_2-1_postgresql.sql

@@ -346,7 +346,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'post_new');
@@ -367,7 +366,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'make_sticky');
@@ -400,7 +398,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'make_sticky');
@@ -432,7 +429,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'post_new');
@@ -453,7 +449,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'make_sticky');
@@ -486,7 +481,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'make_sticky');
@@ -514,7 +508,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'post_new');
@@ -535,7 +528,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'make_sticky');
@@ -568,7 +560,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'make_sticky');
@@ -586,7 +577,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'poll_view');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'poll_vote');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'post_new');
@@ -607,7 +597,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'make_sticky');
@@ -640,7 +629,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'make_sticky');
@@ -1792,7 +1780,7 @@ CREATE TABLE {$db_prefix}messages (
   smileys_enabled smallint NOT NULL default '1',
   modified_time int NOT NULL default '0',
   modified_name varchar(255) NOT NULL,
-  modified_reason varchar(255) NOT NULL,
+  modified_reason varchar(255) NOT NULL default '',
   body text NOT NULL,
   icon varchar(16) NOT NULL default 'xx',
   approved smallint NOT NULL default '1',
@@ -2283,7 +2271,6 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_week_links', '2'
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_prev_next_links', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_short_days', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_short_months', '0');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_week_numbers', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_host', '');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_port', '25');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_username', '');
@@ -2669,7 +2656,7 @@ CREATE TABLE {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read smallint NOT NULL default '0',
+  is_read int NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert)
 );

+ 2 - 15
other/install_2-1_sqlite.sql

@@ -178,7 +178,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'post_new');
@@ -199,7 +198,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'make_sticky');
@@ -232,7 +230,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'make_sticky');
@@ -264,7 +261,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'post_new');
@@ -285,7 +281,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'make_sticky');
@@ -318,7 +313,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'make_sticky');
@@ -346,7 +340,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'post_new');
@@ -367,7 +360,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'make_sticky');
@@ -400,7 +392,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'make_sticky');
@@ -418,7 +409,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'poll_view');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'poll_vote');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'post_new');
@@ -439,7 +429,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'make_sticky');
@@ -472,7 +461,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'make_sticky');
@@ -1474,7 +1462,7 @@ CREATE TABLE {$db_prefix}messages (
   smileys_enabled smallint NOT NULL default '1',
   modified_time int NOT NULL default '0',
   modified_name varchar(255) NOT NULL,
-  modified_reason varchar(255) NOT NULL,
+  modified_reason varchar(255) NOT NULL default '',
   body text NOT NULL,
   icon varchar(16) NOT NULL default 'xx',
   approved smallint NOT NULL default '1',
@@ -1915,7 +1903,6 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_week_links', '2'
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_prev_next_links', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_short_days', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_short_months', '0');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_week_numbers', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_host', '');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_port', '25');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_username', '');
@@ -2277,7 +2264,7 @@ CREATE TABLE {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int unsigned NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read smallint unsigned NOT NULL default '0',
+  is_read int unsigned NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert)
 );

+ 2 - 15
other/install_2-1_sqlite3.sql

@@ -178,7 +178,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 1, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'post_new');
@@ -199,7 +198,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 1, 'make_sticky');
@@ -232,7 +230,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 1, 'make_sticky');
@@ -264,7 +261,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 2, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'post_new');
@@ -285,7 +281,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 2, 'make_sticky');
@@ -318,7 +313,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 2, 'make_sticky');
@@ -346,7 +340,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'post_unapproved_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 3, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'post_new');
@@ -367,7 +360,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 3, 'make_sticky');
@@ -400,7 +392,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 3, 'make_sticky');
@@ -418,7 +409,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'poll_view');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'poll_vote');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'report_any');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (0, 4, 'view_attachments');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'moderate_board');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'post_new');
@@ -439,7 +429,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (2, 4, 'make_sticky');
@@ -472,7 +461,6 @@ INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VAL
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'poll_edit_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'report_any');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'lock_own');
-INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'send_topic');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'delete_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'modify_own');
 INSERT INTO {$db_prefix}board_permissions (id_group, id_profile, permission) VALUES (3, 4, 'make_sticky');
@@ -1474,7 +1462,7 @@ CREATE TABLE {$db_prefix}messages (
   smileys_enabled smallint NOT NULL default '1',
   modified_time int NOT NULL default '0',
   modified_name varchar(255) NOT NULL,
-  modified_reason varchar(255) NOT NULL,
+  modified_reason varchar(255) NOT NULL '',
   body text NOT NULL,
   icon varchar(16) NOT NULL default 'xx',
   approved smallint NOT NULL default '1',
@@ -1915,7 +1903,6 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_week_links', '2'
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_prev_next_links', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_short_days', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_short_months', '0');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_week_numbers', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_host', '');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_port', '25');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smtp_username', '');
@@ -2278,7 +2265,7 @@ CREATE TABLE {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int unsigned NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read smallint unsigned NOT NULL default '0',
+  is_read int unsigned NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert)
 );

+ 3 - 3
other/upgrade.php

@@ -3618,8 +3618,8 @@ function template_upgrade_above()
 					</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>
-				<div id="substep_bar_div2" style="font-size: 8pt; height: 12pt; border: 1px solid black; background-color: white; width: 50%; margin: 5px auto; display: ', isset($upcontext['substep_progress']) ? '' : 'none', ';">
+				<div id="substep_bar_div" class="smalltext" style="float: left;width: 50%;margin-top: 0.6em;display: ', isset($upcontext['substep_progress']) ? '' : 'none', ';">', isset($upcontext['substep_progress_name']) ? trim(strtr($upcontext['substep_progress_name'], array('.' => ''))) : '', ':</div>
+				<div id="substep_bar_div2" style="float: left;font-size: 8pt; height: 12pt; border: 1px solid black; background-color: white; width: 33%; margin: 0.6em auto 0 6em; display: ', isset($upcontext['substep_progress']) ? '' : 'none', ';">
 					<div id="substep_text" style="color: #000; position: absolute; margin-left: -5em;">', isset($upcontext['substep_progress']) ? $upcontext['substep_progress'] : '', '%</div>
 				<div id="substep_progress" style="width: ', isset($upcontext['substep_progress']) ? $upcontext['substep_progress'] : 0, '%; height: 12pt; z-index: 1; background-color: #eebaf4;">&nbsp;</div>
 								</div>';
@@ -3629,7 +3629,7 @@ function template_upgrade_above()
 	$mins = (int) ($elapsed / 60);
 	$seconds = $elapsed - $mins * 60;
 	echo '
-								<br> <br> <br> <br>
+								<br> <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>';

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

@@ -96,7 +96,7 @@ while (!$is_done)
 	$fileHash = '';
 
 	$request = upgrade_query("
-		SELECT id_attach, id_folder, filename, file_hash
+		SELECT id_attach, id_folder, filename, file_hash, mime_type
 		FROM {$db_prefix}attachments
 		WHERE attachment_type != 1
 		LIMIT $_GET[a], 100");
@@ -166,6 +166,22 @@ while (!$is_done)
 				UPDATE {$db_prefix}attachments
 				SET file_hash = '$fileHash'
 				WHERE id_attach = $row[id_attach]");
+
+		// While we're here, do we need to update the mime_type?
+		if (empty($row['mime_type']) && file_exists($newFile))
+		{
+			$size = @getimagesize($newFile);
+			if (!empty($size['mime']))
+				$smcFunc['db_query']('', '
+					UPDATE {db_prefix}attachments
+					SET mime_type = {string:mime_type}
+					WHERE id_attach = {int:id_attach}',
+					array(
+						'id_attach' => $row['id_attach'],
+						'mime_type' => substr($size['mime'], 0, 20),
+					)
+				);
+		}
 	}
 	$smcFunc['db_free_result']($request);
 
@@ -177,6 +193,37 @@ unset($_GET['a']);
 ---}
 ---#
 
+---# Fixing invalid sizes on attachments
+---{
+$attachs = array();
+// If id_member = 0, then it's not an avatar
+// If attachment_type = 0, then it's also not a thumbnail
+// Theory says there shouldn't be *that* many of these
+$request = $smcFunc['db_query']('', '
+	SELECT id_attach, mime_type, width, height
+	FROM {db_prefix}attachments
+	WHERE id_member = 0
+		AND attachment_type = 0');
+while ($row = $smcFunc['db_fetch_assoc']($request))
+{
+	if (($row['width'] > 0 || $row['height'] > 0) && strpos($row['mime_type'], 'image') !== 0)
+		$attachs[] = $row['id_attach'];
+}
+$smcFunc['db_free_result']($request);
+
+if (!empty($attachs))
+	$smcFunc['db_query']('', '
+		UPDATE {db_prefix}attachments
+		SET width = 0,
+			height = 0
+		WHERE id_attach IN ({array_int:attachs})',
+		array(
+			'attachs' => $attachs,
+		)
+	);
+---}
+---#
+
 /******************************************************************************/
 --- Adding support for IPv6...
 /******************************************************************************/
@@ -389,7 +436,7 @@ CREATE TABLE IF NOT EXISTS {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int(10) unsigned NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read tinyint(3) unsigned NOT NULL default '0',
+  is_read int(10) unsigned NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert),
   KEY id_member (id_member),
@@ -730,7 +777,7 @@ WHERE variable = 'avatar_action_too_large'
 
 ---# Cleaning up old settings.
 DELETE FROM {$db_prefix}settings
-WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_registration', 'attachmentEncryptFilenames', 'hotTopicPosts', 'hotTopicVeryPosts', 'fixLongWords', 'admin_features');
+WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_registration', 'attachmentEncryptFilenames', 'hotTopicPosts', 'hotTopicVeryPosts', 'fixLongWords', 'admin_features', 'topbottomEnable');
 ---#
 
 ---# Cleaning up old theme settings.
@@ -830,6 +877,11 @@ DELETE FROM {$db_prefix}board_permissions
 WHERE permission = 'mark_notify' OR permission = 'mark_any_notify';
 ---#
 
+---# Removing the send-topic permission
+DELETE FROM {$db_prefix}board_permissions
+WHERE permission = 'send_topic';
+---#
+
 ---# Adding "profile_password_own"
 ---{
 $inserts = array();
@@ -1073,7 +1125,7 @@ ADD COLUMN in_inbox tinyint(3) NOT NULL default '1';
 /******************************************************************************/
 ---# Adding "modified_reason" column to messages
 ALTER TABLE {$db_prefix}messages
-ADD COLUMN modified_reason varchar(255) NOT NULL;
+ADD COLUMN modified_reason varchar(255) NOT NULL default '';
 ---#
 
 /******************************************************************************/

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

@@ -98,7 +98,7 @@ while (!$is_done)
 	$fileHash = '';
 
 	$request = upgrade_query("
-		SELECT id_attach, id_folder, filename, file_hash
+		SELECT id_attach, id_folder, filename, file_hash, mime_type
 		FROM {$db_prefix}attachments
 		WHERE attachment_type != 1
 		LIMIT $_GET[a], 100");
@@ -168,6 +168,22 @@ while (!$is_done)
 				UPDATE {$db_prefix}attachments
 				SET file_hash = '$fileHash'
 				WHERE id_attach = $row[id_attach]");
+
+		// While we're here, do we need to update the mime_type?
+		if (empty($row['mime_type']) && file_exists($newFile))
+		{
+			$size = @getimagesize($newFile);
+			if (!empty($size['mime']))
+				$smcFunc['db_query']('', '
+					UPDATE {db_prefix}attachments
+					SET mime_type = {string:mime_type}
+					WHERE id_attach = {int:id_attach}',
+					array(
+						'id_attach' => $row['id_attach'],
+						'mime_type' => substr($size['mime'], 0, 20),
+					)
+				);
+		}
 	}
 	$smcFunc['db_free_result']($request);
 
@@ -179,6 +195,37 @@ unset($_GET['a']);
 ---}
 ---#
 
+---# Fixing invalid sizes on attachments
+---{
+$attachs = array();
+// If id_member = 0, then it's not an avatar
+// If attachment_type = 0, then it's also not a thumbnail
+// Theory says there shouldn't be *that* many of these
+$request = $smcFunc['db_query']('', '
+	SELECT id_attach, mime_type, width, height
+	FROM {db_prefix}attachments
+	WHERE id_member = 0
+		AND attachment_type = 0');
+while ($row = $smcFunc['db_fetch_assoc']($request))
+{
+	if (($row['width'] > 0 || $row['height'] > 0) && strpos($row['mime_type'], 'image') !== 0)
+		$attachs[] = $row['id_attach'];
+}
+$smcFunc['db_free_result']($request);
+
+if (!empty($attachs))
+	$smcFunc['db_query']('', '
+		UPDATE {db_prefix}attachments
+		SET width = 0,
+			height = 0
+		WHERE id_attach IN ({array_int:attachs})',
+		array(
+			'attachs' => $attachs,
+		)
+	);
+---}
+---#
+
 /******************************************************************************/
 --- Adding support for IPv6...
 /******************************************************************************/
@@ -463,7 +510,7 @@ CREATE TABLE {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read smallint NOT NULL default '0',
+  is_read int NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert)
 );
@@ -809,7 +856,7 @@ WHERE variable = 'avatar_action_too_large'
 
 ---# Cleaning up old settings.
 DELETE FROM {$db_prefix}settings
-WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_registration', 'attachmentEncryptFilenames', 'hotTopicPosts', 'hotTopicVeryPosts', 'fixLongWords', 'admin_features');
+WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_registration', 'attachmentEncryptFilenames', 'hotTopicPosts', 'hotTopicVeryPosts', 'fixLongWords', 'admin_features', 'topbottomEnable');
 ---#
 
 ---# Cleaning up old theme settings.
@@ -919,6 +966,11 @@ DELETE FROM {$db_prefix}board_permissions
 WHERE permission = 'mark_notify' OR permission = 'mark_any_notify';
 ---#
 
+---# Removing the send-topic permission
+DELETE FROM {$db_prefix}board_permissions
+WHERE permission = 'send_topic';
+---#
+
 ---# Adding "profile_password_own"
 ---{
 $inserts = array();

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

@@ -96,7 +96,7 @@ while (!$is_done)
 	$fileHash = '';
 
 	$request = upgrade_query("
-		SELECT id_attach, id_folder, filename, file_hash
+		SELECT id_attach, id_folder, filename, file_hash, mime_type
 		FROM {$db_prefix}attachments
 		WHERE attachment_type != 1
 		LIMIT $_GET[a], 100");
@@ -166,6 +166,22 @@ while (!$is_done)
 				UPDATE {$db_prefix}attachments
 				SET file_hash = '$fileHash'
 				WHERE id_attach = $row[id_attach]");
+
+		// While we're here, do we need to update the mime_type?
+		if (empty($row['mime_type']) && file_exists($newFile))
+		{
+			$size = @getimagesize($newFile);
+			if (!empty($size['mime']))
+				$smcFunc['db_query']('', '
+					UPDATE {db_prefix}attachments
+					SET mime_type = {string:mime_type}
+					WHERE id_attach = {int:id_attach}',
+					array(
+						'id_attach' => $row['id_attach'],
+						'mime_type' => substr($size['mime'], 0, 20),
+					)
+				);
+		}
 	}
 	$smcFunc['db_free_result']($request);
 
@@ -177,6 +193,37 @@ unset($_GET['a']);
 ---}
 ---#
 
+---# Fixing invalid sizes on attachments
+---{
+$attachs = array();
+// If id_member = 0, then it's not an avatar
+// If attachment_type = 0, then it's also not a thumbnail
+// Theory says there shouldn't be *that* many of these
+$request = $smcFunc['db_query']('', '
+	SELECT id_attach, mime_type, width, height
+	FROM {db_prefix}attachments
+	WHERE id_member = 0
+		AND attachment_type = 0');
+while ($row = $smcFunc['db_fetch_assoc']($request))
+{
+	if (($row['width'] > 0 || $row['height'] > 0) && strpos($row['mime_type'], 'image') !== 0)
+		$attachs[] = $row['id_attach'];
+}
+$smcFunc['db_free_result']($request);
+
+if (!empty($attachs))
+	$smcFunc['db_query']('', '
+		UPDATE {db_prefix}attachments
+		SET width = 0,
+			height = 0
+		WHERE id_attach IN ({array_int:attachs})',
+		array(
+			'attachs' => $attachs,
+		)
+	);
+---}
+---#
+
 /******************************************************************************/
 --- Adding support for IPv6...
 /******************************************************************************/
@@ -442,7 +489,7 @@ CREATE TABLE IF NOT EXISTS {$db_prefix}user_alerts (
   content_type varchar(255) NOT NULL default '',
   content_id int unsigned NOT NULL default '0',
   content_action varchar(255) NOT NULL default '',
-  is_read smallint unsigned NOT NULL default '0',
+  is_read int unsigned NOT NULL default '0',
   extra text NOT NULL,
   PRIMARY KEY (id_alert)
 );
@@ -800,7 +847,7 @@ WHERE variable = 'avatar_action_too_large'
 
 ---# Cleaning up old settings.
 DELETE FROM {$db_prefix}settings
-WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_registration', 'attachmentEncryptFilenames', 'hotTopicPosts', 'hotTopicVeryPosts', 'fixLongWords', 'admin_features');
+WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_registration', 'attachmentEncryptFilenames', 'hotTopicPosts', 'hotTopicVeryPosts', 'fixLongWords', 'admin_features', 'topbottomEnable');
 ---#
 
 ---# Cleaning up old theme settings.
@@ -901,6 +948,11 @@ DELETE FROM {$db_prefix}board_permissions
 WHERE permission = 'mark_notify' OR permission = 'mark_any_notify';
 ---#
 
+---# Removing the send-topic permission
+DELETE FROM {$db_prefix}board_permissions
+WHERE permission = 'send_topic';
+---#
+
 ---# Adding "profile_password_own"
 ---{
 $inserts = array();

+ 4 - 4
ssi_examples.php

@@ -413,8 +413,8 @@ function template_ssi_above()
 {
 	global $settings, $context, $scripturl;
 
-	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+	echo '<!DOCTYPE html>
+<html>
 	<head>
 		<title>SMF 2.1 Alpha 1 SSI.php Examples</title>
 		<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/index.css?alp21">
@@ -555,8 +555,8 @@ function template_homepage_sample1($method = 'source')
 {
 	global $user_info, $boarddir;
 
-	$header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+	$header = '<!DOCTYPE html>
+<html>
 <head>
 	<title>SSI.php example for home page</title>
 	<style type="text/css">

+ 38 - 38
ssi_examples.shtml

@@ -1,159 +1,159 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!DOCTYPE html>
+<html>
 	<head>
 		<title> &lt;&lt; :: SMF SSI.php 2.1 Alpha 1 :: &gt;&gt; </title>
 	</head>
 	<body style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;">
 			<h1>SMF SSI.php Functions</h1>
-			Current Version 2.1 Alpha 1<br />
-			<br />
-			This file is used to demonstrate the capabilities of SSI.php using SHTML include functions.<br />
-			The examples the include tag, then the results of it. Examples are separated by horizontal rules.<br />
+			Current Version 2.1 Alpha 1<br>
+			<br>
+			This file is used to demonstrate the capabilities of SSI.php using SHTML include functions.<br>
+			The examples the include tag, then the results of it. Examples are separated by horizontal rules.<br>
 
-		<hr />
+		<hr>
 
 			<h3>Recent Topics Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentTopics" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=recentTopics" -->
 
-		<hr />
+		<hr>
 
 			<h3>Recent Posts Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentPosts" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=recentPosts" -->
 
-		<hr />
+		<hr>
 
 			<h3>Recent Poll Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentPoll" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=recentPoll" -->
 
-		<hr />
+		<hr>
 
 			<h3>Top Boards Function: &lt;!--#include virtual="./SSI.php?ssi_function=topBoards" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=topBoards" -->
 
-		<hr />
+		<hr>
 
 			<h3>Top Topics by View Function: &lt;!--#include virtual="./SSI.php?ssi_function=topTopicsViews" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=topTopicsViews" -->
 
-		<hr />
+		<hr>
 
 			<h3>Top Topics by Replies Function: &lt;!--#include virtual="./SSI.php?ssi_function=topTopicsReplies" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=topTopicsReplies" -->
 
-		<hr />
+		<hr>
 
 			<h3>Top Poll Function: &lt;!--#include virtual="./SSI.php?ssi_function=topPoll" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=topPoll" -->
 
-		<hr />
+		<hr>
 
 			<h3>Top Poster Function: &lt;!--#include virtual="./SSI.php?ssi_function=topPoster" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=topPoster" -->
 
-		<hr />
+		<hr>
 
 			<h3>Topic's Poll Function: &lt;!--#include virtual="./SSI.php?ssi_function=showPoll;ssi_topic=##" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=showPoll;ssi_topic=1" -->
 
-		<hr />
+		<hr>
 
 			<h3>Latest Member Function: &lt;!--#include virtual="./SSI.php?ssi_function=latestMember" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=latestMember" -->
 
-		<hr />
+		<hr>
 
 			<h3>Random Member Function: &lt;!--#include virtual="./SSI.php?ssi_function=randomMember" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=randomMember" -->
 
-		<hr />
+		<hr>
 
 			<h3>Board Stats: &lt;!--#include virtual="./SSI.php?ssi_function=boardStats" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=boardStats" -->
 
-		<hr />
+		<hr>
 
 			<h3>Who's Online Function: &lt;!--#include virtual="./SSI.php?ssi_function=whosOnline" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=whosOnline" -->
 
-		<hr />
+		<hr>
 
 			<h3>Log Online Presence + Who's Online Function: &lt;!--#include virtual="./SSI.php?ssi_function=logOnline" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=logOnline" -->
 
-		<hr />
+		<hr>
 
 			<h3>Welcome Function: &lt;!--#include virtual="./SSI.php?ssi_function=welcome" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=welcome" -->
 
-		<hr />
+		<hr>
 
 			<h3>News Function: &lt;!--#include virtual="./SSI.php?ssi_function=news" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=news" -->
 
-		<hr />
+		<hr>
 
 			<h3>Board News Function: &lt;!--#include virtual="./SSI.php?ssi_function=boardNews" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=boardNews" -->
 
-		<hr />
+		<hr>
 
 			<h3>Menubar Function: &lt;!--#include virtual="./SSI.php?ssi_function=menubar" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=menubar" -->
 
-		<hr />
+		<hr>
 
 			<h3>Quick Search Function: &lt;!--#include virtual="./SSI.php?ssi_function=quickSearch" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->
 
-		<hr />
+		<hr>
 
 			<h3>Login Function: &lt;!--#include virtual="./SSI.php?ssi_function=login" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=login" -->
 
-		<hr />
+		<hr>
 
 			<h3>Log Out Function: &lt;!--#include virtual="./SSI.php?ssi_function=logout" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=logout" -->
 
-		<hr />
+		<hr>
 
 			<h3>Today's Birthdays Function: &lt;!--#include virtual="./SSI.php?ssi_function=todaysBirthdays" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=todaysBirthdays" -->
 
-		<hr />
+		<hr>
 
 			<h3>Today's Holidays Function: &lt;!--#include virtual="./SSI.php?ssi_function=todaysHolidays" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=todaysHolidays" -->
 
-		<hr />
+		<hr>
 
 			<h3>Today's Events Function: &lt;!--#include virtual="./SSI.php?ssi_function=todaysEvents" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=todaysEvents" -->
 
-		<hr />
+		<hr>
 
 			<h3>Today's Calendar Function: &lt;!--#include virtual="./SSI.php?ssi_function=todaysCalendar" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=todaysCalendar" -->
 
-		<hr />
+		<hr>
 
 			<h3>Recent Calendar Events Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentEvents" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=recentEvents" -->
 
-		<hr />
+		<hr>
 
 			<h3>Recent Attachments Function &lt;!--#include virtual="./SSI.php?ssi_function=recentAttachments" --&gt;</h3>
 			<!--#include virtual="./SSI.php?ssi_function=recentAttachments" -->
 
-		<hr />
+		<hr>
 
-		<br />
-		<br />
+		<br>
+		<br>
 		<span style="font-size: smaller;">
 			<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank" class="new_win">SMF &copy; 2011, Simple Machines</a>
 		</span>
-		<br />
-		<br />
+		<br>
+		<br>
 		<span style="font-size: smaller; color: #CCCCCC;">
 			*ssi_examples.shtml last modified on <!--#config timefmt="%m/%d/%y" --><!--#echo var="LAST_MODIFIED" -->
 		</span>