/[drupal]/contributions/modules/badbehavior/badbehavior.module
ViewVC logotype

Diff of /contributions/modules/badbehavior/badbehavior.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11.4.3, Wed Apr 9 01:50:13 2008 UTC revision 1.11.4.4, Tue Sep 1 20:35:19 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: badbehavior.module,v 1.11.4.2 2008/04/07 15:23:50 wilco Exp $  // $Id: badbehavior.module,v 1.11.4.3 2008/04/09 01:50:13 wilco Exp $
3    
4  define('BB2_CWD', dirname(__FILE__));  define('BB2_CWD', dirname('./sites/all/libraries'));
5    
6  /**  /**
7   * Implementation of hook_help().   * Implementation of hook_help().
# Line 51  function badbehavior_overview() { Line 51  function badbehavior_overview() {
51      require_once(BB2_CWD .'/bad-behavior/responses.inc.php');      require_once(BB2_CWD .'/bad-behavior/responses.inc.php');
52    }    }
53    else {    else {
54      return 'Bad Behavior is not installed correctly.';      return 'Bad Behavior is not installed correctly.  Please download Bad Behavior and extract /bad-behavior/bad-behavior from the zip to sites/all/libraries/bad-behavior';
55    }    }
56    
57    $header = array(    $header = array(
58      array('data' => t('Response'), 'field' => 'w.http_response'),      array('data' => t('Response'), 'field' => 'w.http_response'),
59      array('data' => t('Reason'), 'field' => 'w.denied_reason'),      array('data' => t('Reason'), 'field' => 'w.denied_reason'),
# Line 89  function badbehavior_event($id = NULL) { Line 90  function badbehavior_event($id = NULL) {
90      require_once(BB2_CWD .'/bad-behavior/responses.inc.php');      require_once(BB2_CWD .'/bad-behavior/responses.inc.php');
91    }    }
92    else {    else {
93      return 'Bad Behavior is not installed correctly.';      return 'Bad Behavior is not installed correctly.  Please download Bad Behavior and extract /bad-behavior/bad-behavior from the zip to sites/all/libraries/bad-behavior';
94    }    }
95    
96    $output = '';    $output = '';
97    $result = db_query('SELECT w.* FROM {bad_behavior_log} w WHERE w.id = %d', $id);    $result = db_query('SELECT w.* FROM {bad_behavior_log} w WHERE w.id = %d', $id);
98    if ($behave = db_fetch_object($result)) {    if ($behave = db_fetch_object($result)) {

Legend:
Removed from v.1.11.4.3  
changed lines
  Added in v.1.11.4.4

  ViewVC Help
Powered by ViewVC 1.1.2