Page MenuHomePhabricator
Authored By
bzimport
Nov 21 2014, 9:26 PM
Size
1 KB
Referenced Files
None
Subscribers
None
Index: includes/Title.php
===================================================================
--- includes/Title.php (revision 16489)
+++ includes/Title.php (working copy)
@@ -1827,18 +1827,19 @@
$u->doUpdate();
# Update site_stats
- if ( $this->getNamespace() == NS_MAIN and $nt->getNamespace() != NS_MAIN ) {
+ global $wgContentNamespaces;
+ if ( in_array( $this->getNamespace(), $wgContentNamespaces ) && !in_array( $nt->getNamespace(), $wgContentNamespaces ) ) {
# Moved out of main namespace
# not viewed, edited, removing
$u = new SiteStatsUpdate( 0, 1, -1, $pageCountChange);
- } elseif ( $this->getNamespace() != NS_MAIN and $nt->getNamespace() == NS_MAIN ) {
+ } elseif ( !in_array( $this->getNamespace(), $wgContentNamespaces ) && in_array( $nt->getNamespace(), $wgContentNamespaces ) ) {
# Moved into main namespace
# not viewed, edited, adding
$u = new SiteStatsUpdate( 0, 1, +1, $pageCountChange );
} elseif ( $pageCountChange ) {
# Added redirect
$u = new SiteStatsUpdate( 0, 0, 0, 1 );
- } else{
+ } else {
$u = false;
}
if ( $u ) {

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2882
Default Alt Text
patch (1 KB)

Event Timeline