chore: Backend WikiController cleanup#1013
Merged
Merged
Conversation
tarrow
approved these changes
Nov 25, 2025
| $domain = $validated['domain']; | ||
| // XXX: this same logic is in quickstatements.php and platform api WikiController backend | ||
| try { | ||
| if ($domain === 'localhost' || $domain === 'mediawiki') { |
Contributor
There was a problem hiding this comment.
I did a bit of digging (e.g. in quickstatements.php) to see if I could find what this was about or where it is used and didn't succeed.
I guess this can go but I'm still a bit unsure if it's needed somewhere special (e.g. for building the .sql or some mystry place.
Contributor
Author
There was a problem hiding this comment.
I think this was for special curl handling in case of running in the docker compose setup wbstack/magnustools#18
I don't think usage of magnustools is playing a role in creating the mw/wikibase sql schema
| } | ||
| } catch (\Exception $ex) { | ||
| return response()->json($ex->getMessage(), 500); | ||
| $wiki = Wiki::with(['wikiDb', 'wikiQueryserviceNamespace', 'settings'])->firstWhere('domain', $domain); |
Contributor
There was a problem hiding this comment.
complement: $wiki is way better than $result
deer-wmde
added a commit
that referenced
this pull request
Dec 15, 2025
separated from #1010 - adds input validation - adds unit test - makes wiki retrieving safer - removes some special dev handling that is to my knowledge not needed anymore - IMO the routing in backend.php here also would need a cleanup, but that would break client use, so.. meh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
separated from #1010