From 12b208dfdec7ad9798903ecf17947c588ce7ddeb Mon Sep 17 00:00:00 2001 From: jollytoad Date: Tue, 31 Aug 2004 08:39:03 +0000 Subject: [PATCH] Removed unused cruft from printNav. Added printTitleNav - to being cleanup of page titles. --- classes/Misc.php | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/classes/Misc.php b/classes/Misc.php index 5fd01aa3..19e83f6e 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -2,7 +2,7 @@ /** * Class to hold various commonly used functions * - * $Id: Misc.php,v 1.87 2004/08/26 08:29:56 jollytoad Exp $ + * $Id: Misc.php,v 1.88 2004/08/31 08:39:03 jollytoad Exp $ */ class Misc { @@ -666,22 +666,13 @@ * Display a navigation tab bar. * @param $section The name of the tab bar. * @param $activetab The tab to highlight and set as default for the bar. - * @param $trail A bread crumb trail, or true for default trail, false for no trail. */ - function printNav($section, $activetab, $trail = true) { + function printNav($section, $activetab) { global $data; echo "
\n"; - if ($trail === true) { - $this->printTrail($this->getTrail($section)); - } - elseif (is_string($trail)) { - $this->printTrail($this->getTrail($trail)); - } - elseif (is_array($trail)) { - $this->printTrail($trail); - } + $this->printTrail($this->getTrail($section)); switch ($section) { case 'database': @@ -703,6 +694,24 @@ echo "
\n"; } + function printTitleNav($section, $title, $help = null) { + global $data, $lang; + + echo "
\n"; + + $this->printTrail($this->getTrail($section)); + + echo "
{$title}"; + + if (!is_null($help) && isset($data->help_page[$help])) { + echo "help_base . $data->help_page[$help]); + echo "\" title=\"{$lang['strhelp']}\">?"; + } + + echo "
\n
\n"; + } + /** * Get the URL for the last active tab of a particular tab bar. */ -- 2.39.5