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 165f239 commit b262926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kronolith/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 kronolith/package.xml
Expand Up @@ -2665,6 +2665,8 @@
<date>2015-10-21</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.
* [jan] Fix accidental deletion of events if importing recurring events without a UID attribute (Bug #14208).
Expand Down

0 comments on commit b262926

Please sign in to comment.