[pLog-svn] r6572 - plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Jun 18 13:25:25 EDT 2008


Author: jondaley
Date: 2008-06-18 13:25:25 -0400 (Wed, 18 Jun 2008)
New Revision: 6572

Modified:
   plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/admin.inc.php
   plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/banned.inc.php
   plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/core.inc.php
   plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/version.inc.php
Log:
upgraded to 2.0.15

Modified: plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/admin.inc.php
===================================================================
--- plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/admin.inc.php	2008-06-18 17:23:59 UTC (rev 6571)
+++ plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/admin.inc.php	2008-06-18 17:25:25 UTC (rev 6572)
@@ -1,4 +1,5 @@
 <?php if (!defined('BB2_CORE')) die('I said no cheating!');
+/* This techncially belongs a level up, with the WordPress code. It'll be moved soon. */
 
 function bb2_admin_pages() {
 	if (function_exists('current_user_can')) {
@@ -39,6 +40,18 @@
 		} else {
 			$settings['verbose'] = false;
 		}
+		if ($_POST['logging']) {
+			if ($_POST['logging'] == 'verbose') {
+				$settings['verbose'] = true;
+				$settings['logging'] = true;
+			} else {
+				$settings['verbose'] = false;
+				$settings['logging'] = true;
+			}
+		} else {
+			$settings['verbose'] = false;
+			$settings['logging'] = false;
+		}
 		bb2_write_settings($settings);
 ?>
 	<div id="message" class="updated fade"><p><strong><?php _e('Options saved.') ?></strong></p></div>
@@ -59,7 +72,12 @@
 
 	<fieldset class="options">
 	<legend><?php _e('Logging'); ?></legend>
-	<p><label><input type="checkbox" name="verbose" value="true" <?php if ($settings['verbose']) { ?>checked="checked" <?php } ?>/> <?php _e('Verbose HTTP request logging'); ?></label></p>
+	<p><label><input type="radio" name="logging" value="verbose" <?php if ($settings['verbose'] && $settings['logging']) { ?>checked="checked" <?php } ?>/> <?php _e('Verbose HTTP request logging'); ?></label></p>
+	<p><label><input type="radio" name="logging" value="normal" <?php if ($settings['logging'] && !$settings['verbose']) { ?>checked="checked" <?php } ?>/> <?php _e('Normal HTTP request logging (recommended)'); ?></label></p>
+	<p><label><input type="radio" name="logging" value="false" <?php if (!$settings['logging']) { ?>checked="checked" <?php } ?>/> <?php _e('Do not log HTTP requests (not recommended)'); ?></label></p>
+	</fieldset>
+
+	<fieldset class="options">
 	<legend><?php _e('Strict Mode'); ?></legend>
 	<p><label><input type="checkbox" name="strict" value="true" <?php if ($settings['strict']) { ?>checked="checked" <?php } ?>/> <?php _e('Strict checking (blocks more spam but may block some people)'); ?></label></p>
 	</fieldset>

Modified: plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/banned.inc.php
===================================================================
--- plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/banned.inc.php	2008-06-18 17:23:59 UTC (rev 6571)
+++ plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/banned.inc.php	2008-06-18 17:25:25 UTC (rev 6572)
@@ -42,6 +42,7 @@
 
 function bb2_log_denial($settings, $package, $key, $previous_key=false)
 {
+	if (!$settings['logging']) return;
 	bb2_db_query(bb2_insert($settings, $package, $key));
 }
 

Modified: plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/core.inc.php
===================================================================
--- plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/core.inc.php	2008-06-18 17:23:59 UTC (rev 6571)
+++ plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/core.inc.php	2008-06-18 17:25:25 UTC (rev 6572)
@@ -80,7 +80,7 @@
 	}
 
 	// Decide what to log on approved requests.
-	if ($settings['verbose'] || empty($package['user_agent'])) {
+	if (($settings['verbose'] && $settings['logging']) || empty($package['user_agent'])) {
 		bb2_db_query(bb2_insert($settings, $package, "00000000"));
 	}
 }

Modified: plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/version.inc.php
===================================================================
--- plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/version.inc.php	2008-06-18 17:23:59 UTC (rev 6571)
+++ plog/branches/lifetype-1.2/plugins/badbehavior/bad-behavior/version.inc.php	2008-06-18 17:25:25 UTC (rev 6572)
@@ -1,3 +1,3 @@
 <?php if (!defined('BB2_CWD')) die("I said no cheating!");
-define('BB2_VERSION', "2.0.14");
+define('BB2_VERSION', "2.0.15");
 ?>



More information about the pLog-svn mailing list