diff options
Diffstat (limited to 'lib/plugins/popularity')
-rw-r--r-- | lib/plugins/popularity/action.php | 6 | ||||
-rw-r--r-- | lib/plugins/popularity/admin.php | 8 | ||||
-rw-r--r-- | lib/plugins/popularity/helper.php | 10 |
3 files changed, 17 insertions, 7 deletions
diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php index 1c7a2f65d..f0cbb771b 100644 --- a/lib/plugins/popularity/action.php +++ b/lib/plugins/popularity/action.php @@ -9,6 +9,10 @@ require_once(DOKU_PLUGIN.'action.php'); require_once(DOKU_PLUGIN.'popularity/admin.php'); class action_plugin_popularity extends Dokuwiki_Action_Plugin { + + /** + * @var helper_plugin_popularity + */ var $helper; function action_plugin_popularity(){ @@ -22,7 +26,7 @@ class action_plugin_popularity extends Dokuwiki_Action_Plugin { $controller->register_hook('INDEXER_TASKS_RUN', 'AFTER', $this, '_autosubmit', array()); } - function _autosubmit(&$event, $param){ + function _autosubmit(Doku_Event &$event, $param){ //Do we have to send the data now if ( !$this->helper->isAutosubmitEnabled() || $this->_isTooEarlyToSubmit() ){ return; diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 474a09ef9..deb8048f4 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -14,6 +14,10 @@ if(!defined('DOKU_INC')) die(); */ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { var $version; + + /** + * @var helper_plugin_popularity + */ var $helper; var $sentStatus = null; @@ -118,9 +122,9 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { /** * 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 $submissionMode 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 + * @return string The form, as an html string */ function buildForm($submissionMode, $data = null){ $url = ($submissionMode === 'browser' ? $this->helper->submitUrl : script()); diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 34521021d..5bbeddba0 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -29,6 +29,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { */ var $popularityLastSubmitFile; + var $version; + function helper_plugin_popularity(){ global $conf; @@ -69,7 +71,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Check if autosubmit is enabled - * @return TRUE if we should send data once a month, FALSE otherwise + * @return boolean TRUE if we should send data once a month, FALSE otherwise */ function isAutoSubmitEnabled(){ return @file_exists($this->autosubmitFile); @@ -78,7 +80,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * 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 + * @return string An empty string if everything worked fine, a string describing the error otherwise */ function sendData($data){ $error = ''; @@ -102,7 +104,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information - * @return The popularity data as a string + * @return string The popularity data as a string */ function gatherAsString(){ $data = $this->_gather(); @@ -119,7 +121,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information - * @return The popularity data as an array + * @return array The popularity data as an array */ function _gather(){ global $conf; |