Page MenuHomePhabricator

Fix HistoryEntryPersistenceHelper and SavedPagesPersistenceHelper so they do not inappropriately set the namespace of all pages to null
Closed, ResolvedPublic

Description

HistoryEntryPersistenceHelper and SavedPagesPersistenceHelper inappropriately set the namespace of all pages to null. They shouldn't do that.

Once this is done, please also update the documentation of the namespace field in the PageTitle class so that it doesn't say this problem still exists. :-)

Constructors like this are the offenders:

public SavedPage fromCursor(Cursor c) {
    // Carefully, get them back by using position only
    Site site = new Site(c.getString(COL_INDEX_SITE));
    // FIXME: Does not handle non mainspace pages
    PageTitle title = new PageTitle(null, c.getString(COL_INDEX_TITLE), site);
    Date timestamp = new Date(c.getLong(COL_INDEX_TIME));
    return new SavedPage(title, timestamp);
}

Event Timeline

Deskana raised the priority of this task from to Medium.
Deskana updated the task description. (Show Details)
Deskana subscribed.

Change 207727 had a related patch set uploaded (by Deskana):
Make some PersistenceHelpers set the namespace of pages as appropriate

https://gerrit.wikimedia.org/r/207727

Change 207727 merged by jenkins-bot:
Make some PersistenceHelpers set the namespace of pages as appropriate

https://gerrit.wikimedia.org/r/207727