[patch] Fixes for retreiving client list
"Jason M. Felice" <[email protected]>
| Newsgroups | gmane.comp.horde.whups |
|---|---|
| Message-ID | <[email protected]> |
1) If both module and ticket are specified, use the ticket to find clients. 2) Fix calls to getClients() to only specify module or ticket anyway. -- Whups mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
whups-client-fix.diff
(text/plain, 1.4 KB)
patchwork diff Driver.php
--- Driver.php Fri Dec 5 09:00:50 2003
+++ Driver.php Fri Dec 5 09:00:57 2003
@@ -94,12 +94,12 @@
$link_data['link_params'] = array('link_type' => $link_type,
'from_application' => $from_application,
'to_application' => $to_application);
- if (!empty($module)) {
- $link_data['from_params'] = array('from_key' => 'module_id',
- 'from_value' => $module);
- } elseif (!empty($ticket)) {
+ if (!empty($ticket)) {
$link_data['from_params'] = array('from_key' => 'ticket_id',
'from_value' => $ticket);
+ } elseif (!empty($module)) {
+ $link_data['from_params'] = array('from_key' => 'module_id',
+ 'from_value' => $module);
}
if (!empty($link_data['from_params'])) {
patchwork diff Driver/sql.php
--- Driver/sql.php Fri Dec 5 09:05:49 2003
+++ Driver/sql.php Fri Dec 5 09:05:13 2003
@@ -893,7 +893,7 @@
}
/* Add the client name for this ticket. */
- $client_name = Whups::getClients($result[0]['module'], $result[0]['id']);
+ $client_name = Whups::getClients(null, $result[0]['id']);
$result[0]['_client_name'] = !empty($client_name) ? $client_name : '';
return $result[0];