diff options
Diffstat (limited to 'lib/sfIsisImporter.class.php')
-rw-r--r-- | lib/sfIsisImporter.class.php | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/sfIsisImporter.class.php b/lib/sfIsisImporter.class.php index 5ab3260..6ab526d 100644 --- a/lib/sfIsisImporter.class.php +++ b/lib/sfIsisImporter.class.php @@ -199,33 +199,30 @@ class sfIsisImporter extends sfIsisImporterRelations * @param string $model Model name * @param array $field Field data from ISIS database schema * @return boolean True if has a denied combination, false otherwise - * @todo Wildcard + * @todo Wildcard support * @todo Test */ public function hasDeniedCombinations($model, $field) { - if (method_exists($this, 'getDeniedCombinations')) + foreach ($this->isis->getDeniedCombinations($field) as $combination) { - foreach ($this->getDeniedCombinations($model, $field) as $combination) - { - $has = true; + $has = true; - foreach ($combination as $item) + foreach ($combination as $item) + { + foreach (new IsisRowIterator($this->isis, $field) as $row) { - foreach (new IsisRowIterator($this->isis, $field) as $row) + if (!$this->hasDeniedItem($field, $item, $row)) { - if (!$this->hasDeniedItem($field, $item, $row)) - { - $has = false; - break 2; - } + $has = false; + break 2; } } + } - if ($has) - { - $denied[$row] = $combination; - } + if ($has) + { + $denied[$row] = $combination; } } |