I've noticed something a little strange about the "editable" key that the
mobileview API returns. It seems it's either "true" or the empty string if
the page is editable, or either "false" or absent from the response if the
page is not editable. Whether it goes for the empty string/absent or
true/false approach seems to vary from wiki to wiki.

Examples (make sure you're not logged in on an admin account when you click
these, because admin accounts can edit almost all pages):

   - Foo @ testwiki
   
<https://test.wikipedia.org/w/api.php?action=mobileview&page=Foo&prop=editable>
-
   response is the empty string on an editable page
   - Protected page @ testwiki
   
<https://test.wikipedia.org/w/api.php?action=mobileview&page=Protected_page&prop=editable>
-
   response is absent on a protected page
   - Manchester @ enwiki
   
<https://en.wikipedia.org/w/api.php?action=mobileview&page=Manchester&prop=editable>
-
   response is true on an editable page
   - Barack Obama @ enwiki
   
<https://en.wikipedia.org/w/api.php?action=mobileview&page=Barack%20Obama&prop=editable>
-
   response is false on a protected page

Does anyone know why this is? It'd be nice if this could be changed,
because it's a pain to deal with things like this in a strongly-typed
language like Java.

Thanks,
Dan

-- 
Dan Garry
Product Manager, Search and Discovery
Wikimedia Foundation
_______________________________________________
Mobile-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mobile-l

Reply via email to