diff --git a/var/IXR/Server.php b/var/IXR/Server.php index 75209d5e..d613a37c 100644 --- a/var/IXR/Server.php +++ b/var/IXR/Server.php @@ -40,7 +40,6 @@ class Server $this->setCapabilities(); $this->callbacks = $callbacks; $this->setCallbacks(); - $this->serve(); } /** @@ -298,7 +297,7 @@ class Server /** * 服务入口 */ - private function serve() + public function serve() { $message = new Message(file_get_contents('php://input') ?: ''); diff --git a/var/Widget/XmlRpc.php b/var/Widget/XmlRpc.php index 5f552adf..3bd06b18 100644 --- a/var/Widget/XmlRpc.php +++ b/var/Widget/XmlRpc.php @@ -1532,7 +1532,7 @@ class XmlRpc extends Contents implements ActionInterface, Hook [ 'isAdmin' => $this->user->pass('administrator', true), 'url' => $this->options->siteUrl, - 'blogid' => '1', + 'blogid' => 1, 'blogName' => $this->options->title, 'xmlrpc' => $this->options->xmlRpcUrl ] @@ -1897,7 +1897,9 @@ EOF; } /** 直接把初始化放到这里 */ - new Server($api); + $server = new Server($api); + $server->setHook($this); + $server->serve(); } }