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

Krinkle <krinklem...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krinklem...@gmail.com

--- Comment #1 from Krinkle <krinklem...@gmail.com> 2011-02-27 02:51:37 UTC ---
Since it's hard to know the pageid (and thus the array item from pages), this
can be used as a work-around with &indexpageids


 $.getJSON(
    wgScriptPath + '/api.php?',
    {
        format: 'json',
        action: 'query',
        titles: 'Main Page',
        prop: 'info',
        indexpageids: '',
        intoken: 'edit'
    },
    function( data ) {
        if ( data.query.pages && data.query.pageids ) {
            pageid = data.query.pageids[0];
            token = data.query.pages[pageid].edittoken;
            alert( token );
        } else {
            alert( 'Fail!' );
        }
    }
 )

-- 
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