[Tickets #13951] Background color for TimeObjects is not set correctly

noreply at bugs.horde.org noreply at bugs.horde.org
Wed Apr 15 10:35:17 UTC 2015


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: https://bugs.horde.org/ticket/13951
------------------------------------------------------------------------------
  Ticket           | 13951
  Erstellt Von     | tilo.eckert at flam.de
  Zusammenfassung  | Background color for TimeObjects is not set correctly
  Warteschlange    | Kronolith
  Version          | Git master
  Typ              | Bug
  Status           | Unconfirmed
  Priorität        | 1. Low
  Milestone        |
  Patch            | 1
  Zuständige       |
------------------------------------------------------------------------------


tilo.eckert at flam.de (2015-04-15 10:35) hat geschrieben:

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']));






More information about the bugs mailing list