Last modified: 2013-04-22 16:16:59 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 T30484, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28484 - Add edit count metric (wgEditCount) to user-specific config information available in page source
Add edit count metric (wgEditCount) to user-specific config information avail...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-10 20:53 UTC by MZMcBride
Modified: 2013-04-22 16:16 UTC (History)
4 users (show)

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


Attachments

Description MZMcBride 2011-04-10 20:53:52 UTC
I'm not sure it's still technically CDATA, but there are values in the page source that JavaScript scripts can easily look up (e.g., wgPageName and wgCanonicalNamespace). It would be helpful to be able to easily look up a user's edit count using a wgEditCount variable. This would help with targeting scripts to more experienced or inexperienced users, for example, without needing a separate API call.

I'm not sure what the behavior should be for logged out users. I think wgEditCount = 0 makes the most sense, though maybe there are better alternatives.
Comment 1 Roan Kattouw 2011-04-11 11:32:14 UTC
(In reply to comment #0)
> I'm not sure it's still technically CDATA, but there are values in the page
> source that JavaScript scripts can easily look up (e.g., wgPageName and
> wgCanonicalNamespace). It would be helpful to be able to easily look up a
> user's edit count using a wgEditCount variable. This would help with targeting
> scripts to more experienced or inexperienced users, for example, without
> needing a separate API call.
> 
Per-user stuff should be added in Skin::makeGlobalVariablesScript() IIRC.

> I'm not sure what the behavior should be for logged out users. I think
> wgEditCount = 0 makes the most sense, though maybe there are better
> alternatives.
Zero sounds good to me. Scripts can already detect whether the user is logged in or not anyway.
Comment 2 Matthew Flaschen 2013-02-22 05:40:30 UTC
See https://gerrit.wikimedia.org/r/#/c/45257/ , by Ori Livneh.

I think null is less misleading than 0, though.
Comment 3 Andre Klapper 2013-02-27 22:06:46 UTC
(In reply to comment #2)
> See https://gerrit.wikimedia.org/r/#/c/45257/

Patch obsoleted by https://gerrit.wikimedia.org/r/#/c/51081/ and merged.
Is anything else needed or can this be closed as FIXED?
Comment 4 Ori Livneh 2013-02-27 22:07:29 UTC
We can close it.

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


Navigation
Links