comanage-dev - [comanage-dev] r627 - registry/trunk/app/Model
Subject: COmanage Developers List
List archive
- From:
- To:
- Subject: [comanage-dev] r627 - registry/trunk/app/Model
- Date: Wed, 6 Nov 2013 08:17:29 -0500
Author: benno
Date: 2013-11-06 08:17:29 -0500 (Wed, 06 Nov 2013)
New Revision: 627
Modified:
registry/trunk/app/Model/CoEnrollmentAttribute.php
Log:
Fix mapping of $ENV attributes when model is plural
Modified: registry/trunk/app/Model/CoEnrollmentAttribute.php
===================================================================
--- registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-10-27 12:27:03
UTC (rev 626)
+++ registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-11-06 13:17:29
UTC (rev 627)
@@ -635,9 +635,11 @@
$key = "";
if(!empty($model[1])) {
- // Inflect the associated model name
+ // Inflect the associated model name, minus any model ID
+ // (ie: we want "EmailAddress", not "EmailAddress.3")
- $key = Inflector::pluralize(Inflector::tableize($model[1])) . ":";
+ $m = explode(".", $model[1], 2);
+ $key = Inflector::pluralize(Inflector::tableize($m[0])) . ":";
}
$key .= $enrollmentAttributes[$i]['field'];
- [comanage-dev] r627 - registry/trunk/app/Model, svnlog, 11/06/2013
Archive powered by MHonArc 2.6.16.