Wikimedia

Fix undeleting/restoring a Newsletter from the Special:Undelete page (by completing the work in an existing patch)

This task is about the Newsletter extension, and you can find the change in question at https://gerrit.wikimedia.org/r/#/c/320370/ which needs rework.

Your task is to complete the work in Change:320370 which is to implement undelete feature for Newsletters from deletion logs.

Original task description:

Steps to reproduce:

You would want to:

  • Implement the hook, catch the newsletter which is getting undeleted set the inactive flag to active in nl_newsletters. You will need a new function in NewsletterDb, which looks something like deleteNewsletter, but doing the opposite.

Currently it just shows up a 404 error: Fatal error: Call to a member function getName() on null in /var/www/core/core/extensions/Newsletter/includes/content/NewsletterContent.php on line 143

NOTE: Please go through https://www.mediawiki.org/wiki/Gerrit/Tutorial#Amending_a_change_.28your_own_or_someone_else.27s.29 and learn how to amend an existing Gerrit change. Do not create a "separate" new changeset.

Task tags

  • newsletter
  • gerrit
  • php

Students who completed this task

Justin Du

Task type

  • code Code
close

2016