Summary | Unable to delete a client |
Queue | Midas |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | chuck (at) horde (dot) org |
Requester | paul.g.roy (at) uottawa (dot) ca |
Created | 01/28/2008 (6319 days ago) |
Due | |
Updated | 01/29/2008 (6318 days ago) |
Assigned | 01/29/2008 (6318 days ago) |
Resolved | 01/29/2008 (6318 days ago) |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
I made a few changes to delete.php to get around it.
- Added line 32:
31: $form_submit = $vars->get('submitbutton');
32: $formname = $vars->get('formname');
- Wrapped redefinition of $vars in an if statement at line 44:
44: if (empty($formname)) {
45: $vars = new Variables($client);
46: }
And made one change to midas/lib/Clients.php at line 42:
40: }
41:
42: return $this->_deleteClient($client_id);
43: }
Probably not the recommended solution but it works.
Thanks
Paul
State ⇒ Feedback
http://cvs.horde.org/diff.php?r1=1.24&r2=1.25&f=midas%2Fclients%2Fdelete.php
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Unable to delete a client
Queue ⇒ Midas
State ⇒ Unconfirmed
to the delete page removing the client from the DB.
2 problems:
Problem 1 is in midas/clients/delete.php on line 43:
$vars = new Variables($client);
- this line clears the 'formname' var on submit and causes form
validation to fail and as a result line 59 is not executed
Problem 2 is in midas/lib/Clients.php in function deleteClient:
this function deletes the campaigns associated to a client, but does
not call _deleteClient($client_id) in midas/lib/Clients/sql.php to
delete the main client details in the midas_clients table
Using:
- Horde 4.0-cvs and Midas CVS update from 28 Jan 2008
- midas/clients/delete.php version is v 1.24 2008/01/02
- midas/lib/Clients.php version is v 1.23 2008/01/02
- midas/lib/Clients/sql.php version is v 1.16 2008/01/02