https://bugzilla.wikimedia.org/show_bug.cgi?id=25508

           Summary: Poor API behavior when the SUL account does not exist
           Product: MediaWiki extensions
           Version: any
          Platform: All
               URL: http://en.wikipedia.org/w/api.php?action=query&meta=gl
                    obaluserinfo&guiuser=Eddie&guiprop=groups|merged|unatt
                    ached
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: CentralAuth
        AssignedTo: vasi...@gmail.com
        ReportedBy: b-jor...@alum.northwestern.edu
                CC: agarr...@wikimedia.org


Created attachment 7730
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=7730
Completely untested patch

When the SUL account does not exist, meta=globaluserinfo returns a fatal error
from the API. The core API query modules, on the other hand, normally just set
a "missing" property on the appropriate result node, which allows other modules
in the same query to return results.

I'd really like to see something like this as a return from the above URL:

<?xml version="1.0"?>
<api>
  <query>
    <globaluserinfo missing="">
      <unattached>
        <account wiki="alswiki" editcount="0" />
        <account wiki="arwiki" editcount="0" />
        <account wiki="cowiki" editcount="1" />
        <account wiki="commonswiki" editcount="0" />
        <account wiki="cswiki" editcount="0" />
        <account wiki="dawiki" editcount="0" />
        <account wiki="dewiki" editcount="0" />
        <account wiki="elwiki" editcount="0" />
        <account wiki="enwikibooks" editcount="0" />
        <account wiki="enwikinews" editcount="0" />
        <account wiki="enwiki" editcount="46" />
...
        <account wiki="yiwiki" editcount="0" />
        <account wiki="zhwiki" editcount="0" />
      </unattached>
    </globaluserinfo>
  </query>
</api>

In other words, still include the "unattached" info even when the SUL account
is missing. I have no way to test it, but it might be as simple as the attached
patch. You'd want to fix the indentation, of course, but I know MediaWiki devs
like to review patches without indentation changes.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to