[pLog-svn] r2909 - plugins/branches/lifetype-1.0/hostblock/class/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Mon Feb 6 13:39:07 GMT 2006
Author: jondaley
Date: 2006-02-06 13:39:07 +0000 (Mon, 06 Feb 2006)
New Revision: 2909
Modified:
plugins/branches/lifetype-1.0/hostblock/class/dao/blockedhosts.class.php
Log:
order of operations needs parentheses. Otherwise blocking for comments only doesn't work when checking for global rules
Modified: plugins/branches/lifetype-1.0/hostblock/class/dao/blockedhosts.class.php
===================================================================
--- plugins/branches/lifetype-1.0/hostblock/class/dao/blockedhosts.class.php 2006-02-06 08:35:40 UTC (rev 2908)
+++ plugins/branches/lifetype-1.0/hostblock/class/dao/blockedhosts.class.php 2006-02-06 13:39:07 UTC (rev 2909)
@@ -47,10 +47,10 @@
function getBlogBlacklist( $blogId, $blockType = BLOCK_COMMENT_POSTING, $includeGlobal = false )
{
$query = "SELECT * FROM ".$this->getPrefix()."host_blocking_rules ".
- "WHERE blog_id = $blogId";
+ "WHERE (blog_id = $blogId";
if( $includeGlobal )
$query .=" OR blog_id = ".GLOBALLY_BLOCKED_HOST;
- $query .= " AND block_type = $blockType";
+ $query .= ") AND block_type = $blockType";
$result = $this->Execute( $query );
More information about the pLog-svn
mailing list