comanage-dev - [comanage-dev] Re: CO-229 and deleting COUs
Subject: COmanage Developers List
List archive
- From: Scott Koranda <>
- To: comanage-dev <>
- Subject: [comanage-dev] Re: CO-229 and deleting COUs
- Date: Tue, 13 Mar 2012 16:51:46 -0500
On Tue, Mar 13, 2012 at 4:23 PM, Scott Koranda
<>
wrote:
> Hi,
>
> CouController.php contains this code in the checkDeleteDependencies()
> method when it is trying to determine if the Cou has any
> children:
>
> foreach($this->cur_co['Cou'] as $k => $v)
> {
> if($v['parent_id'] == $curdata['Cou']['id'])
> {
> if($this->restful)
> $this->restResultHeader(403, "Child COU Exists");
> else
> $this->Session->setFlash(_txt('er.cou.child',
> array(Sanitize::html($curdata['Cou']['name']))), '', array(), 'error');
>
> return(false);
> }
> }
>
>
> Is there any reason that cannot be replaced by
>
> $childCOUs = $curdata['Cou']['ChildCou'];
Should be
$childCOUs = $curdata['ChildCou'];
Question is the same...
> if (!empty($childCOUs)){
> if($this->restful)
> $this->restResultHeader(403, "Child COU Exists");
> else
> $this->Session->setFlash(_txt('er.cou.child',
> array(Sanitize::html($curdata['Cou']['name']))), '', array(), 'error');
>
> }
>
> Put another way, since the Cou model has a field where it
> keeps track of its children, why not just check for children?
>
> Thanks,
>
> Scott
- [comanage-dev] CO-229 and deleting COUs, Scott Koranda, 03/13/2012
- [comanage-dev] Re: CO-229 and deleting COUs, Scott Koranda, 03/13/2012
- Message not available
- Re: [comanage-dev] Re: CO-229 and deleting COUs, Scott Koranda, 03/14/2012
- Message not available
- [comanage-dev] Re: CO-229 and deleting COUs, Scott Koranda, 03/13/2012
Archive powered by MHonArc 2.6.16.