6.0.0-beta1
7/5/25

[#13951] Background color for TimeObjects is not set correctly
Summary Background color for TimeObjects is not set correctly
Queue Kronolith
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester tilo.eckert (at) flam (dot) de
Created 04/15/2015 (3734 days ago)
Due
Updated 04/15/2015 (3734 days ago)
Assigned
Resolved 04/15/2015 (3734 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
04/15/2015 02:39:02 PM Michael Rubinsky Comment #4
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
Fixed slightly differently.

Kronolith 4.2.6
04/15/2015 02:37:03 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 6e9741802c58a5834fd3a13e303004682956c578
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Apr 15 10:33:35 2015 -0400

     Bug: 13951 Allow background to be provided by the listTimeObjects API.

  kronolith/lib/CalendarsManager.php |   12 ++++++++++--
  1 files changed, 10 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/6e9741802c58a5834fd3a13e303004682956c578
04/15/2015 02:34:53 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 7e3dc75d8121929f8d9df911045724d8879bf9c6
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Apr 15 10:33:35 2015 -0400

     Bug: 13951 Allow background to be provided by the listTimeObjects API.

  kronolith/lib/CalendarsManager.php |   12 ++++++++++--
  1 files changed, 10 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/7e3dc75d8121929f8d9df911045724d8879bf9c6
04/15/2015 10:35:17 AM tilo (dot) eckert (at) flam (dot) de Comment #1
Priority ⇒ 1. Low
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Background color for TimeObjects is not set correctly
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
When implementing a custom module that adds new categories and events 
through the listTimeObjectCategories() / listTimeObjects() API, I 
noticed that Kronolith does not display the background color that is 
defined by my categories, but uses the default one instead. When 
accessing the calendar a second, third, etc time, my background color 
is displayed correctly for the events of the respective category and 
the category itself in the sidebar.

After some investigation I found that Kronolith_CalendarManager does 
not set the background color attribute when it creates 
Kronolith_Calendar_External objects for every externally provided 
category. It fails to do so only the first time as the category info 
is cached in the session (including bg color). On second and further 
calls, Kronolith_Calendar_External objects are created from the cached 
version, including the background color attribute. Hence, the bg color 
of external calendars is only displayed when the cached version is used.

Here is the fix:

Replace this line in kronolith/lib/CalendarsManager.php:

                     $this->_allExternal[$api . '/' . $name] = new 
Kronolith_Calendar_External(array('api' => $api, 'name' => 
$description['title'], 'id' => $name, 'type' => $description['type']));

with

                     $this->_allExternal[$api . '/' . $name] = new 
Kronolith_Calendar_External(array('api' => $api, 'name' => 
$description['title'], 'id' => $name, 'type' => $description['type'], 
'background' => $description['background']));

Saved Queries