- search($criteria,...) if $criteria is a string, search in all data
columns or - if set - $this->columns_to_search
--> that's NOT backward compatible - though a quick scan through the
EGroupware code showed no use of $criteria as string!
- this automatic search, appends and prepends '%' only, if search
pattern does NOT already contain wildcards (* or ?)
--> allows to search "test*" for values starting with test
- improved handling of db timestamps (Y-m-d H:i:s), to allow to search
for them too (eg. "2009-08-*")
- so_sql_cf::get_rows() now calls parent
- so_sql_cf::search() adds DISTINCT if query contains a join
--> ToDo: remove custom search code from apps, to give consitent search
behavior in all apps and simplify the code there
- if file already exists, show download and delete link
- if file does NOT exist, show upload box
Name or value of widget is either:
- vfs path or
- $app:$id:$relative_name (if empty($id) a temporary directory in users
home directory is created and application is responsible to move
content of that directory to the entry directory (/apps/$app/$id)
Patch is mostly created by script in egroupware/doc/fix_depricated.php in separate commit.
I do NOT advice to apply this patch to a production system (it's commited to trunk!), as the automatic modified regular expressions have a good change to break something ...
used for extensions
- if extension is called with empty name, it can set a name in
cell[name], which then get's used for the content (extensions can use
eg. an option to select the name)
- can be used via html class like:
$clean_html = html::purify($html);
- using it now in eTemplate to remove malicious code from html:
a) when displaying "formatted text"
b) when "formatted text" get's input by the user
the request. Here's an example:
$content['my-label'] = $id ? 'Edit' : 'Add';
You can use it now in the template of an nextmatch row for the label:
@@my-label
Saved the need to import these kind of data in the get_rows function
into the rows.
- on php5.3+ they get directly called via a variable: $callback($query,$rows,$readonlys)
- on php < 5.3 we instancate the class, an call the method non-static: $obj->$method($query,$rows,$readonlys)
--> allows application code to be prepared for static callbacks
Note:
- we can not use call_user_func, as it does NOT support passing by reverence, which is required for $rows and $readonlys parameter
- static callbacks allow to NOT instanciate the class again for the callback (without current dirty methods like placing the object in $GLOBALS[$class])"