Page MenuHomePhabricator

Use (hidden) preference for copyright acknowledgment
Closed, ResolvedPublic

Description

Right now, the copyright message ("By clicking "save", you agree to the terms of use...") uses a cookie ("wikibase.acknowledgedentitycopyright") if you choose to remember the agreement.

A user preference would be an improvement, so it wouldn't be an annoyance for people with multiple computers or browsers, or who clear cookies occasionally.

Preferences can be hidden, and with the userjs- prefix, it is always hidden by default. See [[mw:API:Options]]. But I think the same thing can also be done with a full preference and $wgHiddenPrefs.


Version: master
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=47435

Details

Reference
bz47496

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz47496.

There is also something called 'API preferences', which are basically like normal ones, but not shown in the UI. I think ULS uses them.

Yes, I believe that is the same as the userjs I mentioned. FWIW, GettingStarted also uses this.

Not exactly the same, but similar. (I know, because I wrote the userjs- thing, but not the API prefs thing :P)

For clarification - the API prefs were added in I18a5ffb5, and the only different with "normal" prefs is that they're not displayed on [[Special:Preferences]]. This is accomplished by setting $ary['type'] = 'api' on the array describing form inputs for the given option (such as the ones in Preferences.php, and similarly in extensions). Thus there's nothing to document about them on that page (but possibly they should be documented elsewhere; dunno if they are).

The userjs- prefs, added in I5f9ba5b0, are essentially a key-value store for arbitrary data, and are documented there. These should really only be used by things that don't have access to PHP - ie., definitely not extensions.

Thanks, I will bear that in mind going forward.

In the meantime, the Wikibase cookie is actually a session cookie, since the expiration is not set to a number. So you have to redo it every time you start up the browser.

daniel added a comment.Aug 1 2013, 1:32 PM

Using a (hidden) user preference to store the "dismissed" state of the copyright warning seems like a good idea.

I think that preference should be a string representing the version of the copyright notice. The notice will not be shown if that string is equal to the current version of the notice (which is configured in a setting, or maybe taken from a system message).

This way, it is possible to make users see and dismiss a new version of the notice, should that become necessary. I expect this will be rare, but I think it should be possible.

Denny added a comment.Aug 1 2013, 1:43 PM

This might potentially lead to amassing such hidden preferences. It would be cleaner to reset these hidden prefs if a license change indeed happens, and keep the same hiddenpref-key. But I don't have a strong opinion. Whoever implements this should decide that.

And it does not block Bug 47435, it is one possible solution for it.

Change 89607 had a related patch set (by Bene) published:
(bug 47496) Use (hidden) preference for copyright acknowledgment

https://gerrit.wikimedia.org/r/89607

Change 89607 merged by jenkins-bot:
(bug 47496) Use (hidden) preference for copyright acknowledgment

https://gerrit.wikimedia.org/r/89607

I guess that fixes it.