Browse Source

! old $txt string used in a couple of places
! duplicate join created when using advanced search terms

Spuds 13 years ago
parent
commit
6b78799638
4 changed files with 9 additions and 9 deletions
  1. 5 3
      Sources/Search.php
  2. 2 2
      Sources/Subs.php
  3. 1 3
      Themes/core/Stats.template.php
  4. 1 1
      Themes/default/Stats.template.php

+ 5 - 3
Sources/Search.php

@@ -1233,14 +1233,16 @@ function PlushSearch2()
 						$numTables = 0;
 						$prev_join = 0;
 						$count = 0;
+						$excluded = false;
 						foreach ($words['subject_words'] as $subjectWord)
 						{
 							$numTables++;
 							if (in_array($subjectWord, $excludedSubjectWords))
 							{
-								if ($subject_query['from'] != '{db_prefix}messages AS m')
-								{
+								if (($subject_query['from'] != '{db_prefix}messages AS m') && !$excluded)
+								{ 
 									$subject_query['inner_join'][] = '{db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)';
+									$excluded = true;
 								}
 								$subject_query['left_join'][] = '{db_prefix}log_search_subjects AS subj' . $numTables . ' ON (subj' . $numTables . '.word ' . (empty($modSettings['search_match_words']) ? 'LIKE {string:subject_not_' . $count . '}' : '= {string:subject_not_' . $count . '}') . ' AND subj' . $numTables . '.id_topic = t.id_topic)';
 								$subject_query['params']['subject_not_' . $count] = empty($modSettings['search_match_words']) ? '%' . $subjectWord . '%' : $subjectWord;
@@ -1305,7 +1307,7 @@ function PlushSearch2()
 						// Nothing to search for?
 						if (empty($subject_query['where']))
 							continue;
-
+						
 						$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ( '
 							INSERT IGNORE INTO {db_prefix}' . ($createTemporary ? 'tmp_' : '') . 'log_search_topics
 								(' . ($createTemporary ? '' : 'id_search, ') . 'id_topic)') : '') . '

+ 2 - 2
Sources/Subs.php

@@ -2407,13 +2407,13 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 function parsesmileys(&$message)
 {
 	global $modSettings, $txt, $user_info, $context, $smcFunc;
-	static $smileyPregSearch = array(), $smileyPregReplacements = array();
+	static $smileyPregSearch = null, $smileyPregReplacements = array();
 
 	// No smiley set at all?!
 	if ($user_info['smiley_set'] === 'none' || trim($message) === '')
 		return;
 
-	// If the smiley array hasn't been set, do it now.
+	// If smileyPregSearch hasn't been set, do it now.
 	if (empty($smileyPregSearch))
 	{
 		// Use the default smileys if it is disabled. (better for "portability" of smileys.)

+ 1 - 3
Themes/core/Stats.template.php

@@ -193,7 +193,7 @@ function template_main()
 							<td width="15%">', $txt['stats_new_topics'], '</td>
 							<td width="15%">', $txt['stats_new_posts'], '</td>
 							<td width="15%">', $txt['stats_new_members'], '</td>
-							<td width="15%">', $txt['smf_stats_14'], '</td>';
+							<td width="15%">', $txt['most_online'], '</td>';
 
 		if (!empty($modSettings['hitStats']))
 			echo '
@@ -304,5 +304,3 @@ function template_main()
 	// ]]></script>';
 	}
 }
-
-?>

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

@@ -348,7 +348,7 @@ function template_main()
 					<th width="15%">', $txt['stats_new_topics'], '</th>
 					<th width="15%">', $txt['stats_new_posts'], '</th>
 					<th width="15%">', $txt['stats_new_members'], '</th>
-					<th', empty($modSettings['hitStats']) ? ' class="last_th"' : '', ' width="15%">', $txt['smf_stats_14'], '</th>';
+					<th', empty($modSettings['hitStats']) ? ' class="last_th"' : '', ' width="15%">', $txt['most_online'], '</th>';
 
 		if (!empty($modSettings['hitStats']))
 			echo '