rebase extension.json work around new codebase#10
rebase extension.json work around new codebase#10MEXAHOTABOP wants to merge 8 commits intoDF-Wiki:masterfrom
Conversation
|
c5b835b |
| "description": "Absolute path to raws directory, when empty use 'raws' directory in extension catalog" | ||
| "value": "raws", | ||
| "path": true, | ||
| "description": "Relative path to raws directory" |
There was a problem hiding this comment.
Couldn't it also be absolute? I don't see any checks for the path root in DFRawFunctions.body.php
There was a problem hiding this comment.
With "path": true mediawiki insert extension directory to path without any other checks.
So only relative.
There was a problem hiding this comment.
So what is it relative to?
If this has to be relative to the extension directory, I don't really see a point in having it be configurable.
If it's relative to the MediaWiki installation, I suppose that makes a bit more sense to have as an option, but I'm still not sure we've ever needed it (aside from maybe testing raws in development, which could also be done by using symlinks or patching the extension). Are you using this config option?
There was a problem hiding this comment.
Yes this is relative to extension directory
Russian wiki uses NixOS as base OS https://github.com/MEXAHOTABOP/dfwk and every module (including DFRawFunctions) absolute path will be based on its hash like /nix/store/mhzd8rgxhn6dfpzv0l5l293wa9sfx9w9-DFRawFunctions-456959f , so instead of using absolute path that will be known only when extension is downloaded and evaluated, I found it easier just use relative to extension directory.
1fea44e to
1f9362a
Compare
fix problem with non evalable wgDFRawPath
remove missed __DIR__
Differences from #7 :
Leave code in DFRawFunctions.body.php to make review more easily
Added $wgDFRawVersion varible, that define version with will be used if namespace is not set, that change required for Russian wiki that use only main user space, and should not affect English wiki.
Fixed problem with non evalable by default DFRawPath in extension.json by moving default path DIR . '/raws'; to code