/** * Handle uploads * * @param $sAction uploader 'action' name * @return HTML output, usually this is HTML with JS output * to the hidden iframe code which displays alert in case of error, * or form with uploaded file in case of success. */ function serviceAcceptUpload($sAction) { $sCode = ''; $aUploaders = $this->oModule->_oConfig->getUploaders(); foreach ($aUploaders as $k => $r) { if ($sAction != $r['action']) { continue; } if (is_array($r['handle'])) { $sCode = BxDolService::callArray($r['handle']); } elseif (is_string($r['handle']) && method_exists($this, $r['handle'])) { $sCode = $this->{$r['handle']}(); } break; } return $sCode; }