summaryrefslogtreecommitdiff
path: root/lib/plugins/popularity/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/popularity/helper.php')
-rw-r--r--lib/plugins/popularity/helper.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php
index e99f6a60c..27755b0ed 100644
--- a/lib/plugins/popularity/helper.php
+++ b/lib/plugins/popularity/helper.php
@@ -253,9 +253,26 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
$data['php_exectime'] = $phptime;
$data['php_extension'] = get_loaded_extensions();
+ // plugin usage data
+ $this->_add_plugin_usage_data($data);
+
return $data;
}
+ protected function _add_plugin_usage_data(&$data){
+ $pluginsData = array();
+ trigger_event('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData);
+ foreach($pluginsData as $plugin => $d){
+ if ( is_array($d) ) {
+ foreach($d as $key => $value){
+ $data['plugin_' . $plugin . '_' . $key] = $value;
+ }
+ } else {
+ $data['plugin_' . $plugin] = $d;
+ }
+ }
+ }
+
/**
* Callback to search and count the content of directories in DokuWiki
*