Jump to content

Module talk:Extension/Flow

About this board

Global params/vars that default to null are ignored

2
Yaron Koren (talkcontribs)

It looks like the function getParameters() ignores global variables, i.e. parameters, that have null as their default value. See, for example, the Page Forms config - the four variables that default to null are all missing from the "Parameters" listing in the main page infobox. Looking through the code, the relevant line looks fine - the issue seems to be that Lua, when cycling through a table, simply ignores pairs where the value is null (or "nil", in Lua's terms). So maybe the only solution is to replace null with some other value (though I don't know what) either before, or during the load. Maybe there's a different solution, though.

Yaron Koren (talkcontribs)

The set of parameters is now hardcoded in the Page Forms infobox, but you can see the old display here. Note, for example, that $wgPageFormsAutocompleteCacheTimeout, which defaults to null, is not listed there.

Reply to "Global params/vars that default to null are ignored"

Template mode categorization

4
Kai Burghardt (talkcontribs)

The categorization as Category: Extensions without MediaWiki version should be omitted if the templatemode parameter is nocats. Currently it’s always categorized if no version requirement can be determined, for instance seen in Extension status. I don’t feel confident enough to perform the edits myself so I’m posting this on the discussion page. Kai Burghardt (talk) 19:19, 9 February 2022 (UTC)

Ciencia Al Poder (talkcontribs)

Done!

Samwilson (talkcontribs)

Would it be good to add the nocats check to the cat() function? e.g.:

local function cat( title )
	local pargs = frame:getParent().args
	if pargs.templatemode == "nocats" then
		return ''
	end
	return '[[Category:' .. title .. ']]'
end
Kai Burghardt (talkcontribs)

Good suggestion, yet I think cat should really just emit a categorization string, to keep its behavior predictable. You may introduce a separate function, say ccat (conditional category), that checks for pargs.templatemode and relies on cat, because there might be a legit situation for categorization regardless of nocats By the way, currently, there are two occurrences of the string literal '[[Category:'. I guess this should be deduplicated. ‑‑Kai Burghardt (talk) 00:50, 10 February 2022 (UTC)

Reply to "Template mode categorization"

What do we do with copyrighted extensions? (meaning extensions with no specified FOSS license)

4
Kghbln (talkcontribs)

Do we add "C" to the array of licenses? What do you think? I personally think this is a viable option. As a matter of fact I would like to know if an extension is copyrighted.

BDavis (WMF) (talkcontribs)

I'm not sure I understand your question. All extensions are copyrighted by someone. Software licensing is based on the copyright system. The copyright holder(s) choose a software license which describes the terms under which they allow others to use their copyrighted work.

Kghbln (talkcontribs)

Ah, I meant closed source software.

Kghbln (talkcontribs)

Self answering: Well we have "unspecified" for this. :) For the rest we would probably need a new parameter which is out of scope for this Module.

Reply to "What do we do with copyrighted extensions? (meaning extensions with no specified FOSS license)"

error in Module:Extension at line 252: attempt to index local 'data' (a nil value).

2
PerfektesChaos (talkcontribs)

Box in Extension:FlaggedRevs. Might be missing or illegal parameter value, but should not crash, rather than issuing a precise message about unexpected usage.

Ciencia Al Poder (talkcontribs)

Thanks for the report! I think I've fixed it

From GPL-2.0+ to GPL-2.0-or-later

1
Kghbln (talkcontribs)

@Legoktm: I have updated the module to also accept the new v3.0 or v3.1 license strings and updated the links to actually point to the respective license text rather than to a general landing page. Perhaps it is time to migrate "GPL-2.0+" to "GPL-2.0-or-later" on extension pages with some bot.

GPL-2.0 is pretty nasty since this could mean "GPL-2.0-only" or "GPL-2.0-or-later" so this cannot be migrated automatically.

Perhaps you know somebody who operates a bot that is capable of migrating at least the obvious. No, I am not thinking of you but I know that you know a couple of people closer to the technical end.

There are no older topics