week view now reflects correct days viewed

This commit is contained in:
skeeter 2000-11-16 01:49:51 +00:00
parent 881e68c1f9
commit e5727749ce
2 changed files with 17 additions and 6 deletions

View File

@ -22,6 +22,9 @@
$phpgw_info["flags"]["currentapp"] = "calendar";
include("../header.inc.php");
if(!isset($phpgw_info["user"]["preferences"]["calendar"]["weekdaystarts"]))
$phpgw_info["user"]["preferences"]["calendar"]["weekdaystarts"] = "Sunday";
if (isset($date) && strlen($date) > 0) {
$thisyear = substr($date, 0, 4);
$thismonth = substr($date, 4, 2);
@ -47,8 +50,13 @@
$nextmonth = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth + 1,1,$thisyear));
$prevmonth = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,1,$thisyear));
$sun = $phpgw->calendar->splitdate($phpgw->calendar->get_sunday_before($thisyear, $thismonth, $thisday) + 7200);
$sat = $phpgw->calendar->splitdate($sun["raw"] + 604800);
if($phpgw_info["user"]["preferences"]["calednar"]["workweekstarts"] == "Sunday") {
$start = 7200;
} else {
$start = 93600;
}
$first = $phpgw->calendar->splitdate($phpgw->calendar->get_sunday_before($thisyear, $thismonth, $thisday) + $start);
$last = $phpgw->calendar->splitdate($first["raw"] + 518400);
if ($friendly) {
echo "<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">";
@ -81,11 +89,11 @@
?>
<font size="+2" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>"><b>
<?php
echo lang(strftime("%B",$sun["raw"]))." ".$sun["day"];
if($sun["month"] <> $sat["month"] && $sun["year"] <> $sat["year"]) echo ", ".$sun["year"];
echo lang(strftime("%B",$first["raw"]))." ".$first["day"];
if($first["month"] <> $last["month"] && $first["year"] <> $last["year"]) echo ", ".$first["year"];
echo " - ";
if($sun["month"] <> $sat["month"]) echo lang(strftime("%B",$sat["raw"]))." ";
echo $sat["day"].", ".$sat["year"];
if($first["month"] <> $last["month"]) echo lang(strftime("%B",$last["raw"]))." ";
echo $last["day"].", ".$last["year"];
?>
</b></font>
<font size="+1" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>">

View File

@ -1,3 +1,6 @@
[0.9.4] - Fixed calendar week view.
- Displays calendar items in day view without start times.
[0.9.3] - Fixed the new user account form not returning the users firstname or last name when an
error is reported.
- Fixed NNTP to handle new VFS api.