New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RFPP for normal users #190

Merged
merged 1 commit into from Nov 22, 2013

Conversation

Projects
None yet
3 participants
@azatoth
Owner

azatoth commented Nov 21, 2013

The current protection data was only read in for sysops

While changing that, removing the old protectionLevel as it was unused
and remove the async nature of the call.

@ghost ghost assigned atlight and Amalthea Nov 21, 2013

@atlight

This comment has been minimized.

Collaborator

atlight commented Nov 21, 2013

Synchronous requests are evil...

When you posted this I was halfway through my own fix - I'll put it up into a separate branch when I'm finished, to see if there are differences.

@azatoth

This comment has been minimized.

Owner

azatoth commented Nov 22, 2013

well, the actual request is async:-P only that it continues in the done() callback instead of relying on a timer.

@atlight

This comment has been minimized.

Collaborator

atlight commented Nov 22, 2013

I would happily merge this if L133 comment was addressed... although I'm not too sure why you're using mw.Api - you yourself wrote Morebits.wiki.api (aka Wikipedia.api) with its proper error handling :)

Other issue is if the initial API request fails for whatever reason, the whole thing is needlessly doomed, and the user doesn't even get told why (error gets logged to the console, not Morebits.status).

@azatoth

This comment has been minimized.

Owner

azatoth commented Nov 22, 2013

I wrote Morebits.api years before mw.Api() was made present.

On Fri, Nov 22, 2013 at 2:15 AM, This, that and the other <
notifications@github.com> wrote:

I would happily merge this if L133 comment was addressed... although I'm
not too sure why you're using mw.Api - you yourself wrote Morebits.wiki.api
(aka Wikipedia.api) with its proper error handling :)

Other issue is if the initial API request fails for whatever reason, the
whole thing is needlessly doomed, and the user doesn't even get told why
(error gets logged to the console, not Morebits.status).


Reply to this email directly or view it on GitHubhttps://github.com//pull/190#issuecomment-29041478
.

Carl Fürstenberg

@atlight

This comment has been minimized.

Collaborator

atlight commented Nov 22, 2013

If we're going to make more extensive use of mw.Api I think we would need to write a wrapper, to unify the error handling and integrate it with the Status system.

@azatoth

This comment has been minimized.

Owner

azatoth commented Nov 22, 2013

sure; Generally I've only planned to use mw.Api for simple query stuff
where the status system isn't wanted, for example
https://github.com/azatoth/twinkle/blob/master/modules/twinklearv.js#L331where
edits triggers new calls

On Fri, Nov 22, 2013 at 2:18 AM, This, that and the other <
notifications@github.com> wrote:

If we're going to make more extensive use of mw.Api I think we would need
to write a wrapper, to unify the error handling and integrate it with the
Status system.


Reply to this email directly or view it on GitHubhttps://github.com//pull/190#issuecomment-29041627
.

Carl Fürstenberg

@atlight

This comment has been minimized.

Collaborator

atlight commented Nov 22, 2013

Could you check this code on testwiki once done? I haven't been able to get it to work... maybe my test copy of morebits is outdated

@azatoth

This comment has been minimized.

Owner

azatoth commented Nov 22, 2013

What I usually do it in Firefox, fire up Web Developer → Scratchpad, load
the js file and run it, which will override the already loaded one onwiki.

On Fri, Nov 22, 2013 at 2:29 AM, This, that and the other <
notifications@github.com> wrote:

Could you check this code on testwiki once done? I haven't been able to
get it to work... maybe my test copy of morebits is outdated


Reply to this email directly or view it on GitHubhttps://github.com//pull/190#issuecomment-29042133
.

Carl Fürstenberg

@atlight

This comment has been minimized.

Collaborator

atlight commented Nov 22, 2013

That's my approach too, but my skeleton Twinkle backbone in https://test.wikipedia.org/wiki/User:This,_that_and_the_other/common.js has to be manually updated from time to time...

@azatoth

This comment has been minimized.

Owner

azatoth commented Nov 22, 2013

uploaded your branch to test now:
https://test.wikipedia.org/wiki/Special:Contributions/AzaToth

On Fri, Nov 22, 2013 at 2:34 AM, This, that and the other <
notifications@github.com> wrote:

That's my approach, but my skeleton Twinkle backbone in
https://test.wikipedia.org/wiki/User:This,_that_and_the_other/common.jshas to be manually updated from time to time...


Reply to this email directly or view it on GitHubhttps://github.com//pull/190#issuecomment-29042368
.

Carl Fürstenberg

@atlight

This comment has been minimized.

Collaborator

atlight commented Nov 22, 2013

Seems fine

Fix RFPP for normal users
The current protection data was only read in for sysops

azatoth added a commit that referenced this pull request Nov 22, 2013

Merge pull request #190 from azatoth/fix_rfpp
Fix RFPP for normal users

@azatoth azatoth merged commit 4651c68 into master Nov 22, 2013

@azatoth azatoth deleted the fix_rfpp branch Nov 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment