Page MenuHomePhorge

Fix DeleteWiki log entries for wikis which do not have the language code in their subdomain
Closed, ResolvedPublic

Description

It's a minor annoyance that has very little, if any, practical impact, but...

◾ 19:15, 21 June 2016 Jack Phoenix (Talk | contribs | block) deleted the wiki "aejenrald" with the language code "aejenrald"; (founder request (osTicket #2079))
◾ 16:46, 21 June 2016 Jack Phoenix (Talk | contribs | block) deleted the wiki "pt.metrodebarcelona" with the language code "pt"; (founder request (osTicket #2076))

aejenrald's language was English (en) IIRC, but since it doesn't have a period, DeleteWiki gets kinda confused and part of the log entry is utter nonsense. I'm guessing that in DeleteWikiPage::execute(), after line 119, we should check if $lang is valid with Language::isValidCode() and for cases where it's not, either load the wiki's settings file (safer) or check the database (wiki_settings table; a bit unsafer since it can be out of sync) for the appropriate language code.

Event Timeline

jack claimed this task.
jack removed a project: Sprint 22/06/16.

With the DeleteWiki improvements done in rSHWK4107 this is no longer an issue.