diff options
author | Hakan Sandell <sandell.hakan@gmail.com> | 2012-09-08 15:05:39 +0200 |
---|---|---|
committer | Hakan Sandell <sandell.hakan@gmail.com> | 2012-09-08 15:05:39 +0200 |
commit | f21e024ada9202d47fcdc85730a44af5ea259d1c (patch) | |
tree | ce7b06d0c74de21a0491302fed22b4b9c7ca723d /lib/plugins/popularity | |
parent | b41885e3906c7acab7e2c3e33e49d17b2489956c (diff) | |
download | rpg-f21e024ada9202d47fcdc85730a44af5ea259d1c.tar.gz rpg-f21e024ada9202d47fcdc85730a44af5ea259d1c.tar.bz2 |
Replacing $_REQUEST variables with $INPUT wrapper, popularity plugin
Diffstat (limited to 'lib/plugins/popularity')
-rw-r--r-- | lib/plugins/popularity/admin.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 364075903..474a09ef9 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -50,15 +50,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 +80,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 +110,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')); } } } |