comanage-dev - [comanage-dev] r346 - in registry/trunk/app: Controller Lib
Subject: COmanage Developers List
List archive
- From:
- To:
- Subject: [comanage-dev] r346 - in registry/trunk/app: Controller Lib
- Date: Fri, 24 Aug 2012 18:36:49 -0400
Author: benno
Date: 2012-08-24 18:36:49 -0400 (Fri, 24 Aug 2012)
New Revision: 346
Modified:
registry/trunk/app/Controller/CoGroupsController.php
registry/trunk/app/Lib/lang.php
Log:
Fix name rendering when adding person to group (CO-420)
Modified: registry/trunk/app/Controller/CoGroupsController.php
===================================================================
--- registry/trunk/app/Controller/CoGroupsController.php 2012-08-24
01:34:48 UTC (rev 345)
+++ registry/trunk/app/Controller/CoGroupsController.php 2012-08-24
22:36:49 UTC (rev 346)
@@ -308,9 +308,19 @@
*/
function select() {
- // Set name for page title
- $this->set('name_for_title',
Sanitize::html(generateCn($this->Session->read('Auth.User.name'))));
-
+ // Lookup the person in question to find their name
+
+ $args = array();
+ $args['conditions']['CoPerson.id'] =
$this->request->params['named']['copersonid'];
+ $args['contain'] = 'Name';
+
+ $coPerson = $this->CoGroup->CoGroupMember->CoPerson->find('first',
$args);
+
+ if(!empty($coPerson)) {
+ // Set name for page title
+ $this->set('name_for_title',
Sanitize::html(generateCn($coPerson['Name'])));
+ }
+
// XXX proper authz here is probably something like "(all open CO groups
// and all CO groups that I own) that CO Person isn't already a member
of)"
Modified: registry/trunk/app/Lib/lang.php
===================================================================
--- registry/trunk/app/Lib/lang.php 2012-08-24 01:34:48 UTC (rev 345)
+++ registry/trunk/app/Lib/lang.php 2012-08-24 22:36:49 UTC (rev 346)
@@ -476,7 +476,7 @@
'op.edit-f' => 'Edit %1$s for %2$s',
'op.enroll' => 'Enroll',
'op.find.inv' => 'Find a Person to Invite to %1$s',
- 'op.gr.memadd' => 'Add Person %1$s to Group',
+ 'op.gr.memadd' => 'Add %1$s to Group',
'op.grm.add' => 'Add Person to %1$s Group %2$s',
'op.history' => 'View History',
'op.id.auto' => 'Autogenerate Identifiers',
- [comanage-dev] r346 - in registry/trunk/app: Controller Lib, svnlog, 08/24/2012
Archive powered by MHonArc 2.6.16.