Mercurial > pub > Impl
diff Lib/IMPL/Web/DOM/FileNode.pm @ 151:e36ffd8c29db
Fixed major bug in conversion from a POST request to the DOM document (when instanceId == 0)
minor fixes
author | wizard |
---|---|
date | Fri, 20 Aug 2010 16:33:37 +0400 |
parents | e6447ad85cb4 |
children | 1f7a6d762394 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/DOM/FileNode.pm Fri Aug 20 08:28:43 2010 +0400 +++ b/Lib/IMPL/Web/DOM/FileNode.pm Fri Aug 20 16:33:37 2010 +0400 @@ -13,7 +13,7 @@ $this->_parameterName() or $this->_parameterName( join '/', ( map { - $_->nodeProperty('instanceId') ? + (defined $_->nodeProperty('instanceId')) ? $_->nodeName . '['.$_->nodeProperty('instanceId').']': $_->nodeName } $this->_selectParents, $this ) @@ -43,7 +43,7 @@ $target ||= $this; my $query = $this->document->nodeProperty('query') or die new IMPL::InvalidOperationException("Failed to get a CGI query from the document"); - my $hFile = $query->upload($this->parameterName) or $query->cgi_error ? die new IMPL::IOException("Failed to open the uploaded file",$query->cgi_error) : return; + my $hFile = $query->upload($this->parameterName) or die new IMPL::IOException("Failed to open the uploaded file",$query->cgi_error,$this->parameterName,$this->nodeProperty('instanceId')); my ($hTemp,$tempFileName) = tempfile(); binmode($hTemp); @@ -54,7 +54,7 @@ seek $hTemp, 0,0; { local $_ = $tempFileName; - &$sub($this,$tempFileName,$hTemp); + $sub->($this,$tempFileName,$hTemp); } }