Commit Graph

39 Commits

Author SHA1 Message Date
Ralf Becker
78f032e063 fixed DISTINCT leading to no data returned (eg. ctag in accounts-addressbook in eSync and CardDAV), DISTINCED added twice and not using so_sql_cf::search if no custom fields defined 2013-07-23 13:50:11 +00:00
Ralf Becker
0bca64517c fixed SQL error introduced by r43149: multiple identical rows 2013-07-23 07:57:55 +00:00
Ralf Becker
f8c184d860 * All apps/custom fields: fixed multiple identical rows, if custom fields where set (introduced in last package) 2013-07-20 15:56:41 +00:00
Ralf Becker
341342bc39 fixed not working multiple value "select-account" or "home-accounts" (rows > 1) custom fields 2013-06-12 14:12:58 +00:00
Klaus Leithoff
d37ee80161 mending Warnings: Cannot use a scalar value as an array 2011-12-20 15:57:03 +00:00
Klaus Leithoff
b76da493de * API: taking care of sorting AND filtering by customfields with names containing whitespace; (best way to deal with this issue, is not using whitespace in your customfield names at all) 2011-08-22 13:08:19 +00:00
Klaus Leithoff
b78a9865cc explicitly process fields to order by, as cutomfields may have names with spaces, so we examine each order by criteria, as our preg did not do the job properly 2010-07-08 11:37:56 +00:00
Klaus Leithoff
82e8bdbd9e allow for like wildcard.val.wildcard in filtersearch for customfields (needed for advanced search, as criteria are now remapped to be filters for customfields) 2010-07-07 14:11:33 +00:00
Klaus Leithoff
07930ecd58 fix advanced search for customfields (multiple field criteria, combined by AND) in addressbook 2010-07-07 11:38:52 +00:00
Nathan Gray
97cdb61ea5 Fix for searching with custom fields in 2010-06-18 11:15:35 +00:00
Nathan Gray
e37b4807c2 Fix searching for a given custom field value using criteria parameter 2010-06-14 10:18:23 +00:00
Klaus Leithoff
3d99f3e9b3 if is not a string but 0, the comparsion == ->autoinc_id is true, which leads to an SQL Query error, if an extra column is used in sorting/filtering together with the lettersearch 2010-05-28 11:08:36 +00:00
Ralf Becker
579cf86bbc fix for bug #2624: SQL error - CONCAT not supported by postgres 2010-05-26 15:44:09 +00:00
Nathan Gray
6c3ba68ca1 If only_keys is true, expand it in so_sql_cf so the table_name can be prepended. Fixes last part of #2543, adding link when importing mail to infolog 2010-04-21 15:40:58 +00:00
Ralf Becker
765a1d5c09 "fixed not returned (explicitly given) columns: you need to use $table.'.'.$col.' AS '.$col, without AS column get NOT returned as name is different" 2010-04-20 07:39:23 +00:00
Klaus Leithoff
a9fd21325d fixing a bug, when trying to sanitize possible ambiguous columns 2010-04-16 10:35:09 +00:00
Nathan Gray
2aed9e476f Fix copy/paste error to get address merging working 2010-04-15 14:56:37 +00:00
Nathan Gray
549626cbf9 Add some extra handling for potentially ambiguous columns in 2010-04-08 22:13:22 +00:00
Nathan Gray
215da11fae Add some extra handling for ambiguous columns 2010-04-08 20:21:40 +00:00
Nathan Gray
97727d41ce Fix filtering on a multi-select custom field. Any entry with the filter value will be included. 2010-04-07 16:06:01 +00:00
Nathan Gray
93cf9c2e84 Don't need to pass ->extra_value, search2criteria() will take care of it 2010-04-01 20:20:08 +00:00
Nathan Gray
d22773d04d Add extra search functionality to custom fields. 2010-04-01 19:59:50 +00:00
Ralf Becker
200a6d61d5 Reworked so_sql class to:
- use new egw_time::server2user() and egw_time::user2server() to do
  timezone conversation of registered timestamps
- added $timestamp_type parameter to constructor, to automatic convert
  all timestamps on read (or search) to given type, default NULL leaves
  them unchanged --> will allow in future to work completly with
  egw_time objects
2009-10-08 16:18:28 +00:00
Ralf Becker
a47dab03a4 "added $extra_cols parameter of so_sql (parent class)" 2009-09-28 12:44:44 +00:00
Ralf Becker
a4d167ef8c "fix to allow array with id's for autoinc_id" 2009-09-26 11:00:11 +00:00
Ralf Becker
ad5d2c3941 docu update and fixed so_sql_cf::delete($keys,true) to always return array 2009-09-16 10:20:34 +00:00
Ralf Becker
a8fa4383e5 "fixed typo" 2009-08-28 07:14:39 +00:00
Ralf Becker
3a3a0e1613 "fix to allow to specify multiple autoinc_id's (as eg. done in timesheet_bo::sum())" 2009-08-25 12:48:04 +00:00
Ralf Becker
19086bb7b0 Some fixes and enhancments to simplify search with so_sql
- 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
2009-08-19 12:08:52 +00:00
Ralf Becker
281502f36f allow to use an etag in so_sql_cf::save(), eg array("etag=etag+1") 2009-08-10 16:32:45 +00:00
Ralf Becker
b400e8d880 "allow a negative filter (eg. '!xyz'), NULL or array with possible values as custom field filter" 2009-08-10 15:31:49 +00:00
Ralf Becker
ae855c4979 "we explicitly need to delete custom fields, if value is empty or field allows multiple values or we have no unique index" 2009-08-10 09:12:35 +00:00
Ralf Becker
ee2b5cf164 new param to delete method only return ids: can be used in extended class for deletes in other tables 2009-07-13 08:17:41 +00:00
Ralf Becker
a5f7d8d4a3 "fix for bug #2085 - Rev. 27023 PM does no longer save custom fields" 2009-05-19 07:31:13 +00:00
Ralf Becker
d56e962ca3 "allow to store custom fields with 1:N relations (eg. multi-select-box) as real 1:N relation in the DB
(default is the old behavior!)"
2009-05-17 22:03:31 +00:00
Ralf Becker
5a22640c82 - changed return value of search() to NULL instead false, if nothing
found, as this can be simply casted with (array) to work in foreach
- documentation update
2009-05-03 18:36:38 +00:00
Ralf Becker
b7444a9598 "fix for bug #2025: Database error in Timesheet with selected view category/date" 2009-04-01 20:01:54 +00:00
Ralf Becker
bfab75389c "replace ambiguous auto-id with (an exact match of) table_name.autoid" 2009-04-01 13:01:16 +00:00
Ralf Becker
1b4d236d4a New class extending so_sql handing all custom fields needs: reading,
saving, searching, ordering and filtering
Makeing a full custom field implementation like in addressbook very easy
and quick
2009-01-17 03:36:58 +00:00