<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
  <title>aC forum: [fixed] Unable to delete a client</title>
  <link>http://www.activecollab.com/forums/topic/50/</link>
  <description>Recent posts on topic: [fixed] Unable to delete a client</description>
  <dc:language>en-us</dc:language>
  <pubDate>Sun, 23 Nov 2008 11:16:56 UTC</pubDate>
  
  <item>
    <link>http://www.activecollab.com/forums/post/191/#post191</link>
    <guid>http://www.activecollab.com/forums/post/191/#post191</guid>
    <title>Post #2 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p>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.<br />
<br />
1. Open /application/models/companies/Company.class.php<br />
2. Find delete() function<br />
3. Replace it with this code:<br />
<br />
<pre name="code" class="html">/**
* Delete this company and all related data
*
* @access public
* @param void
* @return boolean
* @throws Error
*/
function delete() {
  if($this-&gt;isOwner()) throw new Error(lang('error delete owner company'));
  
  // Users
  $users = $this-&gt;getUsers();
  if(is_array($users) &amp;&amp; count($users)) {
    foreach($users as $user) $user-&gt;delete();
  } // if
  
  // Delete self
  return parent::delete();
} // delete</pre></p>]]></description>
    <pubDate>Sat, 08 Jul 2006 05:21:41 UTC</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/158/#post158</link>
    <guid>http://www.activecollab.com/forums/post/158/#post158</guid>
    <title>Post #1 by remi</title>
    <dc:creator>remi</dc:creator>
    <description><![CDATA[<p>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:<br />
<br />
<div class="postQuote"><blockquote>Failed to delete selected client company</blockquote></div></p>]]></description>
    <pubDate>Sat, 08 Jul 2006 01:33:24 UTC</pubDate>
  </item>
</channel>
</rss>