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

Related Objects

StatusSubtypeAssignedTask
DuplicateQgil
ResolvedQgil
ResolvedQgil
DeclinedNone
ResolvedAddshore
DuplicateNone
Resolvedori
ResolvedBawolff
ResolvedGlaisher
ResolvedTinaj1234
DeclinedNone
ResolvedGlaisher
Resolved01tonythomas
ResolvedGlaisher
Resolved01tonythomas
ResolvedPppery
ResolvedDaimona
ResolvedDaimona
Resolved01tonythomas
ResolvedQgil
ResolvedFilip
ResolvedxSavitar
ResolvedNone
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
ResolvedGeorggi199

Event Timeline

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

@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.

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

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