diff options
author | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2010-01-03 23:54:14 -0500 |
---|---|---|
committer | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2010-01-03 23:54:14 -0500 |
commit | 9d4fa2963b1059fed54aaeae583bf02a30c42239 (patch) | |
tree | 5bc96becffcda48318c932ece289ec358dc84691 /includes/functions.php | |
parent | b63430eba1943d1732634df88884e8d7c4b2b1fb (diff) | |
download | bayonetcms-9d4fa2963b1059fed54aaeae583bf02a30c42239.tar.gz |
Fixed SVN maybe.
git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@448 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'includes/functions.php')
-rw-r--r-- | includes/functions.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/includes/functions.php b/includes/functions.php index 46b92f3..30997c6 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -25,6 +25,9 @@ * @param mixed $str * @return */ + +include_once 'classes.php'; + function bbcode_format ($str) { $str = htmlentities($str); @@ -363,6 +366,10 @@ static $error_stack_messages = array(); //global stack of errors accumulated thr function push_error_stack($message) { global $error_stack_messages; + + if(count($error_stack_messages) >= 100) + array_pop($error_stack_messages); + array_push($error_stack_messages, $message); } @@ -586,15 +593,15 @@ function UnderConstruction($message = NULL, $flag = BAYONET_SITE) * @return */ -define('BLOCK_LEFT',false); -define('BLOCK_RIGHT',true); +define('BLOCK_LEFT', 0); +define('BLOCK_RIGHT', 1); function GetBlocks($position = BLOCK_LEFT) { global $config; global $db; - $result = $db->Query("SELECT * FROM `bayonet_blocks` WHERE `position` = '$position' AND `active` = 1 ORDER BY weight"); + $result = $db->Query("SELECT block_id, active, weight, position, dir_name, title FROM `bayonet_blocks` WHERE `position` = $position AND `active` = 1 ORDER BY weight"); $blocks = $db->Fetch($result); foreach($blocks as $block) |