From 132ea51c1e21187295311e1f3134fbff587677ce Mon Sep 17 00:00:00 2001 From: gggeek Date: Sun, 18 Dec 2022 19:23:31 +0000 Subject: [PATCH] debugger: load jsxmlrpc from cdn; drop xhtml for html5; move http/https switch --- debugger/action.php | 6 ++--- debugger/controller.php | 54 +++++++++++++++++++++++------------------ debugger/index.php | 4 +-- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/debugger/action.php b/debugger/action.php index f028723c..866be2a3 100644 --- a/debugger/action.php +++ b/debugger/action.php @@ -11,10 +11,8 @@ header('Content-Type: text/html; charset=utf-8'); -?> - - +?> + <?php if (defined('DEFAULT_WSTYPE') && DEFAULT_WSTYPE == 1) echo 'JSONRPC'; else echo 'XMLRPC'; ?> Debugger diff --git a/debugger/controller.php b/debugger/controller.php index 60345df3..be85b30d 100644 --- a/debugger/controller.php +++ b/debugger/controller.php @@ -25,11 +25,16 @@ if ($action == '') { // Relative path to the visual xmlrpc editing dialog // We allow to easily configure this path via defines $editorpath = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..') . '/jsxmlrpc/debugger/'; -$editorlibs = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..') . '/jsxmlrpc/lib/'; -?> - - +if ($editorpath[0] !== '/') { + $haseditor = true;//is_file(realpath(__DIR__.'/'.$editorpath.'visualeditor.html')); +} else { + /// @todo path to editing dialog is absolute - we need to figure out where he webserver doc root is on disk, and + /// check there. We should be able to do that based on our own on-disk path... + $haseditor = false; +} + +?> + <?php if (defined('DEFAULT_WSTYPE') && DEFAULT_WSTYPE == 1) echo 'JSONRPC'; else echo 'XMLRPC'; ?> Debugger @@ -39,9 +44,11 @@ $editorlibs = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..') . '/jsxmlrpc/ top.location.replace('index.php?run=' + escape(self.location)); - - - -

Target server

+ Protocol: + Address: Port: @@ -289,14 +301,8 @@ $editorlibs = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..') . '/jsxmlrpc/ Timeout: - Protocol: - + + AUTH: diff --git a/debugger/index.php b/debugger/index.php index 2e718d4e..6ac80ba1 100644 --- a/debugger/index.php +++ b/debugger/index.php @@ -7,8 +7,8 @@ if (isset($_GET['run'])) { $query = '?' . $path['query']; } } -?> - -- 2.47.0