From 63d9e8c6458d337e8f15db8e51fb0e54c6333d45 Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 16 Sep 2010 11:10:54 -0300 Subject: Minor changes due to cinisis updates --- lib/sfIsisImporter.class.php | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'lib/sfIsisImporter.class.php') 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; } } -- cgit v1.2.3