Last modified: 2011-02-08 21:56:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28498, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26498 - allow LinksUpdate with API
allow LinksUpdate with API
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-30 09:25 UTC by Umherirrender
Modified: 2011-02-08 21:56 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
add param forcelinkupdate to action=purge (1.25 KB, patch)
2011-01-01 20:44 UTC, Umherirrender
Details

Description Umherirrender 2010-12-30 09:25:03 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.
Comment 1 Sam Reed (reedy) 2010-12-30 16:33:07 UTC
What's the difference between the null edit and the purge...?
Comment 2 Umherirrender 2010-12-30 16:50:11 UTC
Nulledit also refreshed the database table like templatelinks, imagelinks, pagelinks and categorylinks and not only the html version of the page.
Comment 3 Sam Reed (reedy) 2010-12-30 20:04:35 UTC
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...
Comment 4 Roan Kattouw 2010-12-31 14:24:17 UTC
(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?
Comment 5 Sam Reed (reedy) 2010-12-31 16:28:14 UTC
Indeed

Marking it as action=purge&nulledit maybe

As nulledit makes more sense in the wiki community, than "linkupdate"
Comment 6 Umherirrender 2010-12-31 16:46:01 UTC
(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.
Comment 7 Krinkle 2010-12-31 16:49:30 UTC
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'.
Comment 8 Umherirrender 2011-01-01 20:44:27 UTC
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.
Comment 9 Sam Reed (reedy) 2011-01-01 23:37:34 UTC
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...
Comment 10 Roan Kattouw 2011-01-01 23:39:22 UTC
(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.
Comment 11 Sam Reed (reedy) 2011-01-01 23:44:52 UTC
$this->mLinks = $parserOutput->getLinks();

The definitions in ParserOutput

00144         function &getLinks()                 { return $this->mLinks; }

So it must do...
Comment 12 Sam Reed (reedy) 2011-01-02 03:34:37 UTC
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...?
Comment 13 Sam Reed (reedy) 2011-01-05 03:33:55 UTC
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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links