aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2015-06-22 10:26:24 +0200
committerPim van den Berg2015-06-22 10:26:24 +0200
commit3fe58691d1891d2f850d94298d98f2b8d2b76c1c (patch)
tree780c22fba0d158af84354e64272a986bdb3319b2
parentMerge branch 'local_plugins' (diff)
downloadapt-panopticon_cgp-3fe58691d1891d2f850d94298d98f2b8d2b76c1c.zip
apt-panopticon_cgp-3fe58691d1891d2f850d94298d98f2b8d2b76c1c.tar.gz
apt-panopticon_cgp-3fe58691d1891d2f850d94298d98f2b8d2b76c1c.tar.bz2
apt-panopticon_cgp-3fe58691d1891d2f850d94298d98f2b8d2b76c1c.tar.xz
plugin: move local plugins from conf/plugin to plugin/local
-rw-r--r--.gitignore2
-rw-r--r--conf/.gitignore2
-rw-r--r--graph.php12
-rw-r--r--plugin/local/README.md1
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 @@
1conf/config.local.php
2plugin/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 @@
1config.local.php
2plugin
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'))
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.