Page MenuHomePhabricator

Remove default view (Special:Newsletter/id/) code from SpecialNewsletter.php
Closed, ResolvedPublic

Description

This task requires you to install Newsletter extension.

We are not using the default view code (probably in viewExecute() in SpecialNewsletter.php as we are rendering this page directly from content/NewsletterContent.php.

The task will require also to remove any unwanted functions to interact with database as well (like taking in data from the db to show up in Special:Newsletter/id). We are currently taking this from the ContentHandler data, and not from db.

Mentor: @01tonythomas

Details

Related Gerrit Patches:
mediawiki/extensions/Newsletter : masterRemoved usage of old SpecialPage code for viewing the page

Related Objects

StatusSubtypeAssignedTask
DuplicateQgil
ResolvedQgil
ResolvedQgil
DeclinedNone
ResolvedAddshore
DuplicateNone
Resolvedori
ResolvedBawolff
ResolvedGlaisher
ResolvedTinaj1234
DeclinedNone
ResolvedGlaisher
Resolved01tonythomas
ResolvedGlaisher
Resolved01tonythomas
OpenNone
OpenDaimona
OpenDaimona
Resolved01tonythomas
ResolvedQgil
ResolvedFilip
ResolvedD3r1ck01
ResolvedNone
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
ResolvedGeorggi199

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 8 2016, 12:18 PM
01tonythomas renamed this task from Remove default view (Specia:Newsletter/id/) code from SpecialNewsletter.php to Remove default view (Special:Newsletter/id/) code from SpecialNewsletter.php.Dec 8 2016, 12:20 PM
MtDu added a subscriber: MtDu.Dec 9 2016, 12:30 AM

@01tonythomas
I don't quite get what needs to be done? Could you try to explain it in a different way?
Thanks,

Alright. The things is you can see there is a lot of code duplication in https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/includes/content/NewsletterContent.php and https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/includes/specials/SpecialNewsletter.php.

Previously, we used to take in things about the Newsletter from the database (nl_newsletters) and show up in Special:Newsletter/id/. After the contenthandler migration, we are not using this anymore, and showing up Newsletter:MyName and taking in the data from the page source (which has a newslettercontenthandler model). Think about it like a new and wiki way of storing things up.

Since I was lazy, we still got code of Special:Newsletter/id/ still in the code, and we need to remove it.

Georggi199 added a subscriber: Georggi199.

Claimed this task on GCI

Change 328023 had a related patch set uploaded (by Georggi199):
Removed usage of old SpecialPage code for viewing the page

https://gerrit.wikimedia.org/r/328023

01tonythomas closed this task as Resolved.Dec 18 2016, 2:15 PM

Works. Thank you for the patch!

Change 328023 merged by jenkins-bot:
Removed usage of old SpecialPage code for viewing the page

https://gerrit.wikimedia.org/r/328023

Qgil awarded a token.Dec 19 2016, 2:13 PM