Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3313
patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:26 PM
2014-11-21 21:26:55 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
patch
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2882
Default Alt Text
patch (1 KB)
Attached To
Mode
T9292: Moving page to another content namespace decrease article count
Attached
Detach File
Event Timeline
Log In to Comment