[fixed] Unable to delete a client
Page: 1
When I try to delete a client (which is no more linked to a project and which doesn't contain a user) I get this message:
Failed to delete selected client company
Ilija Studen
on Jul 8. 2006. 5:21 am
Fixed. Change will be available in SVN as soon as I commit, but SVN is a bit broken so I'd recommend that you manualy fix this one.
1. Open /application/models/companies/Company.class.php
2. Find delete() function
3. Replace it with this code:
1. Open /application/models/companies/Company.class.php
2. Find delete() function
3. Replace it with this code:
/**
* Delete this company and all related data
*
* @access public
* @param void
* @return boolean
* @throws Error
*/
function delete() {
if($this->isOwner()) throw new Error(lang('error delete owner company'));
// Users
$users = $this->getUsers();
if(is_array($users) && count($users)) {
foreach($users as $user) $user->delete();
} // if
// Delete self
return parent::delete();
} // delete
activeCollab team member
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.



