From 2b31e8a6f30ebcd145b3394ac1a2ef8a768924ac Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Fri, 8 Jan 2010 03:10:43 +0000 Subject: The download module mostly works/looks the way it should. Bayonet_SQL now checks for a valid result, and if it is invalid just return. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@460 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- includes/functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'includes/functions.php') diff --git a/includes/functions.php b/includes/functions.php index 5d3dc7d..09fc456 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -621,9 +621,7 @@ function GetBlocks($position = BLOCK_LEFT) $query = sprintf("SELECT block_id, active, weight, position, dir_name, title FROM bayonet_blocks WHERE active = 1 AND position = %d ORDER BY weight", (int)$position); $result = $db->Query($query); - /* Is the result valid? */ - if($db->Rows($result) < 1) - return false; + $blocks = $db->Fetch($result); if(empty($blocks)) return; -- cgit