Skip to content

Commit

Permalink
Updated readme and comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisNT committed Jul 14, 2013
1 parent 7a2f52b commit 719b61c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
8 changes: 8 additions & 0 deletions EnhancedReportTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
24 changes: 23 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 719b61c

Please sign in to comment.