Skip to content

Commit

Permalink
[jan] Fix week number in basic view if week starts on Sundays.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 25, 2016
1 parent 96a9208 commit bbf032d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v4.2.12-git
-----------

[jan] Fix week number in basic view if week starts on Sundays.
[mjr] Fix issue where new event could be created with exceptions from
previously edited event.
[jan] Mark preferences only available in basic mode.
Expand Down
3 changes: 2 additions & 1 deletion lib/View/Month.php
Expand Up @@ -146,6 +146,7 @@ public function html()
$this_link = $this->link(0, true);
$new_url = Horde::url('new.php')->add('url', $this_link);
$new_img = Horde::img('new_small.png', '+');
$weekOffset = $prefs->getValue('week_start_monday') ? 0 : 1;

foreach ($this->_currentCalendars as $id => $cal) {
if ($sidebyside) {
Expand All @@ -156,9 +157,9 @@ public function html()
for ($day = $this->_startOfView; $day < $this->_startOfView + $this->_daysInView; ++$day) {
$date = new Kronolith_Day($this->month, $day, $this->year);
$date->hour = $twentyFour ? 12 : 6;
$week = $date->weekOfYear();

if ($cell % 7 == 0) {
$week = $date->add(array('day' => $weekOffset))->weekOfYear();
$weeklink = Horde::url('week.php')
->add('date', $date->dateString())
->link(array('class' => 'kronolith-weeklink'))
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Fix week number in basic view if week starts on Sundays.
* [mjr] Fix issue where new event could be created with exceptions from previously edited event.
* [jan] Mark preferences only available in basic mode.
* [jan] Use access rules compatible with both Apache 2.2 and 2.4.
Expand Down Expand Up @@ -2638,6 +2639,7 @@
<date>2016-01-13</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Fix week number in basic view if week starts on Sundays.
* [mjr] Fix issue where new event could be created with exceptions from previously edited event.
* [jan] Mark preferences only available in basic mode.
* [jan] Use access rules compatible with both Apache 2.2 and 2.4.
Expand Down

0 comments on commit bbf032d

Please sign in to comment.