打开/关闭菜单
60
73
29
1.1K
武外梗百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Module:LatestPages:修订间差异

武外梗百科 爱国好学自强图新的百科全书
创建页面,内容为“local p = {} function p.render(frame) local limit = tonumber(frame.args.count) or 6 local pages = mw.site.stats.pagesInCategory -- 占位,强制加载 local api = mw.api local result = api.get({ action = "query", list = "recentchanges", rctype = "new", rcnamespace = 0, rclimit = limit, rcprop = "title|timestamp" }) if not result or not result.query or not result.query.recentchanges th…”
 
无编辑摘要
 
第4行: 第4行:
     local limit = tonumber(frame.args.count) or 6
     local limit = tonumber(frame.args.count) or 6


     local pages = mw.site.stats.pagesInCategory -- 占位,强制加载
     local result = mw.api.get({
    local api = mw.api
 
    local result = api.get({
         action = "query",
         action = "query",
         list = "recentchanges",
         list = "recentchanges",
第16行: 第13行:
     })
     })


     if not result or not result.query or not result.query.recentchanges then
     if not result
        or not result.query
        or not result.query.recentchanges
        or #result.query.recentchanges == 0
    then
         return "<p>暂无最新页面。</p>"
         return "<p>暂无最新页面。</p>"
     end
     end