<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.nations.fr/index.php?action=history&amp;feed=atom&amp;title=Module%3AProtection</id>
	<title>Module:Protection - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nations.fr/index.php?action=history&amp;feed=atom&amp;title=Module%3AProtection"/>
	<link rel="alternate" type="text/html" href="https://wiki.nations.fr/index.php?title=Module:Protection&amp;action=history"/>
	<updated>2026-04-09T00:50:19Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.nations.fr/index.php?title=Module:Protection&amp;diff=282&amp;oldid=prev</id>
		<title>Administrateur : 1 révision importée</title>
		<link rel="alternate" type="text/html" href="https://wiki.nations.fr/index.php?title=Module:Protection&amp;diff=282&amp;oldid=prev"/>
		<updated>2019-06-26T22:30:47Z</updated>

		<summary type="html">&lt;p&gt;1 révision importée&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 26 juin 2019 à 22:30&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;fr&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Aucune différence)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Administrateur</name></author>
	</entry>
	<entry>
		<id>https://wiki.nations.fr/index.php?title=Module:Protection&amp;diff=281&amp;oldid=prev</id>
		<title>fr&gt;Od1n : suppression paramètre « nombre » : utilité proche de zéro et laborieux à mettre à jour (si ça l'est…)</title>
		<link rel="alternate" type="text/html" href="https://wiki.nations.fr/index.php?title=Module:Protection&amp;diff=281&amp;oldid=prev"/>
		<updated>2016-06-22T03:49:01Z</updated>

		<summary type="html">&lt;p&gt;suppression paramètre « nombre » : utilité proche de zéro et laborieux à mettre à jour (si ça l&amp;#039;est…)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Ce module implémente les modèles {{Protection}}, {{Semi-protection étendue}}, {{Semi-protection}}, {{Semi-protection longue}} et {{Nom protégé}}.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Chargement du module de données.&lt;br /&gt;
local donnees = mw.loadData('Module:Protection/Données')&lt;br /&gt;
&lt;br /&gt;
-- Définition des tables de données.&lt;br /&gt;
local types = donnees.types&lt;br /&gt;
local cfg = donnees.configuration&lt;br /&gt;
&lt;br /&gt;
--Redéfinitions utiles.&lt;br /&gt;
local format = mw.ustring.format&lt;br /&gt;
local insert = table.insert&lt;br /&gt;
&lt;br /&gt;
local function protectionPage(typeProtection, modeProtection, titrePage)&lt;br /&gt;
	-- Retourne vrai si la page courante est protégée et correspond&lt;br /&gt;
	-- au type de protection.&lt;br /&gt;
	local action = types[typeProtection].action or 'edit'&lt;br /&gt;
	local niveau = titrePage.protectionLevels[action] and titrePage.protectionLevels[action][1]&lt;br /&gt;
	return modeProtection.niveau == niveau&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function estSousPage(titrePage)&lt;br /&gt;
	-- Teste si la page actuelle est une sous-page /Documentation,&lt;br /&gt;
	-- /Bac à sable ou /Test de modèle ou de module. Retourne vrai&lt;br /&gt;
	-- si c'est le cas et faux sinon.&lt;br /&gt;
	local espaceNom = titrePage.nsText == 'Modèle' or titrePage.nsText == 'Module'&lt;br /&gt;
	local sousPage = titrePage.isSubpage and &lt;br /&gt;
		(titrePage.subpageText == 'Documentation'&lt;br /&gt;
		or titrePage.subpageText == 'Bac à sable'&lt;br /&gt;
		or titrePage.subpageText == 'Test')&lt;br /&gt;
 &lt;br /&gt;
	return espaceNom and sousPage&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
local function creerIconeTitre(modeProtection)&lt;br /&gt;
	local iconeTitre = require('Module:Icône de titre')._main&lt;br /&gt;
	local argsIcone = {&lt;br /&gt;
		image  = modeProtection.image,&lt;br /&gt;
		lien   = modeProtection.lien,&lt;br /&gt;
		texte  = modeProtection.texte,&lt;br /&gt;
		taille = 15,&lt;br /&gt;
		id     = modeProtection.id or 'protection-edition'&lt;br /&gt;
	}&lt;br /&gt;
 &lt;br /&gt;
	return iconeTitre(argsIcone)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function insertionCategorie(typeProtection, nsPage)&lt;br /&gt;
	local nomCategorie = typeProtection.categorie[nsPage]&lt;br /&gt;
	local defautCategorie = typeProtection.categorie['défaut']&lt;br /&gt;
	local lienCategorie = '[[Catégorie:%s]]'&lt;br /&gt;
 &lt;br /&gt;
	return format(lienCategorie, nomCategorie or defautCategorie)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bandeauProtection(titrePage, args)&lt;br /&gt;
	local nsPage = args.nsdoc or titrePage.nsText&lt;br /&gt;
	local titre = cfg[nsPage] or cfg['titreDéfaut']&lt;br /&gt;
	local texte = mw.html.create('span')&lt;br /&gt;
	local pageDiscussion, lienAdmin, lienJournal&lt;br /&gt;
 &lt;br /&gt;
	-- Gestion du nombre d'inclusions pour les modèles/modules.&lt;br /&gt;
	if nsPage == 'Modèle' or nsPage == 'Module' then&lt;br /&gt;
		titre = format(titre, titrePage:partialUrl())&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	-- Gestion du paramètre 'texte' et de ses liens internes&lt;br /&gt;
	pageDiscussion = tostring(titrePage.talkPageTitle)&lt;br /&gt;
	lienAdmin = mw.title.new(cfg['lienAdmin'])&lt;br /&gt;
		:fullUrl(format(cfg['optionAdmin'],&lt;br /&gt;
			mw.uri.encode(titrePage.fullText, 'WIKI')))&lt;br /&gt;
	if nsPage == '' then lienAdmin = lienAdmin .. cfg['option2Admin'] end&lt;br /&gt;
	lienJournal = mw.title.new(cfg['lienJournal'])&lt;br /&gt;
		:fullUrl(format(cfg['optionJournal'],&lt;br /&gt;
			mw.uri.encode(titrePage.fullText, 'WIKI')))&lt;br /&gt;
 	&lt;br /&gt;
	texte&lt;br /&gt;
		:addClass('plainlinks')&lt;br /&gt;
		:wikitext(format(cfg['texteBandeau'], &lt;br /&gt;
			pageDiscussion, pageDiscussion, lienAdmin, lienJournal))&lt;br /&gt;
 &lt;br /&gt;
	return require('Module:Bandeau')._bandeauAvertissement{&lt;br /&gt;
		niveau    = 'information',&lt;br /&gt;
		['icône'] = types['protection'].image,&lt;br /&gt;
		titre     = args[1] or titre,&lt;br /&gt;
		texte     = tostring(texte)&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(args, typeProtection, titrePage)&lt;br /&gt;
	typeProtection = typeProtection or 'protection'&lt;br /&gt;
	local modeProtection = types[typeProtection]&lt;br /&gt;
	local titrePage = titrePage or mw.title.getCurrentTitle()&lt;br /&gt;
	local res = {}&lt;br /&gt;
 &lt;br /&gt;
	if typeProtection == 'protection' and args.nocat then&lt;br /&gt;
		return bandeauProtection(titrePage, args)&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	if protectionPage(typeProtection, modeProtection, titrePage) then&lt;br /&gt;
		-- Création de l'icône de titre selon le mode de protection.&lt;br /&gt;
		insert(res, creerIconeTitre(modeProtection))&lt;br /&gt;
		-- Création du bandeau de protection pour le mode 'protection'.&lt;br /&gt;
		if typeProtection == 'protection' then&lt;br /&gt;
			insert(res, bandeauProtection(titrePage, args))&lt;br /&gt;
		end&lt;br /&gt;
		-- Catégorisation selon le mode de protection.&lt;br /&gt;
		insert(res, insertionCategorie(modeProtection, titrePage.nsText))&lt;br /&gt;
	elseif not estSousPage(titrePage) then&lt;br /&gt;
		-- Catégorisation lorsque le niveau de protection en écriture ne&lt;br /&gt;
		-- correspond pas ou plus. Note : les sous-pages '/Documentation',&lt;br /&gt;
		-- '/Bac à sable' ou '/Test' appartenant aux modèles ou aux modules&lt;br /&gt;
		-- ne sont pas – et ne doivent pas être – concernées.&lt;br /&gt;
		insert(res, '[[Catégorie:Page dont la protection est à vérifier]]')&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	return table.concat(res)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function adaptateur(nomFonction)&lt;br /&gt;
	return function (frame)&lt;br /&gt;
		local args = {}&lt;br /&gt;
		local argsParent = frame:getParent().args&lt;br /&gt;
 &lt;br /&gt;
		-- Paramètres vides interprétés par Lua.&lt;br /&gt;
		for cle, val in pairs(argsParent) do&lt;br /&gt;
			if val ~= '' or cle == 'nsdoc' then&lt;br /&gt;
				args[cle] = mw.text.trim(val)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
 &lt;br /&gt;
		return p.main(args, nomFonction)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
-- Insertion dans la table p des fonctions appelées par les&lt;br /&gt;
-- modèles à l'aide d'un adaptateur de fonction.&lt;br /&gt;
local nomsFonction = {'protection', 'semiProtectionEtendue', 'semiProtection', 'semiProtectionLongue', 'nomProtégé'} &lt;br /&gt;
for _, nomFonction in ipairs(nomsFonction) do&lt;br /&gt;
	p[nomFonction] = adaptateur(nomFonction)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>fr&gt;Od1n</name></author>
	</entry>
</feed>