Tracking bug for bug 61255, and things in the "contenthandler" branch.
Version: unspecified
Severity: normal
URL: http://mm-ch.wmflabs.org/wiki/Main_Page
Tracking bug for bug 61255, and things in the "contenthandler" branch.
Version: unspecified
Severity: normal
URL: http://mm-ch.wmflabs.org/wiki/Main_Page
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | wctaiwan | T63255 Use ContentHandler based spamlist for MassMessage instead of parserfunction | |||
Resolved | None | T70599 MassMessage: Bugs related to contenthandler branch (tracking) | |||
Resolved | wctaiwan | T70600 mm-ch: Implement sane diffs | |||
Resolved | wctaiwan | T70602 mm-ch: Allow for editing of old revisions | |||
Resolved | None | T70601 mm-ch: Enable autocomplete in add page interfaces | |||
Resolved | None | T70603 mm-ch: MassMessageContent should support using the parser cache |
Just dumping notes here 'cause I'm lazy and don't want to lose them.
Additional thoughts I had:
I'm largely done fixing the things in MZMcBride's comment. Some comments about the ones that I have not implemented as described:
https://github.com/wikimedia/mediawiki-extensions-MassMessage/compare/contenthandler
So looking at MassMessagehooks.php
$out->addModuleStyles( 'ext.MassMessage.content' );
$out->addModules( 'ext.MassMessage.content.js' );
A module ending in .js just feels icky. That's alright though, as the 2 should be merged, and then we can just have:
$out->addModules( 'ext.MassMessage.content' );
Api Modules:
getPossibleErrors is no more.
Other:
There are usages of "else if" in php code. Don't do that. Use "elseif"
(In reply to Sam Reed (reedy) from comment #3)
https://github.com/wikimedia/mediawiki-extensions-MassMessage/compare/
contenthandlerSo looking at MassMessagehooks.php
$out->addModuleStyles( 'ext.MassMessage.content' );
$out->addModules( 'ext.MassMessage.content.js' );A module ending in .js just feels icky. That's alright though, as the 2
should be merged, and then we can just have:$out->addModules( 'ext.MassMessage.content' );
We have to do that so the CSS styles are still served to users with JS disabled. Modules loaded via addModules require JS. Also there would be a FOUC iirc.
SpecialCreateMassMessageList and SpecialEditMassMessageList doesn't return something on all code paths in their onSubmit()
MassMessageHooks.php - Line 192
$revId = ( $next ) ? $next : $revId;
$revId on the right hand side is undefined
ApiEditMassMessageList::getEditSummary() - $title and $count used at the bottom may have not been defined (I note there's quite a few code paths through that block...)
MassMessageListContentHandler::unserializeContent() should have @throws MWContentSerializationException
(In reply to Sam Reed (reedy) from comment #3)
Api Modules:
getPossibleErrors is no more.
Id74b59113cf0211e83c25364a94c597cb579b8f0
Other:
There are usages of "else if" in php code. Don't do that. Use "elseif"
I0f637f466b7c41053c9ba0a8d9399292c843104b
(In reply to Sam Reed (reedy) from comment #5)
MassMessageListContentHandler::unserializeContent() should have @throws
MWContentSerializationException
I62c73abd5f9e3fd4c2e9358e484101b962cdc6c0
(In reply to Sam Reed (reedy) from comment #5)
SpecialCreateMassMessageList and SpecialEditMassMessageList doesn't return
something on all code paths in their onSubmit()
I3a06dd743ff8b18aaba73649cbd53d4db02018ce
ApiEditMassMessageList::getEditSummary() - $title and $count used at the
bottom may have not been defined (I note there's quite a few code paths
through that block...)
AFAIS everything is defined properly, but explicitly done in I3393a7a5531c272cf879bad0da11426714a0e633.
(In reply to Sam Reed (reedy) from comment #5)
MassMessageHooks.php - Line 192
$revId = ( $next ) ? $next : $revId;$revId on the right hand side is undefined
I think this should be $oldid, but I'm not totally sure...wctaiwan?
(In reply to Kunal Mehta (Legoktm) from comment #8)
(In reply to Sam Reed (reedy) from comment #5)
MassMessageHooks.php - Line 192
$revId = ( $next ) ? $next : $revId;$revId on the right hand side is undefined
I think this should be $oldid, but I'm not totally sure...wctaiwan?
$oldid is correct; sorry. Changed in I75cb898dcd20db8052688152d55a8f3d63e9e241
I7e01e63717b99fe6937fa8598fdaffe8fdfe4527 closes a couple more loopholes for invalid titles, with thanks to MZMcBride for raising them.