6.0.0-alpha10
5/17/25

[#6165] Unable to delete a client
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

History
01/29/2008 09:50:04 PM Chuck Hagenbuch Comment #4
Assigned to Chuck Hagenbuch
State ⇒ Resolved
Reply to this comment
Fixed now, thanks.
01/29/2008 02:52:25 PM paul (dot) g (dot) roy (at) uottawa (dot) ca Comment #3 Reply to this comment
No luck here either.



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
01/29/2008 05:29:20 AM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Can you please see if this commit fixes it for you?



http://cvs.horde.org/diff.php?r1=1.24&r2=1.25&f=midas%2Fclients%2Fdelete.php
01/28/2008 09:35:19 PM paul (dot) g (dot) roy (at) uottawa (dot) ca Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Unable to delete a client
Queue ⇒ Midas
State ⇒ Unconfirmed
Reply to this comment
Cannot delete an existing client. The Delete button simply cycles back 
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


Saved Queries