無編輯摘要
imported>CYL992 (建立內容為「local data = require('Module:Template:Delete/data') local z = {} function extractAliases(item) allnames = {item['code']} for j, alias in ipairs(item['aliases']) do table.insert(allnames, alias) end return allnames end function extractShortDesc(item) if item['description'] then return item['description']:gsub('{', '{'):gsub('}', '}'):gsub('|', '|') else return '' end end function extractDe…」的新頁面) |
無編輯摘要 |
||
第116行: | 第116行: | ||
end | end | ||
end | end | ||
if title.namespace == 2 and (item['code'] == 'O1' or item['code'] == 'G10') then | if title.namespace == 2 and (item['code'] == 'O1' or item['code'] == 'G10') then | ||
rowsuffix2 = args.cat or args.cate or args.category or ('[[Category: | rowsuffix2 = args.cat or args.cate or args.category or ('[[Category:O1快速刪除候選]]') | ||
end | end | ||
if check then | if check then | ||
rowsuffix = '<br><span class="error">' .. check .. '</span>' .. (args.cat or args.cate or args.category or '[[Category: | rowsuffix = '<br><span class="error">' .. check .. '</span>' .. (args.cat or args.cate or args.category or '[[Category:快速刪除候選|錯]]') | ||
else | else | ||
if frame.args.deletelink then | if frame.args.deletelink then | ||
table.insert(deletelinks, '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]: ' .. extractDeleteReason(item) .. deletesuffix) | table.insert(deletelinks, '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]: ' .. extractDeleteReason(item) .. deletesuffix) | ||
end | end | ||
rowsuffix = args.cat or args.cate or args.category or ('[[Category: | rowsuffix = args.cat or args.cate or args.category or ('[[Category:快速刪除候選|' .. (item['category'] or '速') .. ']]') | ||
end | end | ||
if deletesuffix then | if deletesuffix then | ||
第141行: | 第140行: | ||
-- try to read it as a title | -- try to read it as a title | ||
title = mw.title.new(mw.text.trim(arg)) | title = mw.title.new(mw.text.trim(arg)) | ||
cat = args.cat or args.cate or args.category or '[[Category: | cat = args.cat or args.cate or args.category or '[[Category:快速刪除候選|速]]' | ||
if title and title.exists then | if title and title.exists then | ||
if frame.args.deletelink then | if frame.args.deletelink then | ||
第171行: | 第170行: | ||
return mw.text.trim(table.concat(pretext) .. '\n' .. table.concat(rows, '\n')) | return mw.text.trim(table.concat(pretext) .. '\n' .. table.concat(rows, '\n')) | ||
else | else | ||
return '<span style="font-weight:bold;color:red;">(請填寫理由)</span>' .. (args.cat or args.cate or args.category or '[[Category: | return '<span style="font-weight:bold;color:red;">(請填寫理由)</span>' .. (args.cat or args.cate or args.category or '[[Category:快速刪除候選|錯]]') | ||
end | end | ||
end | end | ||
return z | return z |