diff options
Diffstat (limited to 'lib/plugins/popularity/admin.php')
-rw-r--r-- | lib/plugins/popularity/admin.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 364075903..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; @@ -50,15 +54,17 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { * handle user request */ function handle() { + global $INPUT; + //Send the data - if ( isset($_REQUEST['data']) ){ - $this->sentStatus = $this->helper->sendData( $_REQUEST['data'] ); + if ( $INPUT->has('data') ){ + $this->sentStatus = $this->helper->sendData( $INPUT->str('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']) ); + $this->_enableAutosubmit( $INPUT->has('autosubmit') ); } } @@ -78,7 +84,9 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { * Output HTML form */ function html() { - if ( ! isset($_REQUEST['data']) ){ + global $INPUT; + + if ( ! $INPUT->has('data') ){ echo $this->locale_xhtml('intro'); //If there was an error the last time we tried to autosubmit, warn the user @@ -106,7 +114,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { //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']); + echo $this->buildForm('browser', $INPUT->str('data')); } } } @@ -114,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()); |