Page MenuHomePhabricator

logparams.ids has different types for revision delete log entries
Open, Needs TriagePublic

Description

http://fr.wikipedia.org/w/api.php?action=query&list=recentchanges&rcstart=20150429101323&rcprop=loginfo&continue=
shows

{
    "type": "log",
    "pageid": 0,
    "revid": 0,
    "old_revid": 0,
    "rcid": 140837496,
    "logid": 71605251,
    "logtype": "delete",
    "logaction": "revision",
    "logparams": {
        "type": "revision",
        "ids": [
            114571419
        ],
        "old": {
            "bitmask": 0
        },
        "new": {
            "bitmask": 1,
            "content": ""
        }
    }
},

ids is a list of integers, while http://en.wikipedia.org/w/api.php?action=query&continue=-||&list=recentchanges&rcprop=loginfo|ids&rcstart=20150504T084624 shows

{
    "type": "log",
    "pageid": 46602579,
    "revid": 0,
    "old_revid": 0,
    "rcid": 734515412,
    "logid": 66106600,
    "logtype": "delete",
    "logaction": "revision",
    "logparams": {
        "type": "revision",
        "ids": [
            "660732412",
            "660732322"
        ],
        "old": {
            "bitmask": 0
        },
        "new": {
            "bitmask": 3,
            "content": "",
            "comment": ""
        }
    }
},

ids is a list of strings.

Event Timeline

LinJin created this task.May 4 2015, 12:41 PM
LinJin raised the priority of this task from to Needs Triage.
LinJin updated the task description. (Show Details)
LinJin added a subscriber: LinJin.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 4 2015, 12:41 PM
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.May 5 2015, 8:06 PM
Anomie added a subscriber: Anomie.

Removing MediaWiki-API since there's nothing the API can do here: RevDel types aren't always integers, so we can't blindly convert them.

LinJin added a comment.May 9 2015, 5:01 AM

Why not use strings only?

Umherirrender renamed this task from logparams.ids has different types to logparams.ids has different types for revision delete log entries.Dec 22 2015, 8:38 PM
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 22 2015, 8:38 PM