summaryrefslogtreecommitdiff
path: root/lib/plugins/popularity
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/popularity')
-rw-r--r--lib/plugins/popularity/action.php57
-rw-r--r--lib/plugins/popularity/admin.php277
-rw-r--r--lib/plugins/popularity/helper.php291
-rw-r--r--lib/plugins/popularity/lang/ar/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ar/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/bg/intro.txt10
-rw-r--r--lib/plugins/popularity/lang/bg/lang.php10
-rw-r--r--lib/plugins/popularity/lang/bg/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/cs/intro.txt2
-rw-r--r--lib/plugins/popularity/lang/de-informal/lang.php6
-rw-r--r--lib/plugins/popularity/lang/de-informal/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/de/lang.php7
-rw-r--r--lib/plugins/popularity/lang/de/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/el/lang.php5
-rw-r--r--lib/plugins/popularity/lang/el/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/en/lang.php9
-rw-r--r--lib/plugins/popularity/lang/en/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/es/lang.php5
-rw-r--r--lib/plugins/popularity/lang/es/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/et/lang.php6
-rw-r--r--lib/plugins/popularity/lang/fr/lang.php8
-rw-r--r--lib/plugins/popularity/lang/fr/submitted.txt2
-rw-r--r--lib/plugins/popularity/lang/he/lang.php1
-rw-r--r--lib/plugins/popularity/lang/hi/lang.php2
-rw-r--r--lib/plugins/popularity/lang/it/intro.txt6
-rw-r--r--lib/plugins/popularity/lang/it/lang.php6
-rw-r--r--lib/plugins/popularity/lang/it/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/ja/lang.php1
-rw-r--r--lib/plugins/popularity/lang/ko/lang.php1
-rw-r--r--lib/plugins/popularity/lang/la/intro.txt10
-rw-r--r--lib/plugins/popularity/lang/la/lang.php13
-rw-r--r--lib/plugins/popularity/lang/la/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/nl/intro.txt6
-rw-r--r--lib/plugins/popularity/lang/nl/lang.php5
-rw-r--r--lib/plugins/popularity/lang/nl/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/pt/lang.php4
-rw-r--r--lib/plugins/popularity/lang/pt/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/ro/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ro/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/ru/intro.txt6
-rw-r--r--lib/plugins/popularity/lang/ru/lang.php7
-rw-r--r--lib/plugins/popularity/lang/ru/submitted.txt2
-rw-r--r--lib/plugins/popularity/lang/sl/intro.txt9
-rw-r--r--lib/plugins/popularity/lang/sl/lang.php11
-rw-r--r--lib/plugins/popularity/lang/sl/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/sv/lang.php5
-rw-r--r--lib/plugins/popularity/lang/sv/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/tr/lang.php5
-rw-r--r--lib/plugins/popularity/lang/zh-tw/intro.txt11
-rw-r--r--lib/plugins/popularity/lang/zh-tw/lang.php11
-rw-r--r--lib/plugins/popularity/lang/zh-tw/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/zh/lang.php8
-rw-r--r--lib/plugins/popularity/lang/zh/submitted.txt3
-rw-r--r--lib/plugins/popularity/plugin.info.txt7
54 files changed, 663 insertions, 227 deletions
diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php
new file mode 100644
index 000000000..bf11efba6
--- /dev/null
+++ b/lib/plugins/popularity/action.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Popularity Feedback Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+require_once(DOKU_PLUGIN.'action.php');
+require_once(DOKU_PLUGIN.'popularity/admin.php');
+
+class action_plugin_popularity extends Dokuwiki_Action_Plugin {
+ var $helper;
+
+ function action_plugin_popularity(){
+ $this->helper = $this->loadHelper('popularity', false);
+ }
+
+ /**
+ * Register its handlers with the dokuwiki's event controller
+ */
+ function register(&$controller) {
+ $controller->register_hook('INDEXER_TASKS_RUN', 'AFTER', $this, '_autosubmit', array());
+ }
+
+ function _autosubmit(&$event, $param){
+ //Do we have to send the data now
+ if ( !$this->helper->isAutosubmitEnabled() || $this->_isTooEarlyToSubmit() ){
+ return;
+ }
+
+ //Actually send it
+ $status = $this->helper->sendData( $this->helper->gatherAsString() );
+
+
+ if ( $status !== '' ){
+ //If an error occured, log it
+ io_saveFile( $this->helper->autosubmitErrorFile, $status );
+ } else {
+ //If the data has been sent successfully, previous log of errors are useless
+ @unlink($this->helper->autosubmitErrorFile);
+ //Update the last time we sent data
+ touch ( $this->helper->autosubmitFile );
+ }
+
+ $event->stopPropagation();
+ $event->preventDefault();
+ }
+
+ /**
+ * Check if it's time to send autosubmit data
+ * (we should have check if autosubmit is enabled first)
+ */
+ function _isTooEarlyToSubmit(){
+ $lastSubmit = $this->helper->lastSentTime();
+ return $lastSubmit + 24*60*60*30 > time();
+ }
+}
diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php
index 71ea40799..40c3f5452 100644
--- a/lib/plugins/popularity/admin.php
+++ b/lib/plugins/popularity/admin.php
@@ -13,21 +13,15 @@ if(!defined('DOKU_INC')) die();
* need to inherit from this class
*/
class admin_plugin_popularity extends DokuWiki_Admin_Plugin {
- var $version = '2010-09-17';
+ var $version;
+ var $helper;
+ var $sentStatus = null;
+ function admin_plugin_popularity(){
+ $this->helper = $this->loadHelper('popularity', false);
- /**
- * return some info
- */
- function getInfo(){
- return array(
- 'author' => 'Andreas Gohr',
- 'email' => 'andi@splitbrain.org',
- 'date' => $this->version,
- 'name' => 'Popularity Feedback Plugin',
- 'desc' => 'Send anonymous data about your wiki to the developers.',
- 'url' => 'http://www.dokuwiki.org/plugin:popularity',
- );
+ $pluginInfo = $this->getInfo();
+ $this->version = $pluginInfo['date'];
}
/**
@@ -56,204 +50,99 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin {
* handle user request
*/
function handle() {
+ //Send the data
+ if ( isset($_REQUEST['data']) ){
+ $this->sentStatus = $this->helper->sendData( $_REQUEST['data'] );
+ if ( $this->sentStatus === '' ){
+ //Update the last time we sent the data
+ touch ( $this->helper->popularityLastSubmitFile );
+ }
+ //Deal with the autosubmit option
+ $this->_enableAutosubmit( isset($_REQUEST['autosubmit']) );
+ }
}
/**
- * Output HTML form
+ * Enable or disable autosubmit
+ * @param bool $enable If TRUE, it will enable autosubmit. Else, it will disable it.
*/
- function html() {
- echo $this->locale_xhtml('intro');
-
- flush();
- $data = $this->_gather();
- echo '<form method="post" action="http://update.dokuwiki.org/popularity.php" accept-charset="utf-8">';
- echo '<fieldset style="width: 60%;">';
- echo '<textarea class="edit" rows="10" cols="80" readonly="readonly" name="data">';
- foreach($data as $key => $val){
- if(is_array($val)) foreach($val as $v){
- echo hsc($key)."\t".hsc($v)."\n";
- }else{
- echo hsc($key)."\t".hsc($val)."\n";
- }
+ function _enableAutosubmit( $enable ){
+ if ( $enable ){
+ io_saveFile( $this->helper->autosubmitFile, ' ');
+ } else {
+ @unlink($this->helper->autosubmitFile);
}
- echo '</textarea><br />';
- echo '<input type="submit" class="button" value="'.$this->getLang('submit').'"/>';
- echo '</fieldset>';
- echo '</form>';
-
-// dbg($data);
}
-
/**
- * Gather all information
+ * Output HTML form
*/
- function _gather(){
- global $conf;
- global $auth;
- $data = array();
- $phptime = ini_get('max_execution_time');
- @set_time_limit(0);
-
- // version
- $data['anon_id'] = md5(auth_cookiesalt());
- $data['version'] = getVersion();
- $data['popversion'] = $this->version;
- $data['language'] = $conf['lang'];
- $data['now'] = time();
-
- // some config values
- $data['conf_useacl'] = $conf['useacl'];
- $data['conf_authtype'] = $conf['authtype'];
- $data['conf_template'] = $conf['template'];
-
- // number and size of pages
- $list = array();
- search($list,$conf['datadir'],array($this,'_search_count'),'','');
- $data['page_count'] = $list['file_count'];
- $data['page_size'] = $list['file_size'];
- $data['page_biggest'] = $list['file_max'];
- $data['page_smallest'] = $list['file_min'];
- $data['page_nscount'] = $list['dir_count'];
- $data['page_nsnest'] = $list['dir_nest'];
- if($list['file_count']) $data['page_avg'] = $list['file_size'] / $list['file_count'];
- $data['page_oldest'] = $list['file_oldest'];
- unset($list);
-
- // number and size of media
- $list = array();
- search($list,$conf['mediadir'],array($this,'_search_count'),array('all'=>true));
- $data['media_count'] = $list['file_count'];
- $data['media_size'] = $list['file_size'];
- $data['media_biggest'] = $list['file_max'];
- $data['media_smallest'] = $list['file_min'];
- $data['media_nscount'] = $list['dir_count'];
- $data['media_nsnest'] = $list['dir_nest'];
- if($list['file_count']) $data['media_avg'] = $list['file_size'] / $list['file_count'];
- unset($list);
-
- // number and size of cache
- $list = array();
- search($list,$conf['cachedir'],array($this,'_search_count'),array('all'=>true));
- $data['cache_count'] = $list['file_count'];
- $data['cache_size'] = $list['file_size'];
- $data['cache_biggest'] = $list['file_max'];
- $data['cache_smallest'] = $list['file_min'];
- if($list['file_count']) $data['cache_avg'] = $list['file_size'] / $list['file_count'];
- unset($list);
-
- // number and size of index
- $list = array();
- search($list,$conf['indexdir'],array($this,'_search_count'),array('all'=>true));
- $data['index_count'] = $list['file_count'];
- $data['index_size'] = $list['file_size'];
- $data['index_biggest'] = $list['file_max'];
- $data['index_smallest'] = $list['file_min'];
- if($list['file_count']) $data['index_avg'] = $list['file_size'] / $list['file_count'];
- unset($list);
-
- // number and size of meta
- $list = array();
- search($list,$conf['metadir'],array($this,'_search_count'),array('all'=>true));
- $data['meta_count'] = $list['file_count'];
- $data['meta_size'] = $list['file_size'];
- $data['meta_biggest'] = $list['file_max'];
- $data['meta_smallest'] = $list['file_min'];
- if($list['file_count']) $data['meta_avg'] = $list['file_size'] / $list['file_count'];
- unset($list);
-
- // number and size of attic
- $list = array();
- search($list,$conf['olddir'],array($this,'_search_count'),array('all'=>true));
- $data['attic_count'] = $list['file_count'];
- $data['attic_size'] = $list['file_size'];
- $data['attic_biggest'] = $list['file_max'];
- $data['attic_smallest'] = $list['file_min'];
- if($list['file_count']) $data['attic_avg'] = $list['file_size'] / $list['file_count'];
- $data['attic_oldest'] = $list['file_oldest'];
- unset($list);
+ function html() {
+ if ( ! isset($_REQUEST['data']) ){
+ echo $this->locale_xhtml('intro');
+
+ //If there was an error the last time we tried to autosubmit, warn the user
+ if ( $this->helper->isAutoSubmitEnabled() ){
+ if ( @file_exists($this->helper->autosubmitErrorFile) ){
+ echo $this->getLang('autosubmitError');
+ echo io_readFile( $this->helper->autosubmitErrorFile );
+ }
+ }
- // user count
- if($auth && $auth->canDo('getUserCount')){
- $data['user_count'] = $auth->getUserCount();
- }
+ flush();
+ echo $this->buildForm('server');
- // calculate edits per day
- $list = @file($conf['metadir'].'/_dokuwiki.changes');
- $count = count($list);
- if($count > 2){
- $first = (int) substr(array_shift($list),0,10);
- $last = (int) substr(array_pop($list),0,10);
- $dur = ($last - $first)/(60*60*24); // number of days in the changelog
- $data['edits_per_day'] = $count/$dur;
+ //Print the last time the data was sent
+ $lastSent = $this->helper->lastSentTime();
+ if ( $lastSent !== 0 ){
+ echo $this->getLang('lastSent') . datetime_h($lastSent);
+ }
+ } else {
+ //If we just submitted the form
+ if ( $this->sentStatus === '' ){
+ //If we successfully sent the data
+ echo $this->locale_xhtml('submitted');
+ } else {
+ //If we failed to submit the data, try directly with the browser
+ echo $this->getLang('submissionFailed') . $this->sentStatus . '<br />';
+ echo $this->getLang('submitDirectly');
+ echo $this->buildForm('browser', $_REQUEST['data']);
+ }
}
- unset($list);
-
- // plugins
- $data['plugin'] = plugin_list();
-
- // pcre info
- if(defined('PCRE_VERSION')) $data['pcre_version'] = PCRE_VERSION;
- $data['pcre_backtrack'] = ini_get('pcre.backtrack_limit');
- $data['pcre_recursion'] = ini_get('pcre.recursion_limit');
-
- // php info
- $data['os'] = PHP_OS;
- $data['webserver'] = $_SERVER['SERVER_SOFTWARE'];
- $data['php_version'] = phpversion();
- $data['php_sapi'] = php_sapi_name();
- $data['php_memory'] = $this->_to_byte(ini_get('memory_limit'));
- $data['php_exectime'] = $phptime;
- $data['php_extension'] = get_loaded_extensions();
-
- return $data;
}
- function _search_count(&$data,$base,$file,$type,$lvl,$opts){
- // traverse
- if($type == 'd'){
- if($data['dir_nest'] < $lvl) $data['dir_nest'] = $lvl;
- $data['dir_count']++;
- return true;
- }
-
- //only search txt files if 'all' option not set
- if($opts['all'] || substr($file,-4) == '.txt'){
- $size = filesize($base.'/'.$file);
- $date = filemtime($base.'/'.$file);
- $data['file_count']++;
- $data['file_size'] += $size;
- if(!isset($data['file_min']) || $data['file_min'] > $size) $data['file_min'] = $size;
- if($data['file_max'] < $size) $data['file_max'] = $size;
- if(!isset($data['file_oldest']) || $data['file_oldest'] > $date) $data['file_oldest'] = $date;
- }
-
- return false;
- }
-
/**
- * Convert php.ini shorthands to byte
- *
- * @author <gilthans dot NO dot SPAM at gmail dot com>
- * @link http://de3.php.net/manual/en/ini.core.php#79564
+ * Build the form which presents the data to be sent
+ * @param string $submit How is the data supposed to be sent? (may be: 'browser' or 'server')
+ * @param string $data The popularity data, if it has already been computed. NULL otherwise.
+ * @return The form, as an html string
*/
- function _to_byte($v){
- $l = substr($v, -1);
- $ret = substr($v, 0, -1);
- switch(strtoupper($l)){
- case 'P':
- $ret *= 1024;
- case 'T':
- $ret *= 1024;
- case 'G':
- $ret *= 1024;
- case 'M':
- $ret *= 1024;
- case 'K':
- $ret *= 1024;
- break;
+ function buildForm($submissionMode, $data = null){
+ $url = ($submissionMode === 'browser' ? $this->helper->submitUrl : script());
+ if ( is_null($data) ){
+ $data = $this->helper->gatherAsString();
+ }
+
+ $form = '<form method="post" action="'. $url .'" accept-charset="utf-8">'
+ .'<fieldset style="width: 60%;">'
+ .'<textarea class="edit" rows="10" cols="80" readonly="readonly" name="data">'
+ .$data
+ .'</textarea><br />';
+
+ //If we submit via the server, we give the opportunity to suscribe to the autosubmission option
+ if ( $submissionMode !== 'browser' ){
+ $form .= '<label for="autosubmit">'
+ .'<input type="checkbox" name="autosubmit" id="autosubmit" '
+ .($this->helper->isAutosubmitEnabled() ? 'checked' : '' )
+ .'/>' . $this->getLang('autosubmit') .'<br />'
+ .'</label>'
+ .'<input type="hidden" name="do" value="admin">'
+ .'<input type="hidden" name="page" value="popularity">';
}
- return $ret;
+ $form .= '<input type="submit" class="button" value="'.$this->getLang('submit').'"/>'
+ .'</fieldset>'
+ .'</form>';
+ return $form;
}
}
diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php
new file mode 100644
index 000000000..5ce562319
--- /dev/null
+++ b/lib/plugins/popularity/helper.php
@@ -0,0 +1,291 @@
+<?php
+/**
+ * Popularity Feedback Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+class helper_plugin_popularity extends Dokuwiki_Plugin {
+ /**
+ * The url where the data should be sent
+ */
+ var $submitUrl = 'http://update.dokuwiki.org/popularity.php';
+
+ /**
+ * Name of the file which determine if the the autosubmit is enabled,
+ * and when it was submited for the last time
+ */
+ var $autosubmitFile;
+
+ /**
+ * File where the last error which happened when we tried to autosubmit, will be log
+ */
+ var $autosubmitErrorFile;
+
+ /**
+ * Name of the file which determine when the popularity data was manually
+ * submitted for the last time
+ * (If this file doesn't exist, the data has never been sent)
+ */
+ var $popularityLastSubmitFile;
+
+
+ function helper_plugin_popularity(){
+ global $conf;
+ $this->autosubmitFile = $conf['cachedir'].'/autosubmit.txt';
+ $this->autosubmitErrorFile = $conf['cachedir'].'/autosubmitError.txt';
+ $this->popularityLastSubmitFile = $conf['cachedir'].'/lastSubmitTime.txt';
+ }
+
+ function getMethods(){
+ $result = array();
+ $result[] = array(
+ 'name' => 'isAutoSubmitEnabled',
+ 'desc' => 'Check if autosubmit is enabled',
+ 'params' => array(),
+ 'return' => array('result' => 'bool')
+ );
+ $result[] = array(
+ 'name' => 'sendData',
+ 'desc' => 'Send the popularity data',
+ 'params' => array('data' => 'string'),
+ 'return' => array()
+ );
+ $result[] = array(
+ 'name' => 'gatherAsString',
+ 'desc' => 'Gather the popularity data',
+ 'params' => array(),
+ 'return' => array('data' => 'string')
+ );
+ $result[] = array(
+ 'name' => 'lastSentTime',
+ 'desc' => 'Compute the last time popularity data was sent',
+ 'params' => array(),
+ 'return' => array('data' => 'int')
+ );
+ return $result;
+
+ }
+
+ /**
+ * Check if autosubmit is enabled
+ * @return TRUE if we should send data once a month, FALSE otherwise
+ */
+ function isAutoSubmitEnabled(){
+ return @file_exists($this->autosubmitFile);
+ }
+
+ /**
+ * Send the data, to the submit url
+ * @param string $data The popularity data
+ * @return An empty string if everything worked fine, a string describing the error otherwise
+ */
+ function sendData($data){
+ $error = '';
+ $httpClient = new DokuHTTPClient();
+ $status = $httpClient->sendRequest($this->submitUrl, $data, 'POST');
+ if ( ! $status ){
+ $error = $httpClient->error;
+ }
+ return $error;
+ }
+
+ /**
+ * Compute the last time the data was sent. If it has never been sent, we return 0.
+ */
+ function lastSentTime(){
+ $manualSubmission = @filemtime($this->popularityLastSubmitFile);
+ $autoSubmission = @filemtime($this->autosubmitFile);
+
+ return max((int) $manualSubmission, (int) $autoSubmission);
+ }
+
+ /**
+ * Gather all information
+ * @return The popularity data as a string
+ */
+ function gatherAsString(){
+ $data = $this->_gather();
+ $string = '';
+ foreach($data as $key => $val){
+ if(is_array($val)) foreach($val as $v){
+ $string .= hsc($key)."\t".hsc($v)."\n";
+ }else{
+ $string .= hsc($key)."\t".hsc($val)."\n";
+ }
+ }
+ return $string;
+ }
+
+ /**
+ * Gather all information
+ * @return The popularity data as an array
+ */
+ function _gather(){
+ global $conf;
+ global $auth;
+ $data = array();
+ $phptime = ini_get('max_execution_time');
+ @set_time_limit(0);
+
+ // version
+ $data['anon_id'] = md5(auth_cookiesalt());
+ $data['version'] = getVersion();
+ $data['popversion'] = $this->version;
+ $data['language'] = $conf['lang'];
+ $data['now'] = time();
+
+ // some config values
+ $data['conf_useacl'] = $conf['useacl'];
+ $data['conf_authtype'] = $conf['authtype'];
+ $data['conf_template'] = $conf['template'];
+
+ // number and size of pages
+ $list = array();
+ search($list,$conf['datadir'],array($this,'_search_count'),'','');
+ $data['page_count'] = $list['file_count'];
+ $data['page_size'] = $list['file_size'];
+ $data['page_biggest'] = $list['file_max'];
+ $data['page_smallest'] = $list['file_min'];
+ $data['page_nscount'] = $list['dir_count'];
+ $data['page_nsnest'] = $list['dir_nest'];
+ if($list['file_count']) $data['page_avg'] = $list['file_size'] / $list['file_count'];
+ $data['page_oldest'] = $list['file_oldest'];
+ unset($list);
+
+ // number and size of media
+ $list = array();
+ search($list,$conf['mediadir'],array($this,'_search_count'),array('all'=>true));
+ $data['media_count'] = $list['file_count'];
+ $data['media_size'] = $list['file_size'];
+ $data['media_biggest'] = $list['file_max'];
+ $data['media_smallest'] = $list['file_min'];
+ $data['media_nscount'] = $list['dir_count'];
+ $data['media_nsnest'] = $list['dir_nest'];
+ if($list['file_count']) $data['media_avg'] = $list['file_size'] / $list['file_count'];
+ unset($list);
+
+ // number and size of cache
+ $list = array();
+ search($list,$conf['cachedir'],array($this,'_search_count'),array('all'=>true));
+ $data['cache_count'] = $list['file_count'];
+ $data['cache_size'] = $list['file_size'];
+ $data['cache_biggest'] = $list['file_max'];
+ $data['cache_smallest'] = $list['file_min'];
+ if($list['file_count']) $data['cache_avg'] = $list['file_size'] / $list['file_count'];
+ unset($list);
+
+ // number and size of index
+ $list = array();
+ search($list,$conf['indexdir'],array($this,'_search_count'),array('all'=>true));
+ $data['index_count'] = $list['file_count'];
+ $data['index_size'] = $list['file_size'];
+ $data['index_biggest'] = $list['file_max'];
+ $data['index_smallest'] = $list['file_min'];
+ if($list['file_count']) $data['index_avg'] = $list['file_size'] / $list['file_count'];
+ unset($list);
+
+ // number and size of meta
+ $list = array();
+ search($list,$conf['metadir'],array($this,'_search_count'),array('all'=>true));
+ $data['meta_count'] = $list['file_count'];
+ $data['meta_size'] = $list['file_size'];
+ $data['meta_biggest'] = $list['file_max'];
+ $data['meta_smallest'] = $list['file_min'];
+ if($list['file_count']) $data['meta_avg'] = $list['file_size'] / $list['file_count'];
+ unset($list);
+
+ // number and size of attic
+ $list = array();
+ search($list,$conf['olddir'],array($this,'_search_count'),array('all'=>true));
+ $data['attic_count'] = $list['file_count'];
+ $data['attic_size'] = $list['file_size'];
+ $data['attic_biggest'] = $list['file_max'];
+ $data['attic_smallest'] = $list['file_min'];
+ if($list['file_count']) $data['attic_avg'] = $list['file_size'] / $list['file_count'];
+ $data['attic_oldest'] = $list['file_oldest'];
+ unset($list);
+
+ // user count
+ if($auth && $auth->canDo('getUserCount')){
+ $data['user_count'] = $auth->getUserCount();
+ }
+
+ // calculate edits per day
+ $list = @file($conf['metadir'].'/_dokuwiki.changes');
+ $count = count($list);
+ if($count > 2){
+ $first = (int) substr(array_shift($list),0,10);
+ $last = (int) substr(array_pop($list),0,10);
+ $dur = ($last - $first)/(60*60*24); // number of days in the changelog
+ $data['edits_per_day'] = $count/$dur;
+ }
+ unset($list);
+
+ // plugins
+ $data['plugin'] = plugin_list();
+
+ // pcre info
+ if(defined('PCRE_VERSION')) $data['pcre_version'] = PCRE_VERSION;
+ $data['pcre_backtrack'] = ini_get('pcre.backtrack_limit');
+ $data['pcre_recursion'] = ini_get('pcre.recursion_limit');
+
+ // php info
+ $data['os'] = PHP_OS;
+ $data['webserver'] = $_SERVER['SERVER_SOFTWARE'];
+ $data['php_version'] = phpversion();
+ $data['php_sapi'] = php_sapi_name();
+ $data['php_memory'] = $this->_to_byte(ini_get('memory_limit'));
+ $data['php_exectime'] = $phptime;
+ $data['php_extension'] = get_loaded_extensions();
+
+ return $data;
+ }
+
+ function _search_count(&$data,$base,$file,$type,$lvl,$opts){
+ // traverse
+ if($type == 'd'){
+ if($data['dir_nest'] < $lvl) $data['dir_nest'] = $lvl;
+ $data['dir_count']++;
+ return true;
+ }
+
+ //only search txt files if 'all' option not set
+ if($opts['all'] || substr($file,-4) == '.txt'){
+ $size = filesize($base.'/'.$file);
+ $date = filemtime($base.'/'.$file);
+ $data['file_count']++;
+ $data['file_size'] += $size;
+ if(!isset($data['file_min']) || $data['file_min'] > $size) $data['file_min'] = $size;
+ if($data['file_max'] < $size) $data['file_max'] = $size;
+ if(!isset($data['file_oldest']) || $data['file_oldest'] > $date) $data['file_oldest'] = $date;
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert php.ini shorthands to byte
+ *
+ * @author <gilthans dot NO dot SPAM at gmail dot com>
+ * @link http://de3.php.net/manual/en/ini.core.php#79564
+ */
+ function _to_byte($v){
+ $l = substr($v, -1);
+ $ret = substr($v, 0, -1);
+ switch(strtoupper($l)){
+ case 'P':
+ $ret *= 1024;
+ case 'T':
+ $ret *= 1024;
+ case 'G':
+ $ret *= 1024;
+ case 'M':
+ $ret *= 1024;
+ case 'K':
+ $ret *= 1024;
+ break;
+ }
+ return $ret;
+ }
+}
diff --git a/lib/plugins/popularity/lang/ar/lang.php b/lib/plugins/popularity/lang/ar/lang.php
index c0e7dc6af..b2581294a 100644
--- a/lib/plugins/popularity/lang/ar/lang.php
+++ b/lib/plugins/popularity/lang/ar/lang.php
@@ -7,3 +7,8 @@
*/
$lang['name'] = 'رد الشعبية (قد يأخذ بعض الوقت ليحمل)';
$lang['submit'] = 'أرسل البيانات';
+$lang['autosubmit'] = 'ارسل البيانات آليا كل شهر';
+$lang['submissionFailed'] = 'تعذر إرسال البيانات بسبب الخطأ التالي:';
+$lang['submitDirectly'] = 'يمكنك إرسال البيانات يدويا بارسال النموذج التالي.';
+$lang['autosubmitError'] = 'فشلت آخر محاولة للإرسال، بسبب الخطأ التالي:';
+$lang['lastSent'] = 'أرسلت البيانات';
diff --git a/lib/plugins/popularity/lang/ar/submitted.txt b/lib/plugins/popularity/lang/ar/submitted.txt
new file mode 100644
index 000000000..085e3bd98
--- /dev/null
+++ b/lib/plugins/popularity/lang/ar/submitted.txt
@@ -0,0 +1,3 @@
+====== رد الشعبية ======
+
+أرسلت البيانات بنجاح. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/bg/intro.txt b/lib/plugins/popularity/lang/bg/intro.txt
index 06c338585..35023b897 100644
--- a/lib/plugins/popularity/lang/bg/intro.txt
+++ b/lib/plugins/popularity/lang/bg/intro.txt
@@ -1,9 +1,9 @@
-====== Обратна връзка за популярност ======
+====== Обратна връзка ======
-Този инструмент събира данни за потребителите на Вашето Wiki и ви позволява да ги изпратите анонимно на DokuWiki. Това ни помага да разберем как DokuWiki се използва от потребителите си и да разработваме бъдещи решения, съответно реалното използване.
+Инструментът събира данни за вашето Wiki и ви позволява да ги изпратите да разработчиците на DokuWiki. Информацията ще им помогне да разберат как DokuWiki се ползва от потребителите и че статистиката е в подкрепа на поетата насока за развитие.
-Моля изпозвайте тази опция, за да информирате разработчиците на този продукт. Вашите данни ще бъдат идентифицирани с анонимен номер.
+Моля, ползвайте функцията, от време на време, когато уебстраницата ви се разраства, за да информирате разработчиците. Изпратените данни ще бъдат идентифицирани с анонимен идентификатор.
-Събраните данни съдържат информация за вашата версия на DokuWiki, броя и размера на вашите страници и файлове, инсталирани плъгини и информация за вашата PHP инсталация.
+Събираните данни съдържат информация като версията на DokuWiki, броя и размера на вашите страници и файлове, инсталирани приставки и информация за локалната инсталация на PHP.
-Изходните данни са показано по-долу във вида, в който ще бъдат изпратени. Моля ползвайте сьответния бутон, за да изпратите тази информация. \ No newline at end of file
+Данните, които ще бъдат изпратени са изобразени отдолу. Моля, натиснете бутона "Изпращане на данните", за да бъдат изпратени. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/bg/lang.php b/lib/plugins/popularity/lang/bg/lang.php
index adf99a9f5..ba731c0fc 100644
--- a/lib/plugins/popularity/lang/bg/lang.php
+++ b/lib/plugins/popularity/lang/bg/lang.php
@@ -3,6 +3,12 @@
* Bulgarian language file
*
* @author Viktor Usunov <usun0v@mail.bg>
+ * @author Kiril <neohidra@gmail.com>
*/
-$lang['name'] = 'Обратна връзка за популярност (може да отнеме известно време за зареждане)';
-$lang['submit'] = 'Прати данните';
+$lang['name'] = 'Обратна връзка (зареждането изисква време)';
+$lang['submit'] = 'Изпращане на данните';
+$lang['autosubmit'] = 'Автоматично изпращане на данните веднъж в месеца';
+$lang['submissionFailed'] = 'Данните не могат да бъдат изпратени поради следната грешка:';
+$lang['submitDirectly'] = 'Можете да изпратите данните ръчно чрез следния формуляр.';
+$lang['autosubmitError'] = 'Последното автоматично изпращане се провали, поради следната грешка:';
+$lang['lastSent'] = 'Данните са изпратени';
diff --git a/lib/plugins/popularity/lang/bg/submitted.txt b/lib/plugins/popularity/lang/bg/submitted.txt
new file mode 100644
index 000000000..3ecd24f96
--- /dev/null
+++ b/lib/plugins/popularity/lang/bg/submitted.txt
@@ -0,0 +1,3 @@
+====== Обратна връзка ======
+
+Данните са изпратени успешно. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/cs/intro.txt b/lib/plugins/popularity/lang/cs/intro.txt
index 70cf1a42c..4b386568a 100644
--- a/lib/plugins/popularity/lang/cs/intro.txt
+++ b/lib/plugins/popularity/lang/cs/intro.txt
@@ -1,6 +1,6 @@
===== Průzkum používání =====
-Tento nástroj jednorázově shromáží anonymní data o vaší wiki a umožní vám odeslat je vývojářům DokuWiki. To jim pomůže lépe porozumět, jak uživatelé DokuWiki používají, a jejich rozhodnutí při dalším vývoji budou založena na statistikách z reálného používání DokuWiki.
+Tento nástroj jednorázově shromáždí anonymní data o vaší wiki a umožní vám odeslat je vývojářům DokuWiki. To jim pomůže lépe porozumět, jak uživatelé DokuWiki používají, a jejich rozhodnutí při dalším vývoji budou založena na statistikách z reálného používání DokuWiki.
Chcete-li pomoci vývojářům, čas od času, jak vaše wiki poroste, použijte tento nástroj. Vaše data budou pokaždé označena stejným anonymním identifikátorem.
diff --git a/lib/plugins/popularity/lang/de-informal/lang.php b/lib/plugins/popularity/lang/de-informal/lang.php
index 076b37115..f884ed690 100644
--- a/lib/plugins/popularity/lang/de-informal/lang.php
+++ b/lib/plugins/popularity/lang/de-informal/lang.php
@@ -6,6 +6,12 @@
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
+ * @author Christian Wichmann <nospam@zone0.de>
*/
$lang['name'] = 'Popularitätsrückmeldung (kann eine Weile dauern, bis es fertig geladen wurde)';
$lang['submit'] = 'Sende Daten';
+$lang['autosubmit'] = 'Daten einmal im Monat automatisch senden';
+$lang['submissionFailed'] = 'Die Daten konnten aufgrund des folgenden Fehlers nicht gesendet werden: ';
+$lang['submitDirectly'] = 'Du kannst die Daten durch Betätigung des Buttons manuell versenden.';
+$lang['autosubmitError'] = 'Beim letzten automatischen Versuch die Daten zu senden, ist folgender Fehler aufgetreten: ';
+$lang['lastSent'] = 'Die Daten wurden gesendet';
diff --git a/lib/plugins/popularity/lang/de-informal/submitted.txt b/lib/plugins/popularity/lang/de-informal/submitted.txt
new file mode 100644
index 000000000..e7b45b5b7
--- /dev/null
+++ b/lib/plugins/popularity/lang/de-informal/submitted.txt
@@ -0,0 +1,3 @@
+====== Popularitäts-Feedback ======
+
+Die Daten wurden erfolgreich versandt. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/de/lang.php b/lib/plugins/popularity/lang/de/lang.php
index 1372e9d8a..4649062f7 100644
--- a/lib/plugins/popularity/lang/de/lang.php
+++ b/lib/plugins/popularity/lang/de/lang.php
@@ -11,6 +11,13 @@
* @author Blitzi94@gmx.de
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert Bogenschneider <robog@gmx.de>
+ * @author Niels Lange <niels@boldencursief.nl>
+ * @author Christian Wichmann <nospam@zone0.de>
*/
$lang['name'] = 'Popularitäts-Feedback (Eventuell längere Ladezeit)';
$lang['submit'] = 'Daten senden';
+$lang['autosubmit'] = 'Daten einmal im Monat automatisch senden';
+$lang['submissionFailed'] = 'Die Daten konnten aufgrund des folgenden Fehlers nicht gesendet werden: ';
+$lang['submitDirectly'] = 'Sie können die Daten durch Betätigung des Buttons manuell versenden.';
+$lang['autosubmitError'] = 'Beim letzten automatischen Versuch die Daten zu senden, ist folgender Fehler aufgetreten: ';
+$lang['lastSent'] = 'Die Daten wurden gesendet';
diff --git a/lib/plugins/popularity/lang/de/submitted.txt b/lib/plugins/popularity/lang/de/submitted.txt
new file mode 100644
index 000000000..e7b45b5b7
--- /dev/null
+++ b/lib/plugins/popularity/lang/de/submitted.txt
@@ -0,0 +1,3 @@
+====== Popularitäts-Feedback ======
+
+Die Daten wurden erfolgreich versandt. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/el/lang.php b/lib/plugins/popularity/lang/el/lang.php
index 0d16bbf86..41704fa06 100644
--- a/lib/plugins/popularity/lang/el/lang.php
+++ b/lib/plugins/popularity/lang/el/lang.php
@@ -7,3 +7,8 @@
*/
$lang['name'] = 'Αναφορά Δημοτικότητας (ίσως αργήσει λίγο να εμφανιστεί)';
$lang['submit'] = 'Αποστολή Δεδομένων';
+$lang['autosubmit'] = 'Να αποστέλονται τα δεδομένα αυτόματα μια φορά το μήνα.';
+$lang['submissionFailed'] = 'Τα δεδομένα δεν ήταν δυνατό να αποσταλλούν λόγω του παρακάτω σφάλματος:';
+$lang['submitDirectly'] = 'Μπορείτε να αποστείλλετε τα δεδομένα χειροκίνητα με την υποβολή της παρακάτω φόρμας.';
+$lang['autosubmitError'] = 'Η τελευταία αυτόματη υποβολή των δεδομένων απέτυχε με το παρακάτω μήνυμα σφάλματος:';
+$lang['lastSent'] = 'Τα δεδομένα έχουν σταλεί.';
diff --git a/lib/plugins/popularity/lang/el/submitted.txt b/lib/plugins/popularity/lang/el/submitted.txt
new file mode 100644
index 000000000..8004f9997
--- /dev/null
+++ b/lib/plugins/popularity/lang/el/submitted.txt
@@ -0,0 +1,3 @@
+====== Αποτέλεσμα Υποβολής Δημοσιότητας ======
+
+Τα δεδομένα στάλθηκαν επιτυχώς. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/en/lang.php b/lib/plugins/popularity/lang/en/lang.php
index c9912b7ad..78a5e862c 100644
--- a/lib/plugins/popularity/lang/en/lang.php
+++ b/lib/plugins/popularity/lang/en/lang.php
@@ -1,4 +1,9 @@
<?php
-$lang['name'] = 'Popularity Feedback (may take some time to load)';
-$lang['submit'] = 'Send Data';
+$lang['name'] = 'Popularity Feedback (may take some time to load)';
+$lang['submit'] = 'Send Data';
+$lang['autosubmit'] = 'Automatically send data once a month';
+$lang['submissionFailed'] = 'The data couldn\'t be sent due to the following error:';
+$lang['submitDirectly'] = 'You can send the data manually by submitting the following form.';
+$lang['autosubmitError'] = 'The last autosubmit failed, because of the following error: ';
+$lang['lastSent'] = 'The data has been sent ';
diff --git a/lib/plugins/popularity/lang/en/submitted.txt b/lib/plugins/popularity/lang/en/submitted.txt
new file mode 100644
index 000000000..30f2784aa
--- /dev/null
+++ b/lib/plugins/popularity/lang/en/submitted.txt
@@ -0,0 +1,3 @@
+====== Popularity Feedback ======
+
+The data has been sent succesfully.
diff --git a/lib/plugins/popularity/lang/es/lang.php b/lib/plugins/popularity/lang/es/lang.php
index c76190c2c..6aa9a823d 100644
--- a/lib/plugins/popularity/lang/es/lang.php
+++ b/lib/plugins/popularity/lang/es/lang.php
@@ -19,3 +19,8 @@
*/
$lang['name'] = 'Retroinformación (Feedback) plugin Popularity';
$lang['submit'] = 'Enviar datos';
+$lang['autosubmit'] = 'Enviar automáticamente datos una vez al mes';
+$lang['submissionFailed'] = 'Los datos no se pudo enviar debido al error siguiente:';
+$lang['submitDirectly'] = 'Puede enviar los datos de forma manual mediante la presentación de la siguiente forma.';
+$lang['autosubmitError'] = 'El último auto no pudo presentar, debido al error siguiente:';
+$lang['lastSent'] = 'Los datos se han enviado';
diff --git a/lib/plugins/popularity/lang/es/submitted.txt b/lib/plugins/popularity/lang/es/submitted.txt
new file mode 100644
index 000000000..bb1754cdd
--- /dev/null
+++ b/lib/plugins/popularity/lang/es/submitted.txt
@@ -0,0 +1,3 @@
+====== Retroinformación Popularity ======
+
+Los datos se han enviado con éxito. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/et/lang.php b/lib/plugins/popularity/lang/et/lang.php
new file mode 100644
index 000000000..0ffea1244
--- /dev/null
+++ b/lib/plugins/popularity/lang/et/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Estonian language file
+ *
+ * @author kristian.kankainen@kuu.la
+ */
diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php
index 5ddd074a7..9aaf3c7d2 100644
--- a/lib/plugins/popularity/lang/fr/lang.php
+++ b/lib/plugins/popularity/lang/fr/lang.php
@@ -12,6 +12,12 @@
* @author Philippe Bajoit <philippe.bajoit@gmail.com>
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
+ * @author Johan Guilbaud <guilbaud.johan@gmail.com>
*/
-$lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargé)';
+$lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargée)';
$lang['submit'] = 'Envoyer les données';
+$lang['autosubmit'] = 'Envoyer les données automatiquement chaque mois';
+$lang['submissionFailed'] = 'Les données ne peuvent pas être envoyées à cause des erreurs suivantes :';
+$lang['submitDirectly'] = 'Vous pouvez envoyer le données manuellement en soumettant ce formulaire.';
+$lang['autosubmitError'] = 'La dernière soumission automatique a échoué pour les raisons suivantes :';
+$lang['lastSent'] = 'Les données ont été envoyées';
diff --git a/lib/plugins/popularity/lang/fr/submitted.txt b/lib/plugins/popularity/lang/fr/submitted.txt
new file mode 100644
index 000000000..0bc4cfe71
--- /dev/null
+++ b/lib/plugins/popularity/lang/fr/submitted.txt
@@ -0,0 +1,2 @@
+====== Enquête de popularité ======
+Les données ont été envoyées avec succès. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/he/lang.php b/lib/plugins/popularity/lang/he/lang.php
index 024f94ae8..f619127cd 100644
--- a/lib/plugins/popularity/lang/he/lang.php
+++ b/lib/plugins/popularity/lang/he/lang.php
@@ -5,6 +5,7 @@
* @author Dotan Kamber <kamberd@yahoo.com>
* @author Moshe Kaplan <mokplan@gmail.com>
* @author Yaron Yogev <yaronyogev@gmail.com>
+ * @author Yaron Shahrabani <sh.yaron@gmail.com>
*/
$lang['name'] = 'משוב פופולריות (יתכן זמן טעינה ארוך)';
$lang['submit'] = 'שלח מידע';
diff --git a/lib/plugins/popularity/lang/hi/lang.php b/lib/plugins/popularity/lang/hi/lang.php
index d8630a281..c0085d72a 100644
--- a/lib/plugins/popularity/lang/hi/lang.php
+++ b/lib/plugins/popularity/lang/hi/lang.php
@@ -3,4 +3,6 @@
* Hindi language file
*
* @author Abhinav Tyagi <abhinavtyagi11@gmail.com>
+ * @author yndesai@gmail.com
*/
+$lang['submit'] = 'डेटा भेजे';
diff --git a/lib/plugins/popularity/lang/it/intro.txt b/lib/plugins/popularity/lang/it/intro.txt
index 62303eca7..f65310a5a 100644
--- a/lib/plugins/popularity/lang/it/intro.txt
+++ b/lib/plugins/popularity/lang/it/intro.txt
@@ -2,8 +2,8 @@
Questo strumento raccoglie dati anonimi sul tuo wiki e ti permette di inviarli agli sviluppatori di Dokuwiki. Questo aiuta loro a capire come Dokuwiki viene utilizzato dagli utenti e prendere decisioni future sullo sviluppo in base a quelle che sono le reali statistiche di utilizzo da parte degli utenti.
-Ti incoraggiamo a ripetere questa operazione al più spesso per mantenere informati gli sviluppatori sulla crescita del tuo wiki. L'insieme dei dati raccolti saranno identificati tramite un ID anonimo.
+Ti incoraggiamo a ripetere ogni tanto questa operazione per mantenere informati gli sviluppatori sulla crescita del tuo wiki. L'insieme dei dati raccolti saranno identificati tramite un ID anonimo.
-I dati raccolti contengono informazioni come la versione di DokuWiki, il numero e le dimensioni delle pagine e dei files, i plugins installati e qualche informazione sulla versione di PHP presente nel sistema.
+I dati raccolti contengono informazioni come la versione di DokuWiki, il numero e le dimensioni delle pagine e dei file, i plugin installati e informazioni sulla versione di PHP presente nel sistema.
-A continuazione puoi vedere un'anteprima dei dati che saranno inviati. Utilizza il tasto "Invia dati" per trasferire le informazioni. \ No newline at end of file
+A continuazione puoi vedere un'anteprima dei dati che saranno inviati. Utilizza il pulsante "Invia dati" per trasferire le informazioni. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/it/lang.php b/lib/plugins/popularity/lang/it/lang.php
index 583dfae26..a7852f22c 100644
--- a/lib/plugins/popularity/lang/it/lang.php
+++ b/lib/plugins/popularity/lang/it/lang.php
@@ -8,6 +8,12 @@
* @author snarchio@alice.it
* @author robocap <robocap1@gmail.com>
* @author Osman Tekin osman.tekin93@hotmail.it
+ * @author Jacopo Corbetta <jacopo.corbetta@gmail.com>
*/
$lang['name'] = 'Raccolta dati sul wiki (può impiegare del tempo per caricarsi)';
$lang['submit'] = 'Invia dati';
+$lang['autosubmit'] = 'Invia automaticamente i dati una volta al mese';
+$lang['submissionFailed'] = 'È stato impossibile inviare i dati a causa del seguente errore:';
+$lang['submitDirectly'] = 'È possibile inviare i dati manualmente utilizzando il pulsante sottostante.';
+$lang['autosubmitError'] = 'L\'ultimo invio automatico non è andato a buon fine a causa del seguente errore:';
+$lang['lastSent'] = 'I dati sono stati inviati';
diff --git a/lib/plugins/popularity/lang/it/submitted.txt b/lib/plugins/popularity/lang/it/submitted.txt
new file mode 100644
index 000000000..78247154e
--- /dev/null
+++ b/lib/plugins/popularity/lang/it/submitted.txt
@@ -0,0 +1,3 @@
+====== Raccolta dati sul wiki ======
+
+I dati sono stati inviati correttamente. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/ja/lang.php b/lib/plugins/popularity/lang/ja/lang.php
index 7f3c90f3d..1e0dbdc3f 100644
--- a/lib/plugins/popularity/lang/ja/lang.php
+++ b/lib/plugins/popularity/lang/ja/lang.php
@@ -5,6 +5,7 @@
* @author Ikuo Obataya <i.obataya@gmail.com>
* @author Daniel Dupriest <kououken@gmail.com>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
+ * @author Yuji Takenaka <webmaster@davilin.com>
*/
$lang['name'] = '利用状況調査(ロードに少し時間が掛かります)';
$lang['submit'] = 'データ送信';
diff --git a/lib/plugins/popularity/lang/ko/lang.php b/lib/plugins/popularity/lang/ko/lang.php
index 3a28b1b0e..91d798a5f 100644
--- a/lib/plugins/popularity/lang/ko/lang.php
+++ b/lib/plugins/popularity/lang/ko/lang.php
@@ -6,6 +6,7 @@
* @author dongnak@gmail.com
* @author Song Younghwan <purluno@gmail.com>
* @author SONG Younghwan <purluno@gmail.com>
+ * @author Seung-Chul Yoo <dryoo@live.com>
*/
$lang['name'] = '인기도 조사 (불러오는데 시간이 걸릴 수 있습니다.)';
$lang['submit'] = '자료 보내기';
diff --git a/lib/plugins/popularity/lang/la/intro.txt b/lib/plugins/popularity/lang/la/intro.txt
new file mode 100644
index 000000000..c3029caf4
--- /dev/null
+++ b/lib/plugins/popularity/lang/la/intro.txt
@@ -0,0 +1,10 @@
+====== Index Fauoris Popularis ======
+
+Haoc instrumentum fauorem popularem mittis sic ut creatores uicis meliorem illum facere possint.
+
+Rursum te fauorem mittere experamus sic ut si mutationes meliores uel peiores esse uidere possimus.
+
+Res mittendae tua forma in usu, numerus et pondus paginarum et aliarum rerum, addenda in usu et de PHP.
+
+Res rudes mittendae subter ostenduntur. "Res mittere" premas ut eas transferas.
+
diff --git a/lib/plugins/popularity/lang/la/lang.php b/lib/plugins/popularity/lang/la/lang.php
new file mode 100644
index 000000000..c7f307c29
--- /dev/null
+++ b/lib/plugins/popularity/lang/la/lang.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Latin language file
+ *
+ * @author Massimiliano Vassalli <vassalli.max@gmail.com>
+ */
+$lang['name'] = 'Index fauoris popularis (multum tempus quaerere potest)';
+$lang['submit'] = 'Missum die';
+$lang['autosubmit'] = 'Constanter res omni mense mittuntur';
+$lang['submissionFailed'] = 'Res non mittuntur ea causa:';
+$lang['submitDirectly'] = 'Res tu mittere potes cum hoc exemplar compleas.';
+$lang['autosubmitError'] = 'Extrema missio lapsa est ea causa:';
+$lang['lastSent'] = 'Res missae sunt';
diff --git a/lib/plugins/popularity/lang/la/submitted.txt b/lib/plugins/popularity/lang/la/submitted.txt
new file mode 100644
index 000000000..2b2faf439
--- /dev/null
+++ b/lib/plugins/popularity/lang/la/submitted.txt
@@ -0,0 +1,3 @@
+====== Index fauoris popularis ======
+
+Res feliciter missae sunt. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/nl/intro.txt b/lib/plugins/popularity/lang/nl/intro.txt
index 92962944b..3c045c427 100644
--- a/lib/plugins/popularity/lang/nl/intro.txt
+++ b/lib/plugins/popularity/lang/nl/intro.txt
@@ -1,9 +1,9 @@
====== Populariteitsfeedback ======
-Dit onderdeel verzamelt anonieme gegevens over je wiki en stelt je in staat deze te versturen naar de ontwikkelaars van DokuWiki. Dit helpt hen te begrijpen hoe DokuWiki wordt gebruikt door de gebruikers en zorgt er ook voor dat toekomstige ontwikkelkeuzes kunnen worden gestaafd door echte gebruikersstatistieken.
+Dit onderdeel verzamelt anonieme gegevens over uw wiki en stelt u in staat deze te versturen naar de ontwikkelaars van DokuWiki. Dit helpt hen te begrijpen hoe DokuWiki wordt gebruikt door de gebruikers en zorgt er ook voor dat toekomstige ontwikkelkeuzes kunnen worden gestaafd door echte gebruikersstatistieken.
-U wordt verzocht deze stap van tijd tot tijd te herhalen om ontwikkelaars op de hoogte te houden terwijl je wiki groeit. De herhaalde data zal worden geïdentificeerd door een uniek, anoniem ID.
+U wordt verzocht deze stap van tijd tot tijd te herhalen om ontwikkelaars op de hoogte te houden terwijl uw wiki groeit. De herhaalde data zal worden geïdentificeerd door een uniek, anoniem ID.
-De verzamelde gegevens bevat onder andere gegevens over je versie van DokuWiki, het aantal- en de grootte van de pagina's en bestanden, geïnstalleerde plugins en informatie over PHP.
+De verzamelde gegevens bevat onder andere gegevens over uw versie van DokuWiki, het aantal- en de grootte van de pagina's en bestanden, geïnstalleerde plugins en informatie over PHP.
De ruwe data die verzonden worden staan hieronder. Gebruik de knop "Verstuur" om de informatie te verzenden.
diff --git a/lib/plugins/popularity/lang/nl/lang.php b/lib/plugins/popularity/lang/nl/lang.php
index 54e12ae91..0a8386f42 100644
--- a/lib/plugins/popularity/lang/nl/lang.php
+++ b/lib/plugins/popularity/lang/nl/lang.php
@@ -13,3 +13,8 @@
*/
$lang['name'] = 'Populariteitsfeedback (kan even duren om in te laden)';
$lang['submit'] = 'Verstuur';
+$lang['autosubmit'] = 'Gegevens automatisch maandelijks verzenden';
+$lang['submissionFailed'] = 'De gegevens konden niet verstuurd worden vanwege de volgende fouten:';
+$lang['submitDirectly'] = 'Je kan de gegevens handmatig sturen door het onderstaande formulier te verzenden.';
+$lang['autosubmitError'] = 'De laatste automatische verzending is mislukt vanwege de volgende fout:';
+$lang['lastSent'] = 'De gegevens zijn verstuurd.';
diff --git a/lib/plugins/popularity/lang/nl/submitted.txt b/lib/plugins/popularity/lang/nl/submitted.txt
new file mode 100644
index 000000000..219d80fb6
--- /dev/null
+++ b/lib/plugins/popularity/lang/nl/submitted.txt
@@ -0,0 +1,3 @@
+===== Populariteitsfeedback =====
+
+Het versturen van de gegevens is gelukt. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/pt/lang.php b/lib/plugins/popularity/lang/pt/lang.php
index da92ee729..35fac0fc0 100644
--- a/lib/plugins/popularity/lang/pt/lang.php
+++ b/lib/plugins/popularity/lang/pt/lang.php
@@ -8,3 +8,7 @@
*/
$lang['name'] = 'Retorno (feedback) de Popularidade (pode levar algum tempo a carregar)';
$lang['submit'] = 'Enviar Dados';
+$lang['autosubmit'] = 'Enviar dados automáticamente uma vez por mês';
+$lang['submissionFailed'] = 'Os dados não foram enviados devido ao seguinte erro:';
+$lang['submitDirectly'] = 'Pode enviar os dados manualmente, submetendo o seguinte formulário.';
+$lang['lastSent'] = 'Os dados foram enviados';
diff --git a/lib/plugins/popularity/lang/pt/submitted.txt b/lib/plugins/popularity/lang/pt/submitted.txt
new file mode 100644
index 000000000..d2bb2b7ae
--- /dev/null
+++ b/lib/plugins/popularity/lang/pt/submitted.txt
@@ -0,0 +1,3 @@
+====== Retorno de Popularidade ======
+
+Os dados foram enviados com sucesso. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/ro/lang.php b/lib/plugins/popularity/lang/ro/lang.php
index 15da1cf3b..1644ea574 100644
--- a/lib/plugins/popularity/lang/ro/lang.php
+++ b/lib/plugins/popularity/lang/ro/lang.php
@@ -9,3 +9,8 @@
*/
$lang['name'] = 'Feedback de popularitate (încărcarea poate dura mai mult)';
$lang['submit'] = 'Trimite datele';
+$lang['autosubmit'] = 'Trimite datele automat o dată pe lună';
+$lang['submissionFailed'] = 'Datele nu au fost trimise din cauza următoarei erori:';
+$lang['submitDirectly'] = 'Puteți trimite datele manual prin completarea următorului formular.';
+$lang['autosubmitError'] = 'Ultima trimitere automată a eșuat din cauza următoarei erori:';
+$lang['lastSent'] = 'Datele au fost trimise';
diff --git a/lib/plugins/popularity/lang/ro/submitted.txt b/lib/plugins/popularity/lang/ro/submitted.txt
new file mode 100644
index 000000000..214ffb71f
--- /dev/null
+++ b/lib/plugins/popularity/lang/ro/submitted.txt
@@ -0,0 +1,3 @@
+====== Feedback de popularitate ======
+
+Datele au fost trimise cu succes. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/ru/intro.txt b/lib/plugins/popularity/lang/ru/intro.txt
index 587a7ae85..e8118e4eb 100644
--- a/lib/plugins/popularity/lang/ru/intro.txt
+++ b/lib/plugins/popularity/lang/ru/intro.txt
@@ -1,10 +1,10 @@
====== Сбор информации о популярности ======
-Этот инструмент собирает анонимные данные о вашей вики и позволяет вам отправить их разработчикам «ДокуВики». Эти данные помогут им понять то, как именно используется «ДокуВики», и удостовериться, что принимаемые проектные решения соответствуют жизненным реалиям.
+Этот инструмент собирает анонимные данные о вашей вики и позволяет вам отправить их разработчикам «ДокуВики». Эти данные помогут им понять, как именно используется «ДокуВики», и удостовериться, что принимаемые проектные решения соответствуют жизненным реалиям.
-Отправляйте данные время от времени для того, чтобы сообщить разработчикам о том, что ваша вики «подросла». Отправленные вами данные будут идентифицированы по анонимному ID.
+Отправляйте данные время от времени для того, чтобы сообщать разработчикам о том, что ваша вики «подросла». Отправленные вами данные будут идентифицированы по анонимному ID.
Собранные данные содержат такую информацию, как: версия «ДокуВики», количество и размер ваших страниц и файлов, установленные плагины, информацию об установленном PHP.
-Данные, которые будут посланы, представлены ниже. Пожалуйста, используйте кнопку «Отправить данные», чтобы передать информацию.
+Данные, которые будут отосланы, представлены ниже. Пожалуйста, используйте кнопку «Отправить данные», чтобы передать информацию.
diff --git a/lib/plugins/popularity/lang/ru/lang.php b/lib/plugins/popularity/lang/ru/lang.php
index df89c7022..79b3e224d 100644
--- a/lib/plugins/popularity/lang/ru/lang.php
+++ b/lib/plugins/popularity/lang/ru/lang.php
@@ -11,6 +11,13 @@
* @author Vlad Tsybenko <vlad.development@gmail.com>
* @author Aleksey Osadchiy <rfc@nm.ru>
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Ladyko Andrey <fylh@succexy.spb.ru>
+ * @author Eugene <windy.wanderer@gmail.com>
*/
$lang['name'] = 'Сбор информации о популярности (для загрузки может потребоваться некоторое время)';
$lang['submit'] = 'Отправить данные';
+$lang['autosubmit'] = 'Автоматически отправлять данные один раз в месяц';
+$lang['submissionFailed'] = 'Данные не могут быть отправлены из-за ошибки:';
+$lang['submitDirectly'] = 'Вы можете отправлять данные вручную, заполнив форму:';
+$lang['autosubmitError'] = 'Последнее автоотправление данных не удалось из-за ошибки:';
+$lang['lastSent'] = 'Данные отправлены';
diff --git a/lib/plugins/popularity/lang/ru/submitted.txt b/lib/plugins/popularity/lang/ru/submitted.txt
new file mode 100644
index 000000000..a239943a4
--- /dev/null
+++ b/lib/plugins/popularity/lang/ru/submitted.txt
@@ -0,0 +1,2 @@
+====== Общественная обратная связь ======
+Данные были успешно отправлены. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/sl/intro.txt b/lib/plugins/popularity/lang/sl/intro.txt
new file mode 100644
index 000000000..ceb0e61e6
--- /dev/null
+++ b/lib/plugins/popularity/lang/sl/intro.txt
@@ -0,0 +1,9 @@
+====== Poroilo o uporabi ======
+
+To orodje je namenjeno zbiranju brezimnih podatkov o postavljeni Dokuwiki strani in omogoa poiljanje nekaterih podatkov neposredno razvijalcem sistema. S temi podatki lahko razvijalci razumejo naine uporabe sistema, zahteve uporabnikov in pogostost uporabe, kar s statistinimi podatki vpliva tudi na nadaljnji razvoj sistema.
+
+Priporoeno je, da poroilo o uporabi poljete vsake toliko asa, saj lahko le tako razvijalci dobijo podatke o hitrosti rasti spletia in pogostosti uporabe. Vsi podatki so poslani oznaeni s posebno vpisno tevilko, ki omogoa brezimno sledenje.
+
+Zbrani podatki vsebujejo podrobnosti o razliici uporabljenega sistema DokuWiki, tevilo in velikost wiki strani, datotekah, ki so naloene na sistem in podatke o vstavkih ter PHP namestitvi in razliici.
+
+Surovi podatki, ki bodo poslani so prikazani spodaj. S pritiskom na gumb "Polji podatke", bodo ti poslani na strenik razvijalcev.
diff --git a/lib/plugins/popularity/lang/sl/lang.php b/lib/plugins/popularity/lang/sl/lang.php
index befb1eec0..5c92dd7c4 100644
--- a/lib/plugins/popularity/lang/sl/lang.php
+++ b/lib/plugins/popularity/lang/sl/lang.php
@@ -2,7 +2,12 @@
/**
* Slovenian language file
*
- * @author Dejan Levec <webphp@gmail.com>
- * @author Boštjan Seničar <senicar@gmail.com>
+ * @author Matej Urbančič (mateju@svn.gnome.org)
*/
-$lang['submit'] = 'Pošlji';
+$lang['name'] = 'Poročilo o uporabi (nalaganje strani je lahko dolgotrajno)';
+$lang['submit'] = 'Pošlji podatke';
+$lang['autosubmit'] = 'Samodejno pošlji podatke enkrat mesečno';
+$lang['submissionFailed'] = 'Podatkov zaradi napake ni mogoče poslati:';
+$lang['submitDirectly'] = 'Podatke je mogoče poslati ročno s pošiljanjem preko obrazca.';
+$lang['autosubmitError'] = 'Zadnji poskus samodejnega pošiljanja je spodletel zaradi napake:';
+$lang['lastSent'] = 'Podatki so bili uspešno poslani.';
diff --git a/lib/plugins/popularity/lang/sl/submitted.txt b/lib/plugins/popularity/lang/sl/submitted.txt
new file mode 100644
index 000000000..988afd837
--- /dev/null
+++ b/lib/plugins/popularity/lang/sl/submitted.txt
@@ -0,0 +1,3 @@
+====== Poroilo o uporabi ======
+
+Podatki so bili uspeno poslani.
diff --git a/lib/plugins/popularity/lang/sv/lang.php b/lib/plugins/popularity/lang/sv/lang.php
index 10e71b790..b461a95cf 100644
--- a/lib/plugins/popularity/lang/sv/lang.php
+++ b/lib/plugins/popularity/lang/sv/lang.php
@@ -15,3 +15,8 @@
*/
$lang['name'] = 'Popularitets-feedback (det kan ta en stund att ladda sidan)';
$lang['submit'] = 'Sänd data';
+$lang['autosubmit'] = 'Skicka data automatiskt varje månad';
+$lang['submissionFailed'] = 'Datan kunde inte skickas för att:';
+$lang['submitDirectly'] = 'Du kan skicka datan manuellt genom att fylla i följande formulär.';
+$lang['autosubmitError'] = 'Senaste automatiska sändning av datan misslyckades för att:';
+$lang['lastSent'] = 'Datan har skickats';
diff --git a/lib/plugins/popularity/lang/sv/submitted.txt b/lib/plugins/popularity/lang/sv/submitted.txt
new file mode 100644
index 000000000..fb8eab773
--- /dev/null
+++ b/lib/plugins/popularity/lang/sv/submitted.txt
@@ -0,0 +1,3 @@
+====== Popularitetsfeedback ======
+
+Datan har skickats utan problem. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/tr/lang.php b/lib/plugins/popularity/lang/tr/lang.php
index 682b51218..fe87d1548 100644
--- a/lib/plugins/popularity/lang/tr/lang.php
+++ b/lib/plugins/popularity/lang/tr/lang.php
@@ -2,11 +2,10 @@
/**
* Turkish language file
*
- * @author Aydın Coşkuner aydinweb@gmail.com
* @author Aydın Coşkuner <aydinweb@gmail.com>
- * @author yavuzselim@gmail.com
- * @author Cihan Kahveci kahvecicihan@gmail.com
+ * @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
+ * @author Caleb Maclennan <caleb@alerque.com>
*/
$lang['name'] = 'Popülerlik Geribeslemesi (yüklemesi uzun sürebilir)';
$lang['submit'] = 'Verileri Gönder';
diff --git a/lib/plugins/popularity/lang/zh-tw/intro.txt b/lib/plugins/popularity/lang/zh-tw/intro.txt
index 54444afc0..37c63dced 100644
--- a/lib/plugins/popularity/lang/zh-tw/intro.txt
+++ b/lib/plugins/popularity/lang/zh-tw/intro.txt
@@ -1,9 +1,10 @@
-====== 人氣反饋 ======
+====== 人氣回饋 ======
-本工具收集關於您維基站點的匿名信息,並允許您將其發送給 DokuWiki 的開發者。這樣做有助於我們了解用戶是如何使用 DokuWiki 的,並能使我們未來的開發決策建立在現實使用數據上。
+本工具會從您的維基站台收集訊息,並以匿名的方式發送給 DokuWiki 的開發者。這有助於他們了解使用者們如何使用 DokuWiki ,並能基於實際統計資料對未來開發做出更準確的決策。
-我們鼓勵您不時重復該步驟,以便我們能了解您的維基站點發展進度。您的數據集將被匿名 ID 標識。
+我們鼓勵您經常重複這個步驟,讓開發者了解您的維基站台的成長情形。您的資料集將會被標識為一個匿名的識別碼 (ID)。
-收集的數據包括 DokuWiki 版本、您的頁面數量以及文件大小、已安裝的插件、服務器上的 PHP 相關信息。
+收集的資料包括 DokuWiki 版本、頁面數量、檔案大小、安裝的插件、伺服器的 PHP 資訊。
+
+將被發送的原始資料顯示如下。請點擊「發送資料」按鈕進行傳輸。
-將被發送的原始數據如下所示。請點擊“發送數據”按扭進行傳輸。 \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/zh-tw/lang.php b/lib/plugins/popularity/lang/zh-tw/lang.php
index 4757ab84b..3ced0ee5a 100644
--- a/lib/plugins/popularity/lang/zh-tw/lang.php
+++ b/lib/plugins/popularity/lang/zh-tw/lang.php
@@ -7,6 +7,13 @@
* @author Wayne San <waynesan@zerozone.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmai.com>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
+ * @author Danny Lin
+ * @author Shuo-Ting Jian <shoting@gmail.com>
*/
-$lang['name'] = '人氣反饋(載入可能需要一些時間)';
-$lang['submit'] = '發送數據';
+$lang['name'] = '人氣回饋(載入可能需要一些時間)';
+$lang['submit'] = '發送資料';
+$lang['autosubmit'] = '每月自動發送';
+$lang['submissionFailed'] = '由於以下原因,資料無法發送:';
+$lang['submitDirectly'] = '你可以利用以下的表單來發手動發送資料.';
+$lang['autosubmitError'] = '由於以下原因,上次自動發送失敗:';
+$lang['lastSent'] = '資料已發送';
diff --git a/lib/plugins/popularity/lang/zh-tw/submitted.txt b/lib/plugins/popularity/lang/zh-tw/submitted.txt
new file mode 100644
index 000000000..6febcd5b8
--- /dev/null
+++ b/lib/plugins/popularity/lang/zh-tw/submitted.txt
@@ -0,0 +1,3 @@
+====== 人氣回饋 ======
+
+資料已發送成功 \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/zh/lang.php b/lib/plugins/popularity/lang/zh/lang.php
index 22fad03b2..371a8fddb 100644
--- a/lib/plugins/popularity/lang/zh/lang.php
+++ b/lib/plugins/popularity/lang/zh/lang.php
@@ -8,6 +8,14 @@
* @author Simon zhan <simonzhan@21cn.com>
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
+ * @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
+ * @author Hiphen Lee <jacob.b.leung@gmail.com>
*/
$lang['name'] = '人气反馈(载入可能需要一些时间)';
$lang['submit'] = '发送数据';
+$lang['autosubmit'] = '每月自动发送';
+$lang['submissionFailed'] = '数据由于以下原因不恩你给发送:';
+$lang['submitDirectly'] = '你可以手动提交下面的表单来发送数据。';
+$lang['autosubmitError'] = '印以下原因,上一次自动提交失败:';
+$lang['lastSent'] = '数据已发送';
diff --git a/lib/plugins/popularity/lang/zh/submitted.txt b/lib/plugins/popularity/lang/zh/submitted.txt
new file mode 100644
index 000000000..6039b70e1
--- /dev/null
+++ b/lib/plugins/popularity/lang/zh/submitted.txt
@@ -0,0 +1,3 @@
+====== 人气反馈 ======
+
+数据发送成功。 \ No newline at end of file
diff --git a/lib/plugins/popularity/plugin.info.txt b/lib/plugins/popularity/plugin.info.txt
new file mode 100644
index 000000000..2652bd669
--- /dev/null
+++ b/lib/plugins/popularity/plugin.info.txt
@@ -0,0 +1,7 @@
+base popularity
+author Andreas Gohr
+email andi@splitbrain.org
+date 2010-12-09
+name Popularity Feedback Plugin
+desc Send anonymous data about your wiki to the developers.
+url http://www.dokuwiki.org/plugin:popularity