diff options
author | Christian Schneider | 2006-11-13 14:29:14 +0000 |
---|---|---|
committer | Christian Schneider | 2006-11-13 14:29:14 +0000 |
commit | 63657f3cef518f9172181b0b828fa804f14008d2 (patch) | |
tree | f080682dec8f069e1232a861fcad67235e109541 /banner | |
parent | 46d107c3052b4dfdda5920f90fc5c5475f785008 (diff) | |
download | itools-63657f3cef518f9172181b0b828fa804f14008d2.tar.gz itools-63657f3cef518f9172181b0b828fa804f14008d2.tar.bz2 itools-63657f3cef518f9172181b0b828fa804f14008d2.zip |
Fix nocount handling
Diffstat (limited to 'banner')
-rw-r--r-- | banner/banner.class | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/banner/banner.class b/banner/banner.class index 214fcb7..7c6d32a 100644 --- a/banner/banner.class +++ b/banner/banner.class @@ -139,7 +139,7 @@ function choose() * @param $noecho Switch off automatic display of HTML snipplet with echo * @return HTML snipplet to insert banner(s) if $noecho is set, undefined otherwise */ -function show($nocount = 0, $noecho = false) +function show($nocount = false, $noecho = false) { if (!is_array($this->banners)) return; // none found or choose() not called yet @@ -152,7 +152,7 @@ function show($nocount = 0, $noecho = false) foreach ($this->banners as $banner) { - $result .= $this->render($banner, $count, $number); + $result .= $this->render($banner, $count, $number, $nocount); $number++; } @@ -174,7 +174,7 @@ function showcombined($position = "banner", $nocount = false) { ob_start(); if ($this->bannersbyposition[$position]) - $this->render($this->bannersbyposition[$position], 1, 0); + $this->render($this->bannersbyposition[$position], 1, 0, $nocount); $result = ob_get_contents(); ob_end_clean(); @@ -187,19 +187,19 @@ function showcombined($position = "banner", $nocount = false) * @param $count Total number of banners, also number of times this method gets called * @param $position Current banner number, from 0 to $count - 1 */ -function render($banner, $count, $number) +function render($banner, $count, $number, $nocount = false) { if ($number > 0) echo "<br><br>"; - $this->render_banner($banner); + $this->render_banner($banner, $nocount); } /** * Render one banner * @param $banner Opaque banner structure to be rendered */ -function render_banner($banner) +function render_banner($banner, $nocount = false) { if ($banner['width'] <= 0) $banner['width'] = 468; |