function _install() { global $tikilib; $data = $this->getData(); $this->replaceReferences($data); require_once 'lib/webservicelib.php'; $ws = Tiki_Webservice::create($data['name']); $ws->url = $data['url']; $ws->body = $data['body']; $ws->schemaVersion = $data['schema_version']; $ws->schemaDocumentation = $data['schema_documentation']; $ws->save(); return $ws->getName(); }
$smarty->assign('nt_content', $template->content); } if (isset($_REQUEST['add'])) { $pos = key($_REQUEST['add']); if (isset($templates[$pos])) { $template = $templates[$pos]; $smarty->assign('nt_engine', $template['engine']); $smarty->assign('nt_output', $template['output']); $smarty->assign('nt_content', $template['content']); } } // Create new registered service if (isset($_REQUEST['new_name'])) { $name = $_REQUEST['new_name']; if (!empty($name) && !Tiki_Webservice::getService($name)) { if ($service = Tiki_Webservice::create($name)) { $service->url = $url; $service->wstype = $wstype; $service->body = $body; $service->operation = $operation; $service->schemaDocumentation = $response->schemaDocumentation; $service->schemaVersion = $response->schemaVersion; $service->save(); $webservice = $service; } else { TikiLib::lib('errorreport')->report(tr('Webservice error "%0" not saved (alpha characters only)', $name)); $webservice = new Tiki_Webservice(); $webservice->url = $url; $webservice->wstype = $wstype; $webservice->body = $body; $webservice->operation = $operation;