From 748e0925c22e64c75da4087137d2d0d6c77c01e8 Mon Sep 17 00:00:00 2001 From: vyshane Date: Wed, 8 Mar 2006 04:53:48 +0000 Subject: [PATCH] Added attribute $linkedwhenselected to tabobject class. Basically defines whether the tab should be linked even if it is selected. --- lib/weblib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 064217f4fbb..75a8480a425 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4584,13 +4584,15 @@ class tabobject { var $id; var $link; var $text; + var $linkedwhenselected; /// A constructor just because I like constructors - function tabobject ($id, $link='', $text='', $title='') { + function tabobject ($id, $link='', $text='', $title='', $linkedwhenselected=false) { $this->id = $id; $this->link = $link; $this->text = $text; $this->title = $title ? $title : $text; + $this->linkedwhenselected = $linkedwhenselected; } @@ -4602,7 +4604,7 @@ class tabobject { $cstr = ''; /// The text and anchor for this tab - if ($inactive || $activetwo || $selected) { + if ($inactive || $activetwo || ($selected && !$this->linkedwhenselected)) { $astr .= $this->text; } else { $astr .= ''.$this->text.'';