Browse Source

! If either the karma smite or applaud labels are empty, don't permit that operation (e.g. emptying the smite label to 'stop' smiting)

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
248fdf0d2f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Sources/Karma.php

+ 3 - 0
Sources/Karma.php

@@ -53,6 +53,9 @@ function ModifyKarma()
 	// Applauding or smiting?
 	$dir = $_REQUEST['sa'] != 'applaud' ? -1 : 1;
 
+	if (($dir == 1 && empty($modSettings['karmaApplaudLabel'])) || ($dir == -1 && empty($modSettings['karmaSmiteLabel'])))
+		fatal_lang_error('feature_disabled', false);
+
 	// Delete any older items from the log. (karmaWaitTime is by hour.)
 	$smcFunc['db_query']('', '
 		DELETE FROM {db_prefix}log_karma