diff -r 368a07e59bfe -r 72df14a56a03 includes/clientside/tinymce/plugins/spellchecker/rpc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/includes/clientside/tinymce/plugins/spellchecker/rpc.php Sun Dec 21 17:56:32 2008 -0500 @@ -0,0 +1,111 @@ +decode($raw); + +// Execute RPC +if (isset($config['general.engine'])) { + $spellchecker = new $config['general.engine']($config); + $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']); +} else + die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + +// Request and response id should always be the same +$output = array( + "id" => $input->id, + "result" => $result, + "error" => null +); + +// Return JSON encoded string +echo $json->encode($output); + +?> \ No newline at end of file