[kronolith] prefs.php broken: push/pop app problems

Karsten Fourmont fourmont at gmx.de
Sun Sep 26 10:13:38 PDT 2004


Hi,

the api call
$_address_books = $registry->call('contacts/sources');

in kronolith's prefs.php causes some problems.

A registry call does a pushApp to make the callee's app the current app.
pushapp does three things (among others)
a)read app's config
b)read app's prefs
c)modify application stack

the problem is that when you make a _kronolith_ api call, step 2) does 
now a turba api call. So you have another pushApp and pushApp is not 
reentrant.

when happens is something like this:

1) $registry->call('calendar/listEvents', $args); // for example
2) pushApp(kronolith):
   a) reading kronlith config
   b) reading kronlith prefs
           1) kronlith prefs.php contains turba api call!!!
   	  2) pushApp('turba')
   	     a) reading turba config
   	     b) reading turba prefs
   	     c) modify app stack: turba is current
   	  3) perform tuba api calll
   	  4) popping turba: horde is now current
              (as kronolith was never current)
   c) modify app stack: kronolith is current, but with horde config
3) do kronolith api call: fails as no kronolith config, only horde config.

The problem occurs for instance in syncml as this module relies heavily 
on horde api calls.

Tricky. Any ideas? I dont't have a solution for this.
Changing the order from a)b)c) to c)b)a) does not seem to work.
We might have to disallow api calls within conf.php and prefs.php and 
get the address_books somewhere/times else.

  Karsten



More information about the kronolith mailing list