From d526decc4884710ae7fafe7aa5171e7f59b24292 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Sun, 27 Dec 2009 15:44:57 +0000 Subject: MySQL -> MySQLi Fixed memory leaks after Fetching arrays Removed all while loops that interfaced with $db->Fetch() Rewrote RSS module Fixed syntax error in donations module Fixed link structure for news module Reverting to old page display method git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@402 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- modules/admin/blocks/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/admin/blocks/functions.php') diff --git a/modules/admin/blocks/functions.php b/modules/admin/blocks/functions.php index 660b8e7..0138839 100644 --- a/modules/admin/blocks/functions.php +++ b/modules/admin/blocks/functions.php @@ -21,10 +21,7 @@ function ListBlocks() { global $db; $result = $db->Query("SELECT * FROM bayonet_blocks"); - while(($rows = $db->fetch($result))!=false) - { - $blocks[] = $rows; - } + $blocks = $db->Fetch(); echo ""; foreach($blocks as $block) @@ -116,13 +113,16 @@ function EditBlock($block_id) } //Grab the page from the database according to the $page_id passed to the function. + // {{{ XXX: FIXME -- Re-write this + /* $result = $db->Query("SELECT weight,dir_name,position,active FROM bayonet_blocks WHERE block_id = '$block_id'"); while(($row = $db->Fetch($result))!=false) { //We only want one row, so we don't have to $block[]... No foreach necessary. $block = $row; } - + */ + // }}} ?>
Existing Blocks
@@ -170,4 +170,4 @@ function DeleteBlock($block_id) \ No newline at end of file +?> -- cgit