Changeset:
433abc12af56
https://sourceforge.net/p/mrbs/hg-code/ci/433abc12af5654b7cce7f3bc525968a2ea5ba06b
Author:
Campbell Morrison <[email protected]>
Date:
Sun Oct 02 15:12:18 2016 +0100
Log message:
Changed parameter order for consistency with other functions
diffstat:
web/Themes/default/header.inc | 21 ++++++++++++++-------
web/functions.inc | 4 ++--
2 files changed, 16 insertions(+), 9 deletions(-)
diffs (101 lines):
diff -r 3262cd0eca6d -r 433abc12af56 web/Themes/default/header.inc
--- a/web/Themes/default/header.inc Sun Oct 02 15:00:24 2016 +0100
+++ b/web/Themes/default/header.inc Sun Oct 02 15:12:18 2016 +0100
@@ -17,6 +17,8 @@
}
+// Print the basic site information. This function is used for all headers,
including
+// the simple header, and so mustn't require any database access.
function print_header_site_info()
{
global $mrbs_company,
@@ -61,7 +63,7 @@
}
-function print_goto_date($day, $month, $year, $room, $area)
+function print_goto_date($day, $month, $year, $area, $room)
{
$user = getUserName();
@@ -121,7 +123,7 @@
}
-function print_search($day, $month, $year, $room, $area, $search_str = '')
+function print_search($day, $month, $year, $area, $room, $search_str = '')
{
echo "<form id=\"header_search\" method=\"get\" action=\"search.php\">\n";
echo "<div>\n";
@@ -151,7 +153,7 @@
}
-function print_nav($day, $month, $year, $room, $area, $search_str = '')
+function print_nav($day, $month, $year, $area, $room, $search_str = '')
{
$query_string = "day=$day&month=$month&year=$year";
if (!empty($area))
@@ -167,7 +169,7 @@
echo "<ul>\n";
echo "<li>\n";
- print_goto_date($day, $month, $year, $room, $area);
+ print_goto_date($day, $month, $year, $area, $room);
echo "</li>\n";
echo "<li>\n";
@@ -183,7 +185,7 @@
echo "</li>\n";
echo "<li>\n";
- print_search($day, $month, $year, $room, $area, $search_str);
+ print_search($day, $month, $year, $area, $room, $search_str);
echo "</li>\n";
// For session protocols that define their own logon box...
@@ -200,7 +202,9 @@
// Print the page header
-function print_theme_header($day, $month, $year, $area, $room)
+// If $simple is true, then just print a simple header that doesn't require
any database
+// access (useful for fatal errors and database upgrades).
+function print_theme_header($day, $month, $year, $area, $room, $simple=false)
{
global $search_str, $locale_warning;
global $PHP_SELF;
@@ -253,7 +257,10 @@
echo "<header id=\"banner\" class=\"screenonly\">\n";
print_header_site_info();
- print_nav($day, $month, $year, $room, $area, $search_str);
+ if (!$simple)
+ {
+ print_nav($day, $month, $year, $area, $room, $search_str);
+ }
echo "</header>\n";
?>
diff -r 3262cd0eca6d -r 433abc12af56 web/functions.inc
--- a/web/functions.inc Sun Oct 02 15:00:24 2016 +0100
+++ b/web/functions.inc Sun Oct 02 15:12:18 2016 +0100
@@ -148,7 +148,7 @@
// Print the page header
-function print_header($day, $month, $year, $area, $room)
+function print_header($day, $month, $year, $area, $room, $simple=false)
{
global $theme, $done_header;
@@ -168,7 +168,7 @@
require_once "Themes/default/header.inc";
}
// Now go and do it
- print_theme_header($day, $month, $year, $area, $room);
+ print_theme_header($day, $month, $year, $area, $room, $simple);
$done_header = TRUE;
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits