diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | conf/.gitignore | 2 | ||||
-rw-r--r-- | graph.php | 12 | ||||
-rw-r--r-- | plugin/local/README.md | 1 |
4 files changed, 9 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..543f45a --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | conf/config.local.php | ||
2 | plugin/local/*.json | ||
diff --git a/conf/.gitignore b/conf/.gitignore deleted file mode 100644 index 880b7c3..0000000 --- a/conf/.gitignore +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | config.local.php | ||
2 | plugin | ||
@@ -44,14 +44,14 @@ if(function_exists('json_decode')) | |||
44 | if (is_null($plugin_json)) | 44 | if (is_null($plugin_json)) |
45 | error_log('CGP Error: invalid json in plugin/'.$plugin.'.json'); | 45 | error_log('CGP Error: invalid json in plugin/'.$plugin.'.json'); |
46 | } | 46 | } |
47 | if (file_exists('conf/plugin/'.$plugin.'.json')) { | 47 | if (file_exists('plugin/local/'.$plugin.'.json')) { |
48 | $json = file_get_contents('conf/plugin/'.$plugin.'.json'); | 48 | $json = file_get_contents('plugin/local/'.$plugin.'.json'); |
49 | $user_plugin_json = json_decode($json, true); | 49 | $plugin_json_local = json_decode($json, true); |
50 | 50 | ||
51 | if (is_null($user_plugin_json)) | 51 | if (is_null($plugin_json_local)) |
52 | error_log('CGP Error: invalid json in conf/plugin/'.$plugin.'.json'); | 52 | error_log('CGP Error: invalid json in plugin/local/'.$plugin.'.json'); |
53 | 53 | ||
54 | $plugin_json = array_replace_recursive($plugin_json, $user_plugin_json); | 54 | $plugin_json = array_replace_recursive($plugin_json, $plugin_json_local); |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
diff --git a/plugin/local/README.md b/plugin/local/README.md new file mode 100644 index 0000000..d66f1d7 --- /dev/null +++ b/plugin/local/README.md | |||
@@ -0,0 +1 @@ | |||
Put your local plugins (or modified versions of CGP plugins) here. | |||