Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r320 - registry/trunk/app/Model

Subject: COmanage Developers List

List archive

[comanage-dev] r320 - registry/trunk/app/Model


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r320 - registry/trunk/app/Model
  • Date: Fri, 20 Jul 2012 22:43:35 -0400

Author: benno
Date: 2012-07-20 22:43:35 -0400 (Fri, 20 Jul 2012)
New Revision: 320

Modified:
registry/trunk/app/Model/AppModel.php
Log:
Fix validation of default extended types (CO-391)

Modified: registry/trunk/app/Model/AppModel.php
===================================================================
--- registry/trunk/app/Model/AppModel.php 2012-07-20 03:05:45 UTC (rev
319)
+++ registry/trunk/app/Model/AppModel.php 2012-07-21 02:43:35 UTC (rev
320)
@@ -290,13 +290,19 @@
if(empty($extTypes)) {
// Use the default values

- $extTypes = $d['default'];
- }
-
- foreach(array_keys($a) as $f) {
- if(!isset($extTypes[ $a[$f] ])) {
- return false;
+ foreach(array_keys($a) as $f) {
+ if(!in_array($a[$f], $d['default'])) {
+ return false;
+ }
}
+ } else {
+ // Check the extended types
+
+ foreach(array_keys($a) as $f) {
+ if(!isset($extTypes[ $a[$f] ])) {
+ return false;
+ }
+ }
}

return true;



  • [comanage-dev] r320 - registry/trunk/app/Model, svnlog, 07/20/2012

Archive powered by MHonArc 2.6.16.

Top of Page