Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible problem in edit manager #279

Open
desb42 opened this issue Nov 13, 2018 · 1 comment
Open

Possible problem in edit manager #279

desb42 opened this issue Nov 13, 2018 · 1 comment

Comments

@desb42
Copy link
Collaborator

desb42 commented Nov 13, 2018

On researching #278 I stumbled across some code in Xog_tab_itm_edit_mgr.java
Line 103 reads

if (Bry_.Eq(page.Ttl().Page_db(), wiki.Props().Main_page()))

If the page is 'Main Page' then this will try to compare Main_Page with Main Page and fail
I believe using

if (Bry_.Eq(ttl.Page_db(), wiki.Props().Siteinfo_mainpage()))

will perform the correct check (which is what I do in Xow_portal_mgr.java)

Perhaps taking a leaf out of Mediawiki's book, introduce a ttl.isMainPage()?

@gnosygnu
Copy link
Owner

If the page is 'Main Page' then this will try to compare Main_Page with Main Page and fail
I believe using

if (Bry_.Eq(ttl.Page_db(), wiki.Props().Siteinfo_mainpage()))

will perform the correct check (which is what I do in Xow_portal_mgr.java)

Honestly, I really expected both to be the same. But in the end, Siteinfo_mainpage() should be correct. Main_page() should be deprecated: it's used to "override" the Main_Page that's found in the xml dump.

Perhaps taking a leaf out of Mediawiki's book, introduce a ttl.isMainPage()

It's a bit difficult. MediaWiki does this by checking the wfMessage: https://github.com/wikimedia/mediawiki/blob/master/includes/Title.php#L598

In contrast, XOWA's title object is pretty self-contained and doesn't have any dependencies on other objects. Adding a call to Xow_msg_mgr may add more headaches, especially since the Xoa_ttl class is used at such a low level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants