Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Undefined array key 1 in /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 339

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 253

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 80
Модуль:Category handler/shared — Энциклопедия Акриции

Модуль:Category handler/shared

Материал из Энциклопедия Акриции
Версия от 08:42, 8 января 2024; Unifiedakricia (обсуждение | вклад) (Новая страница: «-- This module contains shared functions used by Module:Category handler -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings e...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Для документации этого модуля может быть создана страница Модуль:Category handler/shared/doc

-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.

local p = {}

function p.matchesBlacklist(page, blacklist)
	for i, pattern in ipairs(blacklist) do
		local match = mw.ustring.match(page, pattern)
		if match then
			return true
		end
	end
	return false
end

function p.getParamMappings(useLoadData)
	local dataPage = 'Module:Namespace detect/data'
	if useLoadData then
		return mw.loadData(dataPage).mappings
	else
		return require(dataPage).mappings
	end
end

function p.getNamespaceParameters(titleObj, mappings)
	-- We don't use title.nsText for the namespace name because it adds
	-- underscores.
	local mappingsKey
	if titleObj.isTalkPage then
		mappingsKey = 'talk'
	else
		mappingsKey = mw.site.namespaces[titleObj.namespace].name
	end
	mappingsKey = mw.ustring.lower(mappingsKey)
	return mappings[mappingsKey] or {}
end

return p

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /lilacspace/sites/ru.wiki.akrt.me/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php:339) in /lilacspace/sites/ru.wiki.akrt.me/includes/Request/WebResponse.php on line 80