-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
NotDashEscaped: You need GnuPG to verify this message
Jack Eapen C asked:
I'm the sysop user for a small intranet wiki. i
often visit many pages
many times for testing and that adds to the no. of page views. How can I
tell MW not to count me for calculating page views-either based on my IP
or my username?
Modify your Article.php file like this:
Index: includes/Article.php
===================================================================
--- includes/Article.php (revision 26855)
+++ includes/Article.php (working copy)
@@ -2370,8 +2370,8 @@
global $wgDeferredUpdateList;
if ( 0 != $this->getID() ) {
- global $wgDisableCounters;
- if( !$wgDisableCounters ) {
+ global $wgDisableCounters, $wgUsersNoUpdatetats, $wgUser;
+ if (!$wgDisableCounters && !in_array
($wgUser->getName(),$wgUsersNoUpdateStats) ) {
Article::incViewCount( $this->getID() );
$u = new SiteStatsUpdate( 1, 0, 0 );
array_push( $wgDeferredUpdateList, $u );
Then add a list of excluded users to your LocalSettings.php file:
## Users who don't update the page stats
$wgUsersNoUpdateStats = array
('SysAdmin','GhostWhoWalks','127.0.0.1');
--
Greg Sabino Mullane greg(a)turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200710201947
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFHGpP3vJuQZxSWSsgRA7N9AJ407eCEgPsQMIkMH9Y3rhwk1k5G3ACg7fz4
+CtZ5F+GPXcV8nRni1sSWtk=
=/6aY
-----END PGP SIGNATURE-----