Browse Source

Merge pull request #41 from emanuele45/master

I feel now it's time...
Spuds 12 years ago
parent
commit
4c630c927f

+ 9 - 1
Sources/Admin.php

@@ -39,6 +39,14 @@ function AdminMain()
 
 	// Some preferences.
 	$context['admin_preferences'] = !empty($options['admin_preferences']) ? unserialize($options['admin_preferences']) : array();
+	$context['hooks_exist'] = false;
+	foreach ($modSettings as $key => $setting)
+	if (strpos($key, 'integrate') === 0)
+		if (!empty($setting))
+		{
+			$context['hooks_exist'] = true;
+			break;
+		}
 
 	// Define all the menu structure - see Subs-Menu.php for details!
 	$admin_areas = array(
@@ -181,7 +189,7 @@ function AdminMain()
 					'function' => 'ModifyModSettings',
 					'icon' => 'modifications.png',
 					'subsections' => array(
-						'hooks' => array($txt['hooks_title_list']),
+						'hooks' => array($txt['hooks_title_list'], 'enabled' => $context['hooks_exist']),
 						'general' => array($txt['mods_cat_modifications_misc']),
 						// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
 						// 'shout' => array($txt['shout']),

+ 4 - 1
Sources/DbExtra-mysql.php

@@ -267,6 +267,9 @@ function smf_db_insert_sql($tableName, $new_table = false)
 	$data = '';
 	$tableName = str_replace('{db_prefix}', $db_prefix, $tableName);
 
+	if ($tableName != $db_prefix . 'messages' || $tableName != $db_prefix . 'topics')
+		$detected_id = 0;
+
 	// This will be handy...
 	$crlf = "\r\n";
 
@@ -322,7 +325,7 @@ function smf_db_insert_sql($tableName, $new_table = false)
 	}
 
 	$smcFunc['db_free_result']($result);
-	$data .= ';' . $crlf;
+	$data = substr(trim($data), 0, -1) . ';' . $crlf . $crlf;
 
 	$start += $limit;
 

+ 3 - 0
Sources/DbExtra-postgresql.php

@@ -162,6 +162,9 @@ function smf_db_insert_sql($tableName, $new_table = false)
 	$data = '';
 	$tableName = str_replace('{db_prefix}', $db_prefix, $tableName);
 
+	if ($tableName != $db_prefix . 'messages' || $tableName != $db_prefix . 'topics')
+		$detected_id = 0;
+
 	// This will be handy...
 	$crlf = "\r\n";
 

+ 3 - 0
Sources/DbExtra-sqlite.php

@@ -209,6 +209,9 @@ function smf_db_insert_sql($tableName, $new_table = false)
 	$data = '';
 	$tableName = str_replace('{db_prefix}', $db_prefix, $tableName);
 
+	if ($tableName != $db_prefix . 'messages' || $tableName != $db_prefix . 'topics')
+		$detected_id = 0;
+
 	// This will be handy...
 	$crlf = "\r\n";
 

+ 10 - 2
Sources/ManageMaintenance.php

@@ -155,13 +155,21 @@ function MaintainDatabase()
 	// Here is more tricky: it depends on many factors, but the main idea is that
 	// if it takes "too long" the backup is not reliable. So, I know that on my computer it take
 	// 20 minutes to backup 2.5 GB, of course my computer is not representative, so I'll multiply by 4 the time.
-	// I would consider "too long" 5 minutes (I know it can be a long time, but let's start with that:
+	// I would consider "too long" 5 minutes (I know it can be a long time, but let's start with that):
 	// 80 minutes for a 2.5 GB and a 5 minutes limit means 160 MB approx
 	$plain_limit = 240000;
+	// Last thing: are we able to gain time?
+	$current_time_limit = ini_get('max_execution_time');
+	@set_time_limit(159); //something strange just to be sure
+	$new_time_limit = ini_get('max_execution_time');
 
 	$context['use_maintenance'] = 0;
 
-	if ($context['safe_mode_enable'])
+	// External tool if:
+	//  * safe_mode enable OR
+	//  * cannot change the execution time OR
+	//  * cannot reset timeout
+	if ($context['safe_mode_enable'] || empty($new_time_limit) || $current_time_limit == $new_time_limit || !function_exists('apache_reset_timeout'))
 		$context['suggested_method'] = 'use_external_tool';
 	elseif ($zip_limit < $plain_limit && $messages < $zip_limit)
 		$context['suggested_method'] = 'zipped_file';

+ 1 - 0
Sources/ManagePosts.php

@@ -248,6 +248,7 @@ function ModifyPostSettings($return_config = false)
 			}
 			elseif (isset($body_type) && $_POST['max_messageLength'] <= 65535 && $body_type != 'text')
 			{
+				// @TODO shouldn't we warn that reducing the size of the column something could be lost?
 				// Shorten the column so we can have the benefit of fulltext searching again!
 				$smcFunc['db_change_column']('{db_prefix}messages', 'body', array('type' => 'text'));
 			}

+ 6 - 5
Sources/ManageSearch.php

@@ -280,7 +280,7 @@ function EditSearchMethod()
 	if (!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'createfulltext')
 	{
 		checkSession('get');
-		validateToken('admin-msm');
+		validateToken('admin-msm', 'get');
 
 		// Make sure it's gone before creating it.
 		$smcFunc['db_query']('', '
@@ -303,7 +303,7 @@ function EditSearchMethod()
 	elseif (!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'removefulltext' && !empty($context['fulltext_index']))
 	{
 		checkSession('get');
-		validateToken('admin-msm');
+		validateToken('admin-msm', 'get');
 
 		$smcFunc['db_query']('', '
 			ALTER TABLE {db_prefix}messages
@@ -325,7 +325,7 @@ function EditSearchMethod()
 	elseif (!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'removecustom')
 	{
 		checkSession('get');
-		validateToken('admin-msm');
+		validateToken('admin-msm', 'get');
 
 		db_extend();
 		$tables = $smcFunc['db_list_tables'](false, $db_prefix . 'log_search_words');
@@ -352,7 +352,7 @@ function EditSearchMethod()
 	elseif (isset($_POST['save']))
 	{
 		checkSession();
-		validateToken('admin-msm');
+		validateToken('admin-msmpost');
 
 		updateSettings(array(
 			'search_index' => empty($_POST['search_index']) || (!in_array($_POST['search_index'], array('fulltext', 'custom')) && !isset($context['search_apis'][$_POST['search_index']])) ? '' : $_POST['search_index'],
@@ -497,7 +497,8 @@ function EditSearchMethod()
 	$context['partial_custom_index'] = !empty($modSettings['search_custom_index_resume']) && empty($modSettings['search_custom_index_config']);
 	$context['double_index'] = !empty($context['fulltext_index']) && $context['custom_index'];
 
-	createToken('admin-msm');
+	createToken('admin-msmpost');
+	createToken('admin-msm', 'get');
 }
 
 /**

+ 3 - 2
Sources/ManageSettings.php

@@ -159,7 +159,7 @@ function ModifyModSettings()
 	// Make it easier for mods to add new areas.
 	call_integration_hook('integrate_modify_modifications', array(&$subActions));
 
-	loadGeneralSettingParameters($subActions, 'general');
+	loadGeneralSettingParameters($subActions, $context['hooks_exist'] ? 'hooks' : 'general');
 
 	// Load up all the tabs...
 	$context[$context['admin_menu_name']]['tab_data'] = array(
@@ -167,6 +167,8 @@ function ModifyModSettings()
 		'help' => 'modsettings',
 		'description' => $txt['modification_settings_desc'],
 		'tabs' => array(
+			'hooks' => array(
+			),
 			'general' => array(
 			),
 		),
@@ -2311,7 +2313,6 @@ function list_integration_hooks()
 
 	$context['page_title'] = $txt['hooks_title_list'];
 	$context['sub_template'] = 'show_list';
-	$context['template_layers'][] = 'integrationHooks';
 	$context['default_list'] = 'list_integration_hooks';
 }
 

+ 3 - 3
Sources/ManageSmileys.php

@@ -196,7 +196,7 @@ function EditSmileySets()
 	$context[$context['admin_menu_name']]['current_subsection'] = 'editsets';
 
 	// They must've been submitted a form.
-	if (isset($_POST[$context['session_var']]))
+	if (isset($_POST['smiley_save']))
 	{
 		checkSession();
 		validateToken('admin-mss', 'request');
@@ -782,7 +782,7 @@ function EditSmileys()
 	$context[$context['admin_menu_name']]['current_subsection'] = 'editsmileys';
 
 	// Submitting a form?
-	if (isset($_POST[$context['session_var']]))
+	if (isset($_POST['smiley_save']))
 	{
 		checkSession();
 
@@ -1539,7 +1539,7 @@ function EditMessageIcons()
 	$smcFunc['db_free_result']($request);
 
 	// Submitting a form?
-	if (isset($_POST[$context['session_var']]))
+	if (isset($_POST['icons_save']))
 	{
 		checkSession();
 

+ 0 - 4
Sources/Register.php

@@ -379,10 +379,6 @@ function Register2($verifiedOpenID = false)
 	// Make sure they are clean, dammit!
 	$regOptions['theme_vars'] = htmlspecialchars__recursive($regOptions['theme_vars']);
 
-	// If Quick Reply hasn't been set then set it to be shown but collapsed.
-	if (!isset($regOptions['theme_vars']['display_quick_reply']))
-		$regOptions['theme_vars']['display_quick_reply'] = 1;
-
 	// Check whether we have fields that simply MUST be displayed?
 	$request = $smcFunc['db_query']('', '
 		SELECT col_name, field_name, field_type, field_length, mask, show_reg

+ 2 - 2
Sources/Themes.php

@@ -400,7 +400,7 @@ function SetThemeOptions()
 	}
 
 	// Submit?
-	if (isset($_POST['save']) && empty($_POST['who']))
+	if (isset($_POST['submit']) && empty($_POST['who']))
 	{
 		checkSession();
 		validateToken('admin-sto');
@@ -454,7 +454,7 @@ function SetThemeOptions()
 
 		redirectexit('action=admin;area=theme;' . $context['session_var'] . '=' . $context['session_id'] . ';sa=reset');
 	}
-	elseif (isset($_POST['save']) && $_POST['who'] == 1)
+	elseif (isset($_POST['submit']) && $_POST['who'] == 1)
 	{
 		checkSession();
 		validateToken('admin-sto');

+ 0 - 37
Themes/default/Admin.template.php

@@ -1714,41 +1714,4 @@ function template_clean_cache_button_below()
 	</div>';
 }
 
-
-function template_integrationHooks_above()
-{
-}
-function template_integrationHooks_below()
-{
-	global $context;
-
-	if (empty($context['hooks_filters']))
-		return;
-
-	echo '
-	<script type="text/javascript"><!-- // --><![CDATA[
-		var tblHeader = document.getElementById(\'' . $context['default_list'] . '\').getElementsByTagName(\'th\')[0];
-		tblHeader.innerHTML += ' . JavaScriptEscape($context['hooks_filters']) . ';
-
-		function integrationHooks_switchstatus(id)
-		{
-			var elem = document.getElementById(\'input_\'+id);
-			if (elem.value == \'enable\')
-				elem.value = \'disable\';
-			else if (elem.value == \'disable\')
-				elem.value = \'enable\';
-
-			document.forms["' . $context['default_list'] . '"].submit();
-		}
-
-		function integrationHooks_remove(id)
-		{
-			var elem = document.getElementById(\'input_\'+id);
-			elem.value = \'remove\';
-
-			document.forms["' . $context['default_list'] . '"].submit();
-		}
-	// ]]></script>';
-}
-
 ?>

+ 9 - 8
Themes/default/ManageSearch.template.php

@@ -149,13 +149,13 @@ function template_select_search_method()
 								<span class="smalltext">';
 	if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext']))
 		echo '
-									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_method_fulltext_create'], '</a>]';
+									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>]';
 	elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext']))
 		echo '
 									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create'];
 	else
 		echo '
-									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_method_fulltext_remove'], '</a>]<br />
+									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a>]<br />
 									<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length'];
 	echo '
 									</span>
@@ -171,11 +171,11 @@ function template_select_search_method()
 								<span class="smalltext">';
 	if ($context['custom_index'])
 		echo '
-									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_index_custom_remove'], '</a>]<br />
+									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>]<br />
 									<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
 	elseif ($context['partial_custom_index'])
 		echo '
-									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_index_custom_resume'], '</a>]<br />
+									<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a>]<br />
 									<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
 	else
 		echo '
@@ -213,7 +213,7 @@ function template_select_search_method()
 					<hr class="hrcolor clear" />
 					<input type="submit" name="save" value="', $txt['search_method_save'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-msm_token_var'], '" value="', $context['admin-msm_token'], '" />
+					<input type="hidden" name="', $context['admin-msmpost_token_var'], '" value="', $context['admin-msmpost_token'], '" />
 					<br class="clear_right" />
 				</div>
 				<span class="botslice clear"><span></span></span>
@@ -251,12 +251,11 @@ function template_create_index()
 					<input type="submit" name="save" value="', $txt['search_create_index_start'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 				</div>
+				<br class="clear" />
 				<span class="botslice"><span></span></span>
 			</div>
-
 	</form>
-	</div>
-	<br class="clear" />';
+	</div>';
 }
 
 function template_create_index_progress()
@@ -279,12 +278,14 @@ function template_create_index_progress()
 					</p>
 					<input type="submit" name="b" value="', $txt['search_create_index_continue'], '" class="button_submit" />
 				</div>
+				<br class="clear" />
 				<span class="botslice"><span></span></span>
 			</div>
 			<input type="hidden" name="step" value="', $context['step'], '" />
 			<input type="hidden" name="start" value="', $context['start'], '" />
 			<input type="hidden" name="bytes_per_word" value="', $context['index_settings']['bytes_per_word'], '" />
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+			<input type="hidden" name="', $context['admin-msmpost_token_var'], '" value="', $context['admin-msmpost_token'], '" />
 		</form>
 	</div>
 	<br class="clear" />

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

@@ -236,7 +236,7 @@ function template_modifysmiley()
 						</dd>
 					</dl>
 					<hr class="hrcolor" />
-					<input type="submit" value="', $txt['smileys_save'], '" class="button_submit" />
+					<input type="submit" name="smiley_save" value="', $txt['smileys_save'], '" class="button_submit" />
 					<input type="submit" name="deletesmiley" value="', $txt['smileys_delete'], '" onclick="return confirm(\'', $txt['smileys_delete_confirm'], '\');" class="button_submit" />
 					<br class="clear_right" />
 				</div>
@@ -388,7 +388,7 @@ function template_addsmiley()
 						</dd>
 					</dl>
 					<hr class="hrcolor" />
-					<input type="submit" value="', $txt['smileys_save'], '" class="button_submit" />
+					<input type="submit" name="smiley_save" value="', $txt['smileys_save'], '" class="button_submit" />
 					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
@@ -544,7 +544,7 @@ function template_editicon()
 
 	echo '
 					<hr class="hrcolor" />
-					<input type="submit" value="', $txt['smileys_save'], '" class="button_submit" />
+					<input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<br class="clear_right" />
 				</div>

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

@@ -269,12 +269,12 @@ function template_report()
 							<input type="submit" name="save" value="', $txt['rtm10'], '" style="margin-left: 1ex;" class="button_submit" />
 						</div>
 					</div>
+					<br class="clear" />
 					<span class="botslice"><span></span></span>
 				</div>
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 		</form>
-	</div>
-	<br class="clear" />';
+	</div>';
 }
 
 ?>

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

@@ -386,7 +386,7 @@ $txt['attach_path_manage'] = 'Manage Attachment Paths';
 $txt['attach_paths'] = 'Attachment Paths';
 $txt['attach_current_dir'] = 'Current Directory';
 $txt['attach_path'] = 'Path';
-$txt['attach_current_size'] = 'Current Size (kB)';
+$txt['attach_current_size'] = 'Current Size (KB)';
 $txt['attach_num_files'] = 'Files';
 $txt['attach_dir_status'] = 'Status';
 $txt['attach_add_path'] = 'Add Path';

+ 3 - 3
Themes/default/languages/Help.english.php

@@ -301,9 +301,9 @@ $helptxt['attachment_manager_settings'] = 'Attachments are files that members ca
 		<strong>Check attachment extension</strong>:<br /> Do you want to check the extension of the files?<br />
 		<strong>Allowed attachment extensions</strong>:<br /> You can set the allowed extensions of attached files.<br />
 		<strong>Attachments directory</strong>:<br /> The path to your attachment folder<br />(example: /home/sites/yoursite/www/forum/attachments)<br />
-		<strong>Max attachment folder space</strong> (in kB):<br /> Select how large the attachment folder can be, including all files within it.<br />
-		<strong>Max attachment size per post</strong> (in kB):<br /> Select the maximum filesize of all attachments made per post.  If this is lower than the per-attachment limit, this will be the limit.<br />
-		<strong>Max size per attachment</strong> (in kB):<br /> Select the maximum filesize of each separate attachment.<br />
+		<strong>Max attachment folder space</strong> (in KB):<br /> Select how large the attachment folder can be, including all files within it.<br />
+		<strong>Max attachment size per post</strong> (in KB):<br /> Select the maximum filesize of all attachments made per post.  If this is lower than the per-attachment limit, this will be the limit.<br />
+		<strong>Max size per attachment</strong> (in KB):<br /> Select the maximum filesize of each separate attachment.<br />
 		<strong>Max number of attachments per post</strong>:<br /> Select the number of attachments a person can make, per post.<br />
 		<strong>Display attachment as picture in posts</strong>:<br /> If the uploaded file is a picture, this will show it underneath the post.<br />
 		<strong>Resize images when showing under posts</strong>:<br /> If the above option is selected, this will save a separate (smaller) attachment for the thumbnail to decrease bandwidth.<br />

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

@@ -81,7 +81,7 @@ $txt['salvaged_poll_message_body'] = 'This poll was found without a topic.';
 $txt['database_optimize'] = 'Optimize Database';
 $txt['database_numb_tables'] = 'Your database contains %1$d tables.';
 $txt['database_optimize_attempt'] = 'Attempting to optimize your database...';
-$txt['database_optimizing'] = 'Optimizing %1$s... %2$01.2f kb optimized.';
+$txt['database_optimizing'] = 'Optimizing %1$s... %2$01.2f KB optimized.';
 $txt['database_already_optimized'] = 'All of the tables were already optimized.';
 $txt['database_opimize_unneeded'] = 'It wasn\'t necessary to optimize any tables.';
 $txt['database_optimized'] = ' table(s) optimized.';

+ 6 - 6
Themes/default/languages/Post.english.php

@@ -115,8 +115,8 @@ $txt['reported_by'] = 'has been reported by';
 $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_attachmentSizeLimit'] = 'maximum individual size %1$d kB';
+$txt['attach_restrict_attachmentPostLimit'] = 'maximum total size %1$d KB';
+$txt['attach_restrict_attachmentSizeLimit'] = 'maximum individual size %1$d KB';
 $txt['attach_restrict_attachmentNumPerPostLimit'] = '%1$d per post';
 $txt['attach_restrictions'] = 'Restrictions:';
 
@@ -198,14 +198,14 @@ $txt['attach_error_title'] = 'Error uploading your attachments.';
 $txt['attach_warning'] = 'There was a problem during the uploading of <strong>%1$s</strong>.';
 $txt['attach_check_nag'] = 'Unable to continue due to incomplete data (%1$s).';
 $txt['attach_continue'] = 'Continue';
-$txt['attach_max_total_file_size'] = 'Sorry, you are out of attachment space. The total attachment size allowed per post is %1$s kB. Space remaining is %2$s kB.';
+$txt['attach_max_total_file_size'] = 'Sorry, you are out of attachment space. The total attachment size allowed per post is %1$s KB. Space remaining is %2$s kB.';
 $txt['attach_folder_warning'] = 'The attachments directory can not be located. Please notify an administrator of this problem.';
 $txt['attach_folder_admin_warning'] = 'The path to the attachments directory (%1$s) is incorrect. Please correct it in the attachment settings.';
 $txt['attach_limit_nag'] = 'Sorry, but you have reached the maximum number of attachments allowed per post.';
 $txt['attach_no_upload'] = 'There was a problem and your attachments could not be uploaded';
 $txt['attach_remaining'] = '%1$d remaining';
-$txt['attach_available'] = '%1$s kB available';
-$txt['attach_kb'] = ' (%1$s kB)';
+$txt['attach_available'] = '%1$s KB available';
+$txt['attach_kb'] = ' (%1$s KB)';
 $txt['attach_0_byte_file'] = 'This file appears to be empty. Please contact your forum administrator if this continues to be a problem';
 $txt['attached_files_in_session'] = '<em>The above underlined file(s) have been uploaded but will not be attached to this post until it is submitted.</em>';
 
@@ -223,7 +223,7 @@ $txt['error_temp_attachments_gone'] = 'Those attachments are now removed and you
 $txt['error_temp_attachments_flushed'] = 'Please note that any files which had been previously attached but not posted. Have now been removed.';
 
 $txt['cant_access_upload_path'] = 'Cannot access attachments upload path!';
-$txt['file_too_big'] = 'Your file is too large. The maximum attachment size allowed is %1$d kB.';
+$txt['file_too_big'] = 'Your file is too large. The maximum attachment size allowed is %1$d KB.';
 $txt['attach_timeout'] = 'Your attachment couldn\'t be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.<br /><br />Please consult your server administrator for more information.';
 $txt['bad_attachment'] = 'Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.';
 $txt['ran_out_of_space'] = 'The upload folder is full. Please try a smaller file and/or contact an administrator.';

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

@@ -51,7 +51,7 @@ $txt['search_method_title'] = 'Search - method';
 $txt['search_method_save'] = 'Save';
 $txt['search_method_messages_table_space'] = 'Space used by forum messages in the database';
 $txt['search_method_messages_index_space'] = 'Space used to index messages in the database';
-$txt['search_method_kilobytes'] = 'kB';
+$txt['search_method_kilobytes'] = 'KB';
 $txt['search_method_fulltext_index'] = 'Fulltext index';
 $txt['search_method_no_index_exists'] = 'doesn\'t currently exist';
 $txt['search_method_fulltext_create'] = 'create a fulltext index';

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

@@ -139,7 +139,7 @@ $txt['themeadmin_edit_filename'] = 'Filename';
 $txt['themeadmin_edit_modified'] = 'Last Modified';
 $txt['themeadmin_edit_size'] = 'Size';
 $txt['themeadmin_edit_bytes'] = 'B';
-$txt['themeadmin_edit_kilobytes'] = 'kB';
+$txt['themeadmin_edit_kilobytes'] = 'KB';
 $txt['themeadmin_edit_error'] = 'The file you tried to save generated the following error:';
 $txt['themeadmin_edit_on_line'] = 'Beginning on line';
 $txt['themeadmin_edit_preview'] = 'Preview';

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

@@ -399,7 +399,7 @@ $txt['delete'] = 'Delete';
 
 $txt['your_pms'] = 'Your Personal Messages';
 
-$txt['kilobyte'] = 'kB';
+$txt['kilobyte'] = 'KB';
 $txt['megabyte'] = 'MB';
 
 $txt['more_stats'] = '[More Stats]';
@@ -765,7 +765,7 @@ $txt['debug_subtemplates'] = 'Sub templates: ';
 $txt['debug_language_files'] = 'Language files: ';
 $txt['debug_stylesheets'] = 'Style sheets: ';
 $txt['debug_files_included'] = 'Files included: ';
-$txt['debug_kb'] = 'kB.';
+$txt['debug_kb'] = 'KB.';
 $txt['debug_show'] = 'show';
 $txt['debug_cache_hits'] = 'Cache hits: ';
 $txt['debug_cache_seconds_bytes'] = '%1$ss - %2$s bytes';

+ 4 - 1
other/install.php

@@ -218,7 +218,8 @@ function initialize_inputs()
 	// Add slashes, as long as they aren't already being added.
 	if (!function_exists('get_magic_quotes_gpc') || @get_magic_quotes_gpc() == 0)
 		foreach ($_POST as $k => $v)
-			$_POST[$k] = addslashes($v);
+			if (strpos($k, 'password') === false)
+				$_POST[$k] = addslashes($v);
 
 	// This is really quite simple; if ?delete is on the URL, delete the installer...
 	if (isset($_GET['delete']))
@@ -1294,6 +1295,8 @@ function AdminAccount()
 	if (isset($_POST['password1']) && !empty($_POST['contbutt']))
 	{
 		// Wrong password?
+		print_r($_POST['password3']) . '<br />';
+		print_r($db_passwd) . '<br />';
 		if ($incontext['require_db_confirm'] && $_POST['password3'] != $db_passwd)
 		{
 			$incontext['error'] = $txt['error_db_connect'];

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

@@ -1151,7 +1151,7 @@ CREATE TABLE {$db_prefix}mail_queue (
   id_mail int(10) unsigned NOT NULL auto_increment,
   time_sent int(10) NOT NULL default '0',
   recipient varchar(255) NOT NULL default '',
-  body text NOT NULL,
+  body mediumtext NOT NULL,
   subject varchar(255) NOT NULL default '',
   headers text NOT NULL,
   send_html tinyint(3) NOT NULL default '0',

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

@@ -174,3 +174,11 @@ VALUES
 ALTER TABLE {$db_prefix}boards
 ADD COLUMN deny_member_groups varchar(255) NOT NULL DEFAULT '';
 ---#
+
+/******************************************************************************/
+--- Fixing mail queue for long messages
+/******************************************************************************/
+---# Altering mil_queue table...
+ALTER TABLE {$db_prefix}mail_queue
+CHANGE body body mediumtext NOT NULL;
+---#