Summary | Searching with more than one strict fields |
Queue | Turba |
Queue Version | 2.3.1 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | tinu (at) humbapa (dot) ch |
Created | 01/20/2009 (6015 days ago) |
Due | |
Updated | 02/16/2009 (5988 days ago) |
Assigned | 02/10/2009 (5994 days ago) |
Resolved | 02/16/2009 (5988 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
State ⇒ Resolved
http://cvs.horde.org/diff.php/turba/docs/CHANGES?rt=horde&r1=1.472&r2=1.473&ty=u
http://cvs.horde.org/diff.php/turba/lib/Driver.php?rt=horde&r1=1.226&r2=1.227&ty=u
Assigned to Chuck Hagenbuch
Taken from
define('AUTH_HANDLER', true);
require '../lib/base.php';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$auth = &Auth::singleton($conf['auth']['driver']);
$auth->setAuth('chuck', array());
require './lib/base.php';
$driver = Turba_Driver::singleton('jenn');
if (is_a($driver, 'PEAR_Error')) {
var_dump($driver);
exit(1);
}
$content = array('__type' => 'Group', '__owner' => 'chuck', 'name' =>
'DinnerParty');
$result = $driver->search($content);
var_dump($result);
State ⇒ Assigned
lists in turba. Right now I do this via api-call:
$apiargs = array(
'content' => array(
'__type' => 'Group',
'__members' => serialize($this->_vars->get('students')),
'name' => $this->_vars->get('contact_list')),
'contentType' => 'array',
'source' => $this->_vars->get('address_book')
);
$result = $registry->call('contacts/import', $apiargs);
The import methode then adds 'owner' as the second strict element and
tries to search for an allready existing entry. Without my patch this
search results in a mySQL syntax error because the two strict fields
'type' and 'owner' are not combined by 'AND' or 'OR'.
State ⇒ Feedback
New Attachment: Driver.php.patch
sorry!
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Searching with more than one strict fields
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
one strict field and some other fields as search criteria it returns a
PEAR DB Error message.
My small patch adds the missing search type to the strict_search array.
thanks!