6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/24/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#1557] Possible typo or bug in workweek FB view
*
Your Email Address
*
Spam protection
Enter the letters below:
. . ..___.. ,. , | | | _/ \./ \./ |___|__|./__. | |
Comment
> Sametimes do not appear correctly the blocks of FB in the workweek > view, the blocks that happen before to 9:00 and after to 18:00 not > appear. This is due to the function '_getBlocks' of file > 'kronolith/lib/FBView/workweek.php', compared with > 'kronolith/lib/FBView/week.php' it seems the following variables have > been fixed: > > > > $this->_startHour --> 9 > > $this->_endHour --> 18 > > > > I think this function must be the same function as the week view but > with $dayWidth fixed to 20. > > > > Is this correct? > > > > > > If I apply this patch all works OK: > > > > RCS file: /horde/kronolith/lib/FBView/workweek.php > > diff -r1.1 -r1.2 > > 40,43c40,43 > > < if ($start_hour >= 9 && $start_hour < 18) { > > < $left += ($start_hour - 9) * (20 / 9); > > < $left += ($start_min / 60) * (20 / 9); > > < } elseif ($start_hour >= 18) { > > --- > >> if ($start_hour >= $this->_startHour && $start_hour >> < $this->_endHour) { > >> $left += ($start_hour - $this->_startHour) * (20 >> / $this->_startHour); > >> $left += ($start_min / 60) * (20 / $this->_startHour); > >> } elseif ($start_hour >= $this->_endHour) { > > 46c46 > > < $left = max(0, $left); > > --- > >> $left = min(100, max(0, $left)); > > 53,56c53,56 > > < if ($end_hour >= 9 && $end_hour < 18) { > > < $right += ($end_hour - 9) * (20 / 9); > > < $right += ($end_min / 60) * (20 / 9); > > < } elseif ($end_hour >= 18) { > > --- > >> if ($end_hour >= $this->_startHour && $end_hour < >> $this->_endHour) { > >> $right += ($end_hour - $this->_startHour) * (20 >> / $this->_startHour); > >> $right += ($end_min / 60) * (20 / $this->_startHour); > >> } elseif ($end_hour >= $this->_endHour) { > > 61,64c61,65 > > < $template->set('left', $left); > > < $template->set('width', $right - $left); > > < $template->set('top', $count++ * 15); > > < $template->set('label', $label); > > --- > >> if (($right - $left) != 0) { > >> $template->set('left', $left); > >> $template->set('width', $right - $left); > >> $template->set('top', $count++ * 15); > >> $template->set('label', $label); > > 66c67,68 > > < $blocks .= $template->fetch(KRONOLITH_TEMPLATES . > '/fbview/' . $blockfile); > > --- > >> $blocks .= $template->fetch(KRONOLITH_TEMPLATES >> . '/fbview/' . $blockfile); > >> } > > 82,85c84,87 > > < if ($start_hour >= 9 && $start_hour < 18) { > > < $right += ($start_hour - 9) * (20 / 9); > > < $right += ($start_min / 60) * (20 / 9); > > < } elseif ($start_hour >= 18) { > > --- > >> if ($start_hour >= $this->_startHour && $start_hour >> < $this->_endHour) { > >> $right += ($start_hour - $this->_startHour) * >> (20 / $this->_startHour); > >> $right += ($start_min / 60) * (20 / $this->_startHour); > >> } elseif ($start_hour >= $this->_endHour) { > > 105,108c107,110 > > < if ($end_hour >= 9 && $end_hour < 18) { > > < $left += ($end_hour - 9) * (20 / 9); > > < $left += ($end_min / 60) * (20 / 9); > > < } elseif ($end_hour >= 18) { > > --- > >> if ($end_hour >= $this->_startHour && $end_hour < >> $this->_endHour) { > >> $left += ($end_hour - $this->_startHour) * (20 / >> $this->_startHour); > >> $left += ($end_min / 60) * (20 / $this->_startHour); > >> } elseif ($end_hour >= $this->_endHour) {
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers