summaryrefslogtreecommitdiff
path: root/lib/plugins/popularity
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2015-05-28 17:11:42 +0100
committerChristopher Smith <chris@jalakai.co.uk>2015-05-28 17:11:42 +0100
commit4b8290f563ad5ac84dd92fb8ca97ba5970c472b3 (patch)
tree7dca7c98013775628c2b4d1596e0be41d8d4bda2 /lib/plugins/popularity
parent9a734b7aaba1445e06c1ccb95e59f54e01688d45 (diff)
parent4286c64e98499b93056c09498c10709f8909befd (diff)
downloadrpg-4b8290f563ad5ac84dd92fb8ca97ba5970c472b3.tar.gz
rpg-4b8290f563ad5ac84dd92fb8ca97ba5970c472b3.tar.bz2
Merge branch 'master' into ioreplaceinfile
Diffstat (limited to 'lib/plugins/popularity')
-rw-r--r--lib/plugins/popularity/action.php2
-rw-r--r--lib/plugins/popularity/admin.php2
-rw-r--r--lib/plugins/popularity/helper.php19
-rw-r--r--lib/plugins/popularity/lang/ca/lang.php5
4 files changed, 23 insertions, 5 deletions
diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php
index 9e2e78d11..d5ec0f5c5 100644
--- a/lib/plugins/popularity/action.php
+++ b/lib/plugins/popularity/action.php
@@ -15,7 +15,7 @@ class action_plugin_popularity extends Dokuwiki_Action_Plugin {
*/
var $helper;
- function action_plugin_popularity(){
+ function __construct(){
$this->helper = $this->loadHelper('popularity', false);
}
diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php
index ab569b8b4..a2c3c6c8b 100644
--- a/lib/plugins/popularity/admin.php
+++ b/lib/plugins/popularity/admin.php
@@ -20,7 +20,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin {
var $helper;
var $sentStatus = null;
- function admin_plugin_popularity(){
+ function __construct(){
$this->helper = $this->loadHelper('popularity', false);
}
diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php
index 8673fb5af..27755b0ed 100644
--- a/lib/plugins/popularity/helper.php
+++ b/lib/plugins/popularity/helper.php
@@ -30,7 +30,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
var $popularityLastSubmitFile;
- function helper_plugin_popularity(){
+ function __construct(){
global $conf;
$this->autosubmitFile = $conf['cachedir'].'/autosubmit.txt';
$this->autosubmitErrorFile = $conf['cachedir'].'/autosubmitError.txt';
@@ -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
*
diff --git a/lib/plugins/popularity/lang/ca/lang.php b/lib/plugins/popularity/lang/ca/lang.php
index b30846118..9eb1655d2 100644
--- a/lib/plugins/popularity/lang/ca/lang.php
+++ b/lib/plugins/popularity/lang/ca/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Catalan language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Carles Bellver <carles.bellver@cent.uji.es>
* @author Carles Bellver <carles.bellver@gmail.com>
* @author carles.bellver@cent.uji.es