From 5827ba0b8aa706e4201a3dc654b3c2cf141f6dd2 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sat, 18 Dec 2010 10:27:49 +0100 Subject: Popularity plugin displays the last time the data was sent --- lib/plugins/popularity/admin.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/plugins/popularity/admin.php') diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 22ddb245b..40c3f5452 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -53,6 +53,10 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { //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']) ); } @@ -87,6 +91,12 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { flush(); echo $this->buildForm('server'); + + //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 === '' ){ -- cgit v1.2.3