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 --- includes/functions.php | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'includes/functions.php') diff --git a/includes/functions.php b/includes/functions.php index f0fe60e..bc169ff 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -301,10 +301,10 @@ if(!defined("CALLED_FROM_ADMIN")) * Begins a Bayonet site table. * @return */ - function OpenTable() + function OpenTable($width = "100%") { //width="100%" is important. Otherwise all of our tables will be text width. - echo "\n"; + echo "
\n"; } /** @@ -314,7 +314,7 @@ if(!defined("CALLED_FROM_ADMIN")) */ function CloseTable() { - //echo "
"; + echo ""; } /** @@ -412,6 +412,19 @@ function ReportHack($message) CloseTable(); } +/** + * PageRedirect() + * + * performs an http redirect + * + * @param $delay + * @param $link + */ +function PageRedirect($delay, $link) +{ + echo ""; +} + /** * array_dump() @@ -588,11 +601,8 @@ function GetBlocks($position = BLOCK_LEFT) $result = $db->Query("SELECT * FROM `bayonet_blocks` ORDER BY weight, position"); //$result = mysql_query("SELECT * FROM bayonet_blocks ORDER BY weight, position"); - while(($row = $db->Fetch($result))!==false) - { - $blocks[] = $row; - } - $db->Free($result); + $blocks = $db->Fetch($result); + $blocks[] = $row; foreach($blocks as $block) { -- cgit