comanage-dev - [comanage-dev] r239 - in registry/trunk/app: Controller Model
Subject: COmanage Developers List
List archive
- From:
- To:
- Subject: [comanage-dev] r239 - in registry/trunk/app: Controller Model
- Date: Mon, 27 Feb 2012 16:12:08 -0500
Author: marie
Date: 2012-02-27 16:12:08 -0500 (Mon, 27 Feb 2012)
New Revision: 239
Modified:
registry/trunk/app/Controller/CoPeopleController.php
registry/trunk/app/Controller/CoPersonRolesController.php
registry/trunk/app/Model/CoPerson.php
Log:
co232
Modified: registry/trunk/app/Controller/CoPeopleController.php
===================================================================
--- registry/trunk/app/Controller/CoPeopleController.php 2012-02-25
02:44:29 UTC (rev 238)
+++ registry/trunk/app/Controller/CoPeopleController.php 2012-02-27
21:12:08 UTC (rev 239)
@@ -70,7 +70,7 @@
parent::beforeFilter();
// generate list of sponsors
- $this->set('sponsors', $this->CoPerson->sponsorList());
+ $this->set('sponsors',
$this->CoPerson->sponsorList($this->cur_co['Co']['id']));
}
/**
Modified: registry/trunk/app/Controller/CoPersonRolesController.php
===================================================================
--- registry/trunk/app/Controller/CoPersonRolesController.php 2012-02-25
02:44:29 UTC (rev 238)
+++ registry/trunk/app/Controller/CoPersonRolesController.php 2012-02-27
21:12:08 UTC (rev 239)
@@ -165,7 +165,7 @@
}
// generate list of sponsors
- $this->set('sponsors',$this->CoPersonRole->CoPerson->sponsorList());
+
$this->set('sponsors',$this->CoPersonRole->CoPerson->sponsorList($this->cur_co['Co']['id']));
}
/**
Modified: registry/trunk/app/Model/CoPerson.php
===================================================================
--- registry/trunk/app/Model/CoPerson.php 2012-02-25 02:44:29 UTC (rev
238)
+++ registry/trunk/app/Model/CoPerson.php 2012-02-27 21:12:08 UTC (rev
239)
@@ -148,11 +148,14 @@
* @return Array Array with co_person id as keys and full name as values
*/
- public function sponsorList() {
+ public function sponsorList($co_id) {
// Query database for people
+ $args = array(
+ 'contain' => array('Name'),
+ 'order' => array('Name.family ASC'),
+ 'conditions' => array('CoPerson.co_id' => $co_id)
+ );
- $args['contain'][] = 'Name';
- $args['order'][] = 'Name.family ASC';
$nameData = $this->find('all', $args);
// Make data human readable for dropdown, keyed by id
- [comanage-dev] r239 - in registry/trunk/app: Controller Model, svnlog, 02/27/2012
Archive powered by MHonArc 2.6.16.