Bladeren bron

Fix a few bugs related to #623

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 10 jaren geleden
bovenliggende
commit
394081d22c

+ 1 - 1
Sources/Load.php

@@ -2425,7 +2425,7 @@ function censorText(&$text, $force = false)
 	global $modSettings, $options, $settings, $txt;
 	static $censor_vulgar = null, $censor_proper;
 
-	if ((!empty($options['show_no_censored']) && $modSettings['allow_no_censored'] && !$force) || empty($modSettings['censor_vulgar']) || trim($text) === '')
+	if ((!empty($options['show_no_censored']) && $modSettings['allow_no_censor'] && !$force) || empty($modSettings['censor_vulgar']) || trim($text) === '')
 		return $text;
 
 	// If they haven't yet been loaded, load them.

+ 1 - 1
Sources/ManagePosts.php

@@ -124,7 +124,7 @@ function SetCensor()
 		$updates = array(
 			'censor_vulgar' => implode("\n", $censored_vulgar),
 			'censor_proper' => implode("\n", $censored_proper),
-			'allow_no_censor' => empty($_POST['allow_no_censor']) ? '0' : '1',
+			'allow_no_censored' => empty($_POST['allow_no_censored']) ? '0' : '1',
 			'censorWholeWord' => empty($_POST['censorWholeWord']) ? '0' : '1',
 			'censorIgnoreCase' => empty($_POST['censorIgnoreCase']) ? '0' : '1',
 		);

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

@@ -584,7 +584,7 @@ function template_edit_censored()
 					<hr width="100%" size="1" class="hrcolor clear" />
 					<dl class="settings">
 						<dt>
-							<strong><label for="allow_no_ccensored">', $txt['allow_no_censored'], ':</label></strong>
+							<strong><label for="allow_no_censored">', $txt['allow_no_censored'], ':</label></strong>
 						</dt>
 						<dd>
 							<input type="checkbox" name="allow_no_censored" value="1" id="allow_no_censored"', empty($modSettings['allow_no_censored']) ? '' : ' checked="checked"', ' class="input_check" />

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

@@ -34,7 +34,7 @@ if (!isset($modSettings['allow_no_censor']))
 {
 	$request = upgrade_query("
 		SELECT value
-		FROM {$db_prefix}settings
+		FROM {$db_prefix}themes
 		WHERE variable='allow_no_censor'
 		AND id_theme = 1 OR id_theme = '$modSettings[theme_default]'
 	");

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

@@ -36,7 +36,7 @@ if (!isset($modSettings['allow_no_censor']))
 {
 	$request = upgrade_query("
 		SELECT value
-		FROM {$db_prefix}settings
+		FROM {$db_prefix}themes
 		WHERE variable='allow_no_censor'
 		AND id_theme = 1 OR id_theme = '$modSettings[theme_default]'
 	");

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

@@ -361,7 +361,7 @@ if (file_exists($GLOBALS['boarddir'] . '/Themes/core'))
 ---{
 	$request = upgrade_query("
 		SELECT value
-		FROM {$db_prefix}settings
+		FROM {$db_prefix}themes
 		WHERE variable='allow_no_censor'
 		AND id_theme = 1 OR id_theme = '$modSettings[theme_default]'
 	");