From 3fe58691d1891d2f850d94298d98f2b8d2b76c1c Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 22 Jun 2015 10:26:24 +0200 Subject: plugin: move local plugins from conf/plugin to plugin/local --- .gitignore | 2 ++ conf/.gitignore | 2 -- graph.php | 12 ++++++------ plugin/local/README.md | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .gitignore delete mode 100644 conf/.gitignore create mode 100644 plugin/local/README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..543f45a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +conf/config.local.php +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 @@ -config.local.php -plugin diff --git a/graph.php b/graph.php index 83d6caa..d4242ea 100644 --- a/graph.php +++ b/graph.php @@ -44,14 +44,14 @@ if(function_exists('json_decode')) if (is_null($plugin_json)) error_log('CGP Error: invalid json in plugin/'.$plugin.'.json'); } - if (file_exists('conf/plugin/'.$plugin.'.json')) { - $json = file_get_contents('conf/plugin/'.$plugin.'.json'); - $user_plugin_json = json_decode($json, true); + if (file_exists('plugin/local/'.$plugin.'.json')) { + $json = file_get_contents('plugin/local/'.$plugin.'.json'); + $plugin_json_local = json_decode($json, true); - if (is_null($user_plugin_json)) - error_log('CGP Error: invalid json in conf/plugin/'.$plugin.'.json'); + if (is_null($plugin_json_local)) + error_log('CGP Error: invalid json in plugin/local/'.$plugin.'.json'); - $plugin_json = array_replace_recursive($plugin_json, $user_plugin_json); + $plugin_json = array_replace_recursive($plugin_json, $plugin_json_local); } } 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. -- cgit v1.1