From 5b8178ae6a2e4a33f0e1e060cd62fc14e646a666 Mon Sep 17 00:00:00 2001
Message-Id: <5b8178ae6a2e4a33f0e1e060cd62fc14e646a666.1329920215.git.dmitriy.trt@gmail.com>
In-Reply-To: <f81687b4d6a9a77044419577a818e553f9e711bc.1329920215.git.dmitriy.trt@gmail.com>
References: <f81687b4d6a9a77044419577a818e553f9e711bc.1329920215.git.dmitriy.trt@gmail.com>
From: "Dmitriy.trt" <dmitriy.trt@gmail.com>
Date: Wed, 22 Feb 2012 21:16:47 +0700
Subject: [PATCH 2/2] Issue #1450438: fix SQL pattern when loading list of
 forms

---
 honeypot.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/honeypot.module b/honeypot.module
index 1c5cf66..e26c6b1 100644
--- a/honeypot.module
+++ b/honeypot.module
@@ -86,7 +86,7 @@ function honeypot_get_protected_forms() {
     }
     else {
       // Look up all the honeypot forms in the variables table.
-      $result = db_query("SELECT name FROM {variable} WHERE name LIKE '%honeypot_form_%'");
+      $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'honeypot_form_%'");
       // Add each form that's enabled to the $forms array.
       while ($variable = db_fetch_array($result)) {
         if (variable_get($variable['name'], 0)) {
-- 
1.7.8.3

