Fixes for the listbox portion of portals.

This commit is contained in:
skeeter 2001-10-19 02:11:46 +00:00
parent c7be82ea2d
commit 8a4b563143

View File

@ -68,18 +68,21 @@
*/ */
function draw($extra_data='') function draw($extra_data='')
{ {
$this->p->parse('row','portal_listbox_header',True); if(count($this->data))
for ($x = 0; $x < count($this->data); $x++)
{ {
$var = Array( $this->p->parse('row','portal_listbox_header',True);
'text' => $this->data[$x]['text'],
'link' => $this->data[$x]['link'] for ($x = 0; $x < count($this->data); $x++)
); {
$this->p->set_var($var); $var = Array(
$this->p->parse('row','portal_listbox_link',True); 'text' => $this->data[$x]['text'],
'link' => $this->data[$x]['link']
);
$this->p->set_var($var);
$this->p->parse('row','portal_listbox_link',True);
}
$this->p->parse('row','portal_listbox_footer',True);
} }
$this->p->parse('row','portal_listbox_footer',True);
$this->set_internal($extra_data); $this->set_internal($extra_data);
return $this->draw_box(); return $this->draw_box();
} }