This index allows a fulltext search over all applications (or of
cause also a single app).
Whenever an applications stores an entry it calls:
boolean egw_index::save($app,$id,$owner,array $fields,array $cat_id=null)
which calls, as the application do when is deletes an entry (!),
boolean egw_index::delete($app,$id)
and then splits all fields into keywords and add these to the index by
boolean private egw_index::add($app,$id,$keyword).
Applications can then use the index to search for a given keyword
(and optional application):
array egw_index::search($keyword,$app=null) or
foreach(new egw_index($keyword,$app=null) as $app_id => $title)
To also allow to search by a category or keyword part of it, the index
also tracks the categories of the entries. Applications can choose to
only use it for category storage, or cat do it redundant in there own
table too. To retrieve the categories of one or multiple entries:
array egw_index::cats($app,$ids)
Applications can use a sql (sub-)query to get the id's of there app
matching a certain keyword and include that in there own queries:
string egw_index::sql_ids_by_keyword($app,$keyword)
Please note: the index knows nothing about ACL, so it's the task of
the application to ensure ACL rights.
- new public egw_link class, which has only static methods and can NOT be instanciated
- 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
- read rights are not checks in each traversed directory (via sql in a single query to locate the path)
- diropen additionally checks for execute rights
- fopen checks for read or write depending on the mode
- chmod, chgrp, chown methods in sqlfs and egw_vfs/vfs plus an egw_vfs::$is_root var used to grant root rights (no access controll and chown or chgrp without being the owner of a file)
- find method (some more params to come) to recursivly search and optionaly execute some callback
- egw_vfs::remove doing a "rm -r" / recursive remove or dirs and files
- new files or dirs inherit the perms and ownership from the parent directory (no umask)
- files/dirs the user has no read rights, in a directory where he has no write rights, get hidden (eg. not showing all the other users / groups home dirs
- many new cli commands (chmod, chgrp, chown, find), recursive option for most commands and the ability to use it with root rights, see the usage message if called without options
- "cp -r -p" to copy a whole tree incl. ownership and perms, eg. backing up /home to /backup
Attribs: Stephan Becker: Code, identified the Javascript culprits
Wim Bonis: Code, Race condition
Klaus Leithhoff: Code, mbstring writes a different length to that that it reads
Lars Volker: Code, Debug memcache slab memory, memcache add as lock.