Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4954
diff.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:13 PM
2014-11-21 22:13:21 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
diff.patch
View Options
Index: includes/Article.php
===================================================================
--- includes/Article.php (revision 35071)
+++ includes/Article.php (working copy)
@@ -2278,6 +2278,14 @@
$ns = $this->mTitle->getNamespace();
$t = $this->mTitle->getDBkey();
$id = $this->mTitle->getArticleID();
+ if ( $ns == NS_USER_TALK ) {
+ if ( !User::isIP( $this->mTitle->getText() ) ) {
+ $userid = User::idFromName ( $this->mTitle->getText() );
+ }
+ else {
+ $userid = $this->mTitle->getText();
+ }
+ }
if ( $t == '' || $id == 0 ) {
return false;
@@ -2333,7 +2341,17 @@
# Delete restrictions for it
$dbw->delete( 'page_restrictions', array ( 'pr_page' => $id ), __METHOD__ );
-
+
+ # Cleanup any lingering user_talk "You have new messages" flags
+ if ( $userid ) {
+ if ( !User::isIP( $userid ) ) {
+ $dbw->delete( 'user_newtalk', array ( 'user_id' => $userid ), __METHOD__ );
+ }
+ else {
+ $dbw->delete( 'user_newtalk', array ( 'user_ip' => $userid ), __METHOD__ );
+ }
+ }
+
# Fix category table counts
$cats = array();
$res = $dbw->select( 'categorylinks', 'cl_to',
@@ -2380,7 +2398,7 @@
# Clear caches
Article::onArticleDelete( $this->mTitle );
-
+
# Clear the cached article id so the interface doesn't act like we exist
$this->mTitle->resetArticleID( 0 );
$this->mTitle->mArticleID = 0;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4518
Default Alt Text
diff.patch (1 KB)
Attached To
Mode
T16077: "You've got new messages" is displayed for a non-existent discussion page
Attached
Detach File
Event Timeline
Log In to Comment