From dd1348fc8518e06dbf4c5589de40efff914ff690 Mon Sep 17 00:00:00 2001 From: yzhh <31803608+OasisAkari@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:41:46 +0800 Subject: [PATCH] bugfix --- modules/wiki/utils/wikilib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/wiki/utils/wikilib.py b/modules/wiki/utils/wikilib.py index 9a73b63a55..7503f35764 100644 --- a/modules/wiki/utils/wikilib.py +++ b/modules/wiki/utils/wikilib.py @@ -725,7 +725,7 @@ async def search_something(srwhat): page_info.link = full_url page_info.file = file page_info.desc = page_desc - if not _iw and not page_info.args: + if not _iw and not page_info.args and page_info.id != -1: page_info.link = self.wiki_info.script + f'?curid={page_info.id}' else: page_info.title = query_langlinks.title @@ -758,7 +758,7 @@ async def search_something(srwhat): page_info.before_title = before_page_info.title t = page_info.title if t: - if before_page_info.args: + if before_page_info.args or page_info.id == -1: page_info.before_title += urllib.parse.unquote(before_page_info.args) t += urllib.parse.unquote(before_page_info.args) if page_info.link: