Last modified: 2011-02-08 21:56:26 UTC
For update all links from a page with the api it is necessary to get the full revision and put it as edit back (nulledit). But this is not possible for all users for full protected pages. Is there a way, not using the restricted action=edit for update all links of a page? Maybe add a linksupdate param to action=purge. Thanks.
What's the difference between the null edit and the purge...?
Nulledit also refreshed the database table like templatelinks, imagelinks, pagelinks and categorylinks and not only the html version of the page.
Hmm. It's doable through the interface, so the API could allow it. It's just about doing mass null edits that we might have issues...
(In reply to comment #3) > Hmm. > > It's doable through the interface, so the API could allow it. It's just about > doing mass null edits that we might have issues... As long as null edits would count towards the rate limit, this shouldn't create any new problems, right?
Indeed Marking it as action=purge&nulledit maybe As nulledit makes more sense in the wiki community, than "linkupdate"
(In reply to comment #5) > Indeed > Marking it as action=purge&nulledit maybe > As nulledit makes more sense in the wiki community, than "linkupdate" linkupdate is technical, that is right, but in my opinion the best description. But feel free to name it, like you find the best.
linkupdate may or may not be right depending on what will happen when one uses it ;-) if this new parameter will make a nulledit there is most likely more happening then just 'linkupdate'.
Created attachment 7951 [details] add param forcelinkupdate to action=purge Using LinksUpdate is not a nulledit. The attachment used LinksUpdate, but it does not aware of ratelimit. Feel free to modify.
I'm just wondering about resaving it to the cache. Seemingly, the parseroutput, and the article, aren't actually changed... I haven't actually looked how it's used elsewhere yet (I'm waiting for some things to run so I can find out) Will have a look later, unless you can enlighten me beforehand...
(In reply to comment #9) > I'm just wondering about resaving it to the cache. Seemingly, the parseroutput, > and the article, aren't actually changed... > ParserOutput contains the link arrays as well, so it quite possibly does change.
$this->mLinks = $parserOutput->getLinks(); The definitions in ParserOutput 00144 function &getLinks() { return $this->mLinks; } So it must do...
In EditPage if ( $wgUser->pingLimiter() ) { wfProfileOut( __METHOD__ . '-checks' ); wfProfileOut( __METHOD__ ); return self::AS_RATE_LIMITED; } Is it just doing the pingLimiter check whilst doing the linkupdate? Will the link update actually affect any of the counters that are doing this, or is adding it not going to be of much use...?
r79638 Tweaked patch applied, thanks for supplying it. Just a TODO/note on the commit, how do we want to deal with errors from the ping limiter