Commit a80ca265b667e3f0353ac9382434bfea4ebfa6b9

Authored by Michael Joseph
1 parent 4837c982

added optional sectionName to renderHeading


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1957 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 4 additions and 2 deletions
presentation/Html.inc
... ... @@ -11,9 +11,11 @@
11 11 * @package presentation
12 12 */
13 13  
14   -function renderHeading($sHeading) {
  14 +function renderHeading($sHeading, $sSectionName = "") {
15 15 global $default;
16   - $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  16 + if (strlen($sSectionName) == 0) {
  17 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  18 + }
17 19 $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
18 20 $sToRender = "<table border=\"0\" width=\"100%\">\n";
19 21 $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\"><font color=\"ffffff\">$sHeading</font></th></tr>\n";
... ...