1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02:00

Handle page names with _ correctly, as for package ids

This commit is contained in:
Ciaran Gultnieks 2012-09-10 22:49:10 +01:00
parent 09e296d2de
commit 6274d071a7

View File

@ -139,10 +139,11 @@ def update_wiki(apps, apks, verbose=False):
# with an redirect to itself! (Although it seems like an odd
# scenario this happens a lot, e.g. where there is metadata but no
# builds or binaries to extract a name from.
if app['Name'] == pagename:
apppagename = app['Name'].replace('_', ' ')
if apppagename == pagename:
noclobber = True
if not noclobber:
generated_pages[app['Name']] = "#REDIRECT [[" + pagename + "]]\n[[Category:" + wikicat + "]]"
generated_pages[apppagename] = "#REDIRECT [[" + pagename + "]]\n[[Category:" + wikicat + "]]"
catpages = site.Pages['Category:' + wikicat]
existingpages = []