comanage-dev - [comanage-dev] r240 - in registry/trunk/app: Controller Model
Subject: COmanage Developers List
List archive
- From:
- To:
- Subject: [comanage-dev] r240 - in registry/trunk/app: Controller Model
- Date: Tue, 28 Feb 2012 14:09:58 -0500
Author: marie
Date: 2012-02-28 14:09:58 -0500 (Tue, 28 Feb 2012)
New Revision: 240
Modified:
registry/trunk/app/Controller/AppController.php
registry/trunk/app/Model/Cou.php
Log:
co228
Modified: registry/trunk/app/Controller/AppController.php
===================================================================
--- registry/trunk/app/Controller/AppController.php 2012-02-27 21:12:08
UTC (rev 239)
+++ registry/trunk/app/Controller/AppController.php 2012-02-28 19:09:58
UTC (rev 240)
@@ -226,7 +226,7 @@
// Include children
$this->loadModel('Cou');
- $ret['couadmin'] = $this->Cou->childCous($ret['couadmin']);
+ $ret['couadmin'] = $this->Cou->childCous($ret['couadmin'],
$this->cur_co['Co']['id']);
if($ret['couadmin'] != NULL)
sort($ret['couadmin']);
Modified: registry/trunk/app/Model/Cou.php
===================================================================
--- registry/trunk/app/Model/Cou.php 2012-02-27 21:12:08 UTC (rev 239)
+++ registry/trunk/app/Model/Cou.php 2012-02-28 19:09:58 UTC (rev 240)
@@ -135,10 +135,10 @@
* @return Array Names
*/
- public function childCous($parentCou) {
+ public function childCous($parentCou, $co_id) {
// Convert names to id numbers
- // XXX COU names are not guaranteed to be unique
- $conditions = array("Cou.name" => $parentCou);
+ $conditions = array("Cou.name" => $parentCou,
+ "Cou.co_id" => $co_id);
$parentData = $this->find('all', array('conditions' => $conditions));
$parentData = Set::extract($parentData, '{n}.Cou.id');
- [comanage-dev] r240 - in registry/trunk/app: Controller Model, svnlog, 02/28/2012
Archive powered by MHonArc 2.6.16.