From 719b61c04298dc31ceae87313c44a4eae7d65049 Mon Sep 17 00:00:00 2001 From: Davis Mosenkovs Date: Sun, 14 Jul 2013 20:16:42 +0300 Subject: [PATCH] Updated readme and comments. --- EnhancedReportTime.php | 8 ++++++++ README | 24 +++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/EnhancedReportTime.php b/EnhancedReportTime.php index db98e6e..51a68d5 100644 --- a/EnhancedReportTime.php +++ b/EnhancedReportTime.php @@ -33,11 +33,19 @@ $wgExtensionMessagesFiles['EnhancedReportTime'] = dirname( __FILE__ ) . '/EnhancedReportTime.i18n.php'; +/*** Default configuration ***/ +// Use request start timestamp from $_SERVER['REQUEST_TIME_FLOAT'] (when available). $wgERTUseServerStartTime = true; + +// Maximum allowed generation time for which to report that SLA is met. $wgERTSLATime = 10; + +// Array with page names (see magic word {{FULLPAGENAME}}) where to enable EnhancedReportTime (empty means everywhere). $wgERTPages = array('Special:Version'); +/*****************************/ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'wfEnhancedReportTimeOutputPageBeforeExec'; + function wfEnhancedReportTimeOutputPageBeforeExec($sk, &$tpl) { global $wgERTPages; if(count($wgERTPages)==0 || in_array($sk->getTitle()->getPrefixedText(), $wgERTPages, true)) { diff --git a/README b/README index bf9f8e6..e163d54 100644 --- a/README +++ b/README @@ -1,2 +1,24 @@ -EnhancedReportTime - MediaWiki extension to display enhanced information about generation time of wiki pages. +EnhancedReportTime - MediaWiki extension to display enhanced information +about generation time of wiki pages. +Copyright (C) 2013 Davis Mosenkovs + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +http://www.gnu.org/copyleft/gpl.html + + +For more information see: https://www.mediawiki.org/wiki/Extension:EnhancedReportTime + +For default configuration values see /*** Default configuration ***/ in EnhancedReportTime.php.