From fa9126f8bf23ce7dca04b58f4603ab183b33dfe8 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Nov 2010 19:11:22 -0600 Subject: [PATCH] Updated removeIngestMethodParam to work when there is no module defined for the rule but the default value 'fedora_repository' is passed. --- ContentModel.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ContentModel.inc b/ContentModel.inc index b952e2c7..4cc66976 100644 --- a/ContentModel.inc +++ b/ContentModel.inc @@ -1855,11 +1855,10 @@ class ContentModel extends XMLDatastream { $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0); $methods = $methodsEl->getElementsByTagName('ingest_method'); for ($i=0; !$found && $i < $methods->length; $i++) { - if ($methods->item($i)->getAttribute('module') == $module && $methods->item($i)->getAttribute('file') == $file && $methods->item($i)->getAttribute('class') == $class && $methods->item($i)->getAttribute('method') == $method) { + if (( trim($methods->item($i)->getAttribute('module')) == $module || (trim($methods->item($i)->getAttribute('module')) == '' && $module == 'fedora_repository')) && trim($methods->item($i)->getAttribute('file')) == $file && trim($methods->item($i)->getAttribute('class')) == $class && trim($methods->item($i)->getAttribute('method')) == $method) { $found = $methods->item($i); } } - if ($found !== FALSE) { $methodEl = $found; $paramsEl = $found->getElementsByTagName('parameters');