Just committed a rework of the links class in the api:
- new public egw_link class, which has only static methods and can NOT
be instantiated
- depricated bolink class, for existing code instanciating the bolink
class in $egw->link
- new method and application hook titles to retrieve the title of
multiple entries of an app in one go
- new method get_links_multiple to retrieve all links of multiple
entries of an app and (by default but optionally) cache all titles
==> the main reason for the rework is to allow apps like infolog, which
show by default all linked entries on their index page/list, to run a
lot faster.
So far InfoLog made a call to bolink for each entry to retrieve the
links (which resulted in one query to retrieve the links and (not yet
changed) a lot queries by the old vfs to get the attachments). For each
found link, infolog called again the link-class to retrieve the title
(which resulted in one query of the linked app to retrieve the entry and
compute the title).
With the new methods InfoLog’s get_rows method, call
egw_link::get_links_multiple to retrieve the links to all displayed
entries (which results in one query to retrieve all links, plus (still)
one query per entry to get the attachments (I will fix that once we
fully move to the new vfs). get_links_multiple caches by default (can be
overide by a parameter) the titles for all returned links. To cache the
titles, it aggregates the links to entries of the same app and tries to
call the titles method of that app, to allow the app to retrieve all
titles in a single sql-query.
==> an other reason for the rework was to get static methods, which dont
require the link-class to be instanciated. It also uses now
foreach(egw_db::select() as $row) too loop over the result sets and
requires no longer an own clone of the global db object.
Ralf
Ralf Becker
eGroupWare Training & Support ==> http://www.egroupware-support.de
Outdoor Unlimited Training GmbH [www.outdoor-training.de]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 (0)631 31657-0
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft® Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers