Index: click_filter.module =================================================================== --- click_filter.module (revision 834) +++ click_filter.module (working copy) @@ -65,9 +65,11 @@ return CLICK_BOT; } // See if the click came from an owner of the ad. - $result = db_query('SELECT oid FROM {ad_owners} WHERE aid = %d AND uid = %d', $aid, $user->uid); - if (db_result($result)) { - return CLICK_OWNER; + if (module_exists('ad_owners')) { + $result = db_query('SELECT oid FROM {ad_owners} WHERE aid = %d AND uid = %d', $aid, $user->uid); + if (db_result($result)) { + return CLICK_OWNER; + } } // See if the click came from a duplicate uid or ip address. if ($user->uid) { @@ -82,7 +84,7 @@ return CLICK_VALID; } -/** +/** * Implementation of hook_perm(). */ function click_filter_perm() {