@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | // assume this is either a standalone install, or installed as Composer dependency |
21 | 21 | /// @todo if the latter is true, should we just not skip using the custom Autoloader, and let a top-level |
22 | 22 | /// debugger include this one, taking care of autoloading? |
23 | - include_once __DIR__ . "/../src/Autoloader.php"; |
|
23 | + include_once __DIR__."/../src/Autoloader.php"; |
|
24 | 24 | PhpXmlRpc\Autoloader::register(); |
25 | 25 | } |
26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | // Variables that shouldn't be unset |
37 | - $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); |
|
37 | + $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); |
|
38 | 38 | |
39 | 39 | $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, |
40 | 40 | isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array() |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | function stripslashes_deep($value) |
55 | 55 | { |
56 | 56 | $value = is_array($value) ? |
57 | - array_map('stripslashes_deep', $value) : |
|
58 | - stripslashes($value); |
|
57 | + array_map('stripslashes_deep', $value) : stripslashes($value); |
|
59 | 58 | |
60 | 59 | return $value; |
61 | 60 | } |
@@ -105,7 +104,7 @@ discard block |
||
105 | 104 | $path = isset($_GET['path']) ? $_GET['path'] : ''; |
106 | 105 | // in case user forgot initial '/' in xmlrpc server path, add it back |
107 | 106 | if ($path && ($path[0]) != '/') { |
108 | - $path = '/' . $path; |
|
107 | + $path = '/'.$path; |
|
109 | 108 | } |
110 | 109 | |
111 | 110 | if (isset($_GET['debug']) && ($_GET['debug'] == '1' || $_GET['debug'] == '2')) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | // Make sure we set the correct charset type for output, so that we can display all characters |
18 | 18 | header('Content-Type: text/html; charset=utf-8'); |
19 | 19 | |
20 | -include __DIR__ . '/common.php'; |
|
20 | +include __DIR__.'/common.php'; |
|
21 | 21 | if ($action == '') { |
22 | 22 | $action = 'list'; |
23 | 23 | } |
@@ -33,24 +33,24 @@ discard block |
||
33 | 33 | /// @const JSXMLRPC_PATH Path to the visual xmlrpc editing dialog's containing folder. Can be absolute, or |
34 | 34 | /// relative to this debugger's folder. |
35 | 35 | if (defined('JSXMLRPC_PATH')) { |
36 | - $editorpaths = array(JSXMLRPC_PATH[0] === '/' ? JSXMLRPC_PATH : (__DIR__ . '/' . JSXMLRPC_PATH)); |
|
36 | + $editorpaths = array(JSXMLRPC_PATH[0] === '/' ? JSXMLRPC_PATH : (__DIR__.'/'.JSXMLRPC_PATH)); |
|
37 | 37 | } else { |
38 | 38 | $editorpaths = array( |
39 | - __DIR__ . '/vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer in debugger |
|
40 | - __DIR__ . '/node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm in debugger |
|
41 | - __DIR__ . '/../vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer |
|
42 | - __DIR__ . '/../node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm |
|
43 | - __DIR__ . '/../../jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc too |
|
39 | + __DIR__.'/vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer in debugger |
|
40 | + __DIR__.'/node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm in debugger |
|
41 | + __DIR__.'/../vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer |
|
42 | + __DIR__.'/../node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm |
|
43 | + __DIR__.'/../../jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc too |
|
44 | 44 | ); |
45 | 45 | } |
46 | - foreach($editorpaths as $editorpath) { |
|
47 | - if (is_file(realpath($editorpath . 'visualeditor.html'))) { |
|
46 | + foreach ($editorpaths as $editorpath) { |
|
47 | + if (is_file(realpath($editorpath.'visualeditor.html'))) { |
|
48 | 48 | $haseditor = true; |
49 | 49 | break; |
50 | 50 | } |
51 | 51 | } |
52 | 52 | if ($haseditor) { |
53 | - $editorurlpath = preg_replace('|^' . preg_quote(__DIR__, '|') .'|', '', $editorpath); |
|
53 | + $editorurlpath = preg_replace('|^'.preg_quote(__DIR__, '|').'|', '', $editorpath); |
|
54 | 54 | |
55 | 55 | /// @todo for cases 3, 4 and 5 above, look at `parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)` and check if the |
56 | 56 | /// web root is not pointing directly at this folder, as in that case the link to the visualeditor will not |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | function activateeditor() { |
231 | - var url = '<?php echo $editorurlpath; ?>visualeditor.html?params=<?php echo str_replace(array("\\", "'"), array( "\\\\","\\'"), $alt_payload); ?>'; |
|
231 | + var url = '<?php echo $editorurlpath; ?>visualeditor.html?params=<?php echo str_replace(array("\\", "'"), array("\\\\", "\\'"), $alt_payload); ?>'; |
|
232 | 232 | if (document.frmaction.wstype.value == "1") |
233 | 233 | url += '&type=jsonrpc'; |
234 | 234 | var wnd = window.open(url, '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1'); |
@@ -265,9 +265,9 @@ discard block |
||
265 | 265 | echo ' document.forms[2].submit();'; |
266 | 266 | } ?>"> |
267 | 267 | <h1>XMLRPC |
268 | - <form name="frmxmlrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(0);" <?php if (!class_exists('\PhpXmlRpc\Client')) { echo 'disabled="disabled"';} ?>/></form> |
|
268 | + <form name="frmxmlrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(0);" <?php if (!class_exists('\PhpXmlRpc\Client')) { echo 'disabled="disabled"'; } ?>/></form> |
|
269 | 269 | / |
270 | - <form name="frmjsonrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(1);" <?php if (!class_exists('\PhpXmlRpc\JsonRpc\Client')) { echo 'disabled="disabled"';} ?>/></form> |
|
270 | + <form name="frmjsonrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(1);" <?php if (!class_exists('\PhpXmlRpc\JsonRpc\Client')) { echo 'disabled="disabled"'; } ?>/></form> |
|
271 | 271 | JSONRPC Debugger (based on the <a href="https://gggeek.github.io/phpxmlrpc/">PHP-XMLRPC</a> library) |
272 | 272 | </h1> |
273 | 273 | <form name="frmaction" method="get" action="action.php" target="frmaction" onSubmit="switchFormMethod();"> |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | </select> |
331 | 331 | </td> |
332 | 332 | <td class="labelcell">Timeout:</td> |
333 | - <td><input type="text" name="timeout" size="3" value="<?php if ($timeout > 0) { echo $timeout; } ?>"/></td> |
|
333 | + <td><input type="text" name="timeout" size="3" value="<?php if ($timeout>0) { echo $timeout; } ?>"/></td> |
|
334 | 334 | <td></td> |
335 | 335 | <td></td> |
336 | 336 | </tr> |