diff --git a/calendar/day.php b/calendar/day.php
index bb6acf1a30..c036bcf914 100644
--- a/calendar/day.php
+++ b/calendar/day.php
@@ -18,7 +18,9 @@
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
- $phpgw_info["flags"]["nocalendarheader"] = True;
+ $phpgw_info["flags"]["noappheader"] = True;
+ $phpgw_info["flags"]["noappfooter"] = True;
+ $phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}
@@ -88,7 +90,7 @@
$phpgw->template->set_var("small_calendar",$phpgw->calendar->pretty_small_calendar($now["day"],$now["month"],$now["year"],"day.php"));
if (!$friendly) {
- $param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter;
+ $param = 'year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&friendly=1&filter='.$filter;
$phpgw->template->set_var("print","link("",$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang("Generate printer-friendly version")."'\">[".lang("Printer Friendly")."]");
$phpgw->template->parse("out","day_t");
$phpgw->template->pparse("out","day_t");
diff --git a/calendar/inc/functions.inc.php b/calendar/inc/functions.inc.php
index c9e102446e..6ea61a8798 100755
--- a/calendar/inc/functions.inc.php
+++ b/calendar/inc/functions.inc.php
@@ -1099,10 +1099,16 @@
$p->set_var('dayname',$str);
}
} else {
- $p->set_var('bgcolor2','#FEFEFE');
- $p->set_var('dayname','' . $cal["day"] . "");
+ $p->set_var('bgcolor2','#FEFEFE');
+ $str = "";
+ if(!$this->printer_friendly) {
+ $str .= '';
+ }
+ $str .= $cal["day"];
+ if (!$this->printer_friendly) $str .= '';
+ $p->set_var('dayname',$str);
}
$p->parse('monthweek_day','mini_day',True);
}
diff --git a/calendar/index.php b/calendar/index.php
index 2b6e99e2cc..1a3fbf4726 100755
--- a/calendar/index.php
+++ b/calendar/index.php
@@ -18,7 +18,9 @@
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
- $phpgw_info["flags"]["nocalendarheader"] = True;
+ $phpgw_info["flags"]["noappheader"] = True;
+ $phpgw_info["flags"]["noappfooter"] = True;
+ $phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}
diff --git a/calendar/week.php b/calendar/week.php
index 8d573f5e1f..1fbc653a24 100755
--- a/calendar/week.php
+++ b/calendar/week.php
@@ -18,7 +18,9 @@
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
-// $phpgw_info["flags"]["nocalendarheader"] = True;
+ $phpgw_info["flags"]["noappheader"] = True;
+ $phpgw_info["flags"]["noappfooter"] = True;
+ $phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}
diff --git a/calendar/year.php b/calendar/year.php
index 948f336751..0d39f9cc1d 100755
--- a/calendar/year.php
+++ b/calendar/year.php
@@ -12,13 +12,17 @@
/* $Id$ */
+ $phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
+
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
+ $phpgw_info["flags"]["nonavbar"] = True;
+ $phpgw_info["flags"]["noappheader"] = True;
+ $phpgw_info["flags"]["noappfooter"] = True;
+ $phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}
-
- $phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
include("../header.inc.php");
$view = "year";
diff --git a/phpgwapi/doc/CHANGELOG b/phpgwapi/doc/CHANGELOG
index a03bc2f4dc..bc3a669fc7 100644
--- a/phpgwapi/doc/CHANGELOG
+++ b/phpgwapi/doc/CHANGELOG
@@ -1,4 +1,7 @@
[0.9.10] - Fixed the cron programs, they where out of date in the table structures
+ - Added the ["flags"]["nofooter"] . ["flags"]["noappfooter"] flags.
+ - Fixed calendars in Printer Friendly mode.
+ - Fixed calendar day-view with events spanning multiple hours.
[0.9.9] - Fixed a number of issues with the verdilak layout
- Fixed parse_footer() not working if the header is turned off.
diff --git a/phpgwapi/inc/footer.inc.php b/phpgwapi/inc/footer.inc.php
index db1624e7c0..17bb6a568b 100644
--- a/phpgwapi/inc/footer.inc.php
+++ b/phpgwapi/inc/footer.inc.php
@@ -24,7 +24,8 @@
if (file_exists ($phpgw_info["server"]["app_inc"]."/footer.inc.php")
&& $phpgw_info["flags"]["currentapp"] != "home"
&& $phpgw_info["flags"]["currentapp"] != "login"
- && $phpgw_info["flags"]["currentapp"] != "logout"){
+ && $phpgw_info["flags"]["currentapp"] != "logout"
+ && (!isset($phpgw_info["flags"]["noappfooter"]) || !$phpgw_info["flags"]["noappfooter"])) {
include($phpgw_info["server"]["app_inc"]."/footer.inc.php");
}
diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php
index 8b3d8df6f5..5766ea4a44 100644
--- a/phpgwapi/inc/phpgw_common.inc.php
+++ b/phpgwapi/inc/phpgw_common.inc.php
@@ -509,7 +509,10 @@
function phpgw_footer()
{
global $phpgw, $phpgw_info, $HTMLCOMPLAINT;
- include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
+
+ if (!isset($phpgw_info["flags"]["nofooter"]) || !$phpgw_info["flags"]["nofooter"]) {
+ include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
+ }
// Clean up mcrypt
if (is_object($this->crypto)) {