We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62cde81 commit daff16fCopy full SHA for daff16f
config_to_json.php
@@ -7,12 +7,10 @@
7
*
8
*/
9
10
-chdir(__DIR__); // cwd to the directory containing this script
+$init_modules = array();
11
+require __DIR__ . '/includes/init.php';
12
-// check if we are running through the CLI, otherwise abort
13
-if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
14
- $config['install_dir'] = __DIR__;
15
- include_once 'includes/defaults.inc.php';
16
- include_once 'config.php';
+if (isCli()) {
+ global $config;
17
echo json_encode($config);
18
}
0 commit comments