<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Modul:Redirect hatnote - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Modul:Redirect_hatnote&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Wed, 18 Nov 2026 08:09:12 GMT</lastBuildDate>
		<item>
			<title>Programmer: Oʻzbekcha Vikipediyadan import qilindi.</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:Redirect_hatnote&amp;diff=110308&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:Redirect_hatnote&amp;diff=110308&amp;oldid=prev</guid>
			<description>&lt;p&gt;Oʻzbekcha Vikipediyadan import qilindi.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Yangi sahifa&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
local mHatList = require(&amp;#039;Module:Hatnote list&amp;#039;)&lt;br /&gt;
local mArguments --lazily initialize&lt;br /&gt;
local libraryUtil = require(&amp;#039;libraryUtil&amp;#039;)&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
local checkTypeMulti = libraryUtil.checkTypeMulti&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Yordamchi funksiyalar&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function getTitle(...)&lt;br /&gt;
	 &lt;br /&gt;
	local success, titleObj = pcall(mw.title.new, ...)&lt;br /&gt;
	return success and titleObj or nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Asosiy funksiyalar&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.redirect(frame)&lt;br /&gt;
	mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
	local args = mArguments.getArgs(frame, {parentOnly=true})&lt;br /&gt;
	--Get number of redirects&lt;br /&gt;
	local numRedirects = tonumber(frame.args[1]) or 1&lt;br /&gt;
	-- Create the options table.&lt;br /&gt;
	local options = {}&lt;br /&gt;
	options.selfref = args.selfref&lt;br /&gt;
	return p._redirect(args, numRedirects, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._redirect(args, numRedirects, options, currentTitle, redirectTitle, targetTitle)&lt;br /&gt;
	 &lt;br /&gt;
	checkType(&amp;#039;_redirect&amp;#039;, 1, args, &amp;#039;table&amp;#039;)&lt;br /&gt;
	checkType(&amp;#039;_redirect&amp;#039;, 2, numRedirects, &amp;#039;number&amp;#039;, true)&lt;br /&gt;
	numRedirects = numRedirects or 1&lt;br /&gt;
	checkType(&amp;#039;_redirect&amp;#039;, 3, options, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	currentTitle = currentTitle or mw.title.getCurrentTitle()&lt;br /&gt;
	 &lt;br /&gt;
	local redirect = {}&lt;br /&gt;
	for i = 1, numRedirects do&lt;br /&gt;
		 &lt;br /&gt;
		if not args[i] then&lt;br /&gt;
			return mHatnote.makeWikitextError(&lt;br /&gt;
				&amp;#039;missing redirect parameter&amp;#039;,&lt;br /&gt;
				&amp;#039;Andoza:Yoʻnaltirish#Errors&amp;#039;,&lt;br /&gt;
				args.category&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
		redirect[i] = args[i]&lt;br /&gt;
	end&lt;br /&gt;
	-- Matn&lt;br /&gt;
	local formattedRedirect = {}&lt;br /&gt;
	for k,v in pairs(redirect) do&lt;br /&gt;
		formattedRedirect[k] = &amp;#039;„&amp;#039; .. v .. &amp;#039;“&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	local text = {&lt;br /&gt;
		mHatList.andList(formattedRedirect) .. &amp;#039; soʻrovi bu yerga &amp;#039; .. (#redirect == 1 and &amp;#039;yoʻnaltiriladi&amp;#039; or &amp;#039;yoʻnaltiriladi&amp;#039;) .. &amp;#039;.&amp;#039;,&lt;br /&gt;
		mHatList._forSee(args, #redirect + 1, {title = redirect[1], extratext = args.text})&lt;br /&gt;
	}&lt;br /&gt;
	text = table.concat(text, &amp;#039; &amp;#039;)&lt;br /&gt;
	 &lt;br /&gt;
	local categoryTable = {}&lt;br /&gt;
	local function addCategory(cat)&lt;br /&gt;
		if cat and cat ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			 &lt;br /&gt;
			categoryTable[string.format(&amp;#039;[[Turkum:%s]]&amp;#039;, cat)] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	 &lt;br /&gt;
	local mhOptions = {}&lt;br /&gt;
	local redirTitle&lt;br /&gt;
	for k,v in pairs(redirect) do&lt;br /&gt;
		 &lt;br /&gt;
		if not v:find(&amp;#039;^REDIRECT%d*$&amp;#039;) and v ~= &amp;#039;TERM&amp;#039; -- &lt;br /&gt;
			and currentTitle.namespace == 0 or currentTitle.namespace == 14&lt;br /&gt;
		then&lt;br /&gt;
			redirTitle = redirectTitle or getTitle(v)&lt;br /&gt;
			if not redirTitle or not redirTitle.exists then&lt;br /&gt;
				addCategory(&amp;#039;Missing redirects&amp;#039;)&lt;br /&gt;
			elseif not redirTitle.isRedirect then&lt;br /&gt;
				if string.find(redirTitle:getContent(), &amp;#039;#invoke:RfD&amp;#039;) then&lt;br /&gt;
					addCategory(&amp;#039;&amp;#039;)&lt;br /&gt;
				else&lt;br /&gt;
					addCategory(&amp;#039;&amp;#039;)&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				local target = targetTitle or redirTitle.redirectTarget&lt;br /&gt;
				if target and target ~= currentTitle then&lt;br /&gt;
					addCategory(&amp;#039;&amp;#039;)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if currentTitle.namespace == 0 and not mhOptions.selfref&lt;br /&gt;
			and redirTitle and redirTitle.namespace ~= 0&lt;br /&gt;
		then&lt;br /&gt;
&lt;br /&gt;
			mhOptions.selfref = true&lt;br /&gt;
		else&lt;br /&gt;
			mhOptions.selfref = options.selfref&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local category = &amp;#039;&amp;#039;&lt;br /&gt;
	for k,v in pairs(categoryTable) do&lt;br /&gt;
		category = category .. k&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return mHatnote._hatnote(text, mhOptions) .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 12:11:50 GMT</pubDate>
			<dc:creator>Programmer</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:Redirect_hatnote</comments>
		</item>
</channel></rss>