[go: up one dir, main page]

Page MenuHomePhabricator

Add support for module redirects
Closed, DuplicatePublic

Description

When moving a module, a redirect should be left behind.

The following is a valid lua redirect:

Example redirect
--#REDIRECT
return require('Module:Bananas');

In order to add support for redirects, the following is needed:

  • ScribuntoContent::updateRedirect needs to be created, and will call ScribuntoContentHandler::makeRedirectContent
  • ScribuntoContent::getRedirectTarget needs to be created, and will parse the text to determine the target
  • ScribuntoContentHandler::supportsRedirects needs to be created, and will return true
  • ScribuntoContentHandler::makeRedirectContent needs to be created, and will return the actual text for the redirect

Remaining questions

  • Are any needed functions missing?
  • Is there consensus for scribunto redirects to use the form given above?