<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://es.seminaverbi.bibleget.io/w/index.php?action=history&amp;feed=atom&amp;title=M%C3%B3dulo%3ARedirect</id>
	<title>Módulo:Redirect - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://es.seminaverbi.bibleget.io/w/index.php?action=history&amp;feed=atom&amp;title=M%C3%B3dulo%3ARedirect"/>
	<link rel="alternate" type="text/html" href="https://es.seminaverbi.bibleget.io/w/index.php?title=M%C3%B3dulo:Redirect&amp;action=history"/>
	<updated>2026-04-14T02:46:44Z</updated>
	<subtitle>Historial de revisiones de esta página en la wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://es.seminaverbi.bibleget.io/w/index.php?title=M%C3%B3dulo:Redirect&amp;diff=131&amp;oldid=prev</id>
		<title>Johnrdorazio: 1 revisión importada</title>
		<link rel="alternate" type="text/html" href="https://es.seminaverbi.bibleget.io/w/index.php?title=M%C3%B3dulo:Redirect&amp;diff=131&amp;oldid=prev"/>
		<updated>2020-08-29T22:13:34Z</updated>

		<summary type="html">&lt;p&gt;1 revisión importada&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revisión del 22:13 29 ago 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;es&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Sin diferencias)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key seminaverbi_es:diff:1.41:old-130:rev-131 --&gt;
&lt;/table&gt;</summary>
		<author><name>Johnrdorazio</name></author>
	</entry>
	<entry>
		<id>https://es.seminaverbi.bibleget.io/w/index.php?title=M%C3%B3dulo:Redirect&amp;diff=130&amp;oldid=prev</id>
		<title>es&gt;MusikAnimal: Changed protection level for &quot;Module:Redirect&quot;: High-risk template or module; used in system message ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://es.seminaverbi.bibleget.io/w/index.php?title=M%C3%B3dulo:Redirect&amp;diff=130&amp;oldid=prev"/>
		<updated>2019-02-25T22:06:47Z</updated>

		<summary type="html">&lt;p&gt;Changed protection level for &amp;quot;&lt;a href=&quot;/wiki/M%C3%B3dulo:Redirect&quot; title=&quot;Módulo:Redirect&quot;&gt;Module:Redirect&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk template or module&lt;/a&gt;; used in system message ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module provides functions for getting the target of a redirect page.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Gets a mw.title object, using pcall to avoid generating script errors if we&lt;br /&gt;
-- are over the expensive function count limit (among other possible causes).&lt;br /&gt;
local function getTitle(...)&lt;br /&gt;
	local success, titleObj = pcall(mw.title.new, ...)&lt;br /&gt;
	if success then&lt;br /&gt;
		return titleObj&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Gets the name of a page that a redirect leads to, or nil if it isn&amp;#039;t a&lt;br /&gt;
-- redirect.&lt;br /&gt;
function p.getTargetFromText(text)&lt;br /&gt;
	return string.match(&lt;br /&gt;
		text,&lt;br /&gt;
		&amp;quot;^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]&amp;quot;&lt;br /&gt;
	) or string.match(&lt;br /&gt;
		text,&lt;br /&gt;
		&amp;quot;^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]&amp;quot;&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Gets the target of a redirect. If the page specified is not a redirect,&lt;br /&gt;
-- returns nil.&lt;br /&gt;
function p.getTarget(page, fulltext)&lt;br /&gt;
	-- Get the title object. Both page names and title objects are allowed&lt;br /&gt;
	-- as input.&lt;br /&gt;
	local titleObj&lt;br /&gt;
	if type(page) == &amp;#039;string&amp;#039; or type(page) == &amp;#039;number&amp;#039; then&lt;br /&gt;
		titleObj = getTitle(page)&lt;br /&gt;
	elseif type(page) == &amp;#039;table&amp;#039; and type(page.getContent) == &amp;#039;function&amp;#039; then&lt;br /&gt;
		titleObj = page&lt;br /&gt;
	else&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;quot;bad argument #1 to &amp;#039;getTarget&amp;#039;&amp;quot;&lt;br /&gt;
				.. &amp;quot; (string, number, or title object expected, got %s)&amp;quot;,&lt;br /&gt;
			type(page)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
	if not titleObj or not titleObj.isRedirect then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Find the target by using string matching on the page content.&lt;br /&gt;
	local target = p.getTargetFromText(titleObj:getContent() or &amp;quot;&amp;quot;)&lt;br /&gt;
	if target then&lt;br /&gt;
		local targetTitle = getTitle(target)&lt;br /&gt;
		if targetTitle then&lt;br /&gt;
			if fulltext then&lt;br /&gt;
				return targetTitle.fullText&lt;br /&gt;
			else&lt;br /&gt;
				return targetTitle.prefixedText&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- The page is a redirect, but matching failed. This indicates a bug in&lt;br /&gt;
		-- the redirect matching pattern, so throw an error.&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;#039;could not parse redirect on page &amp;quot;%s&amp;quot;&amp;#039;,&lt;br /&gt;
			fulltext and titleObj.fullText or titleObj.prefixedText&lt;br /&gt;
		))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Given a single page name determines what page it redirects to and returns the&lt;br /&gt;
-- target page name, or the passed page name when not a redirect. The passed&lt;br /&gt;
-- page name can be given as plain text or as a page link.&lt;br /&gt;
-- &lt;br /&gt;
-- Returns page name as plain text, or when the bracket parameter is given, as a&lt;br /&gt;
-- page link. Returns an error message when page does not exist or the redirect&lt;br /&gt;
-- target cannot be determined for some reason.&lt;br /&gt;
--]]&lt;br /&gt;
function p.luaMain(rname, bracket, fulltext)&lt;br /&gt;
	if type(rname) ~= &amp;quot;string&amp;quot; or not rname:find(&amp;quot;%S&amp;quot;) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	bracket = bracket and &amp;quot;[[%s]]&amp;quot; or &amp;quot;%s&amp;quot;&lt;br /&gt;
	rname = rname:match(&amp;quot;%[%[(.+)%]%]&amp;quot;) or rname&lt;br /&gt;
	local target = p.getTarget(rname, fulltext)&lt;br /&gt;
	local ret = target or rname&lt;br /&gt;
	ret = getTitle(ret)&lt;br /&gt;
	if ret then&lt;br /&gt;
		if fulltext then&lt;br /&gt;
			ret = ret.fullText&lt;br /&gt;
		else&lt;br /&gt;
			ret = ret.prefixedText&lt;br /&gt;
		end&lt;br /&gt;
		return bracket:format(ret)&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Provides access to the luaMain function from wikitext.&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {frameOnly = true})&lt;br /&gt;
	return p.luaMain(args[1], args.bracket, args.fulltext) or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns true if the specified page is a redirect, and false otherwise.&lt;br /&gt;
function p.luaIsRedirect(page)&lt;br /&gt;
	local titleObj = getTitle(page)&lt;br /&gt;
	if not titleObj then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	if titleObj.isRedirect then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Provides access to the luaIsRedirect function from wikitext, returning &amp;#039;yes&amp;#039;&lt;br /&gt;
-- if the specified page is a redirect, and the blank string otherwise.&lt;br /&gt;
function p.isRedirect(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {frameOnly = true})&lt;br /&gt;
	if p.luaIsRedirect(args[1]) then&lt;br /&gt;
		return &amp;#039;yes&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>es&gt;MusikAnimal</name></author>
	</entry>
</feed>