Changed InfoAction::pageCounts to be non-static, so
it's able to access $this to get the Config object.
Also replaced instances of $wgScript with wfScript().
Change-Id: I4a6a3224e762f13640af04a73e2934b887dffedd
Variants included 'in <version>', 'as of <version>' and just the
version number.
Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.
Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Change-Id: I64e8cfe478cb0ba438f40b0631d6e9049cdab567
These types of requests can be cached for a short time (~5 min) in
Squid/Varnish.
Change importScript to be consistent with importStylesheet in the query
parameter order (title, action, ctype).
We only send purges for the exact urls as used by importScript and
importStylesheet.
Note: ResourceLoader things have their cache handled separately and
aren't affected by this change.
Users like instant updating of scripts after having changed them.
Bug: 56874
Change-Id: Idaa8552cf371dbafeb8b730f35b3b5c4fc339fb0
Fixes for action=raw (used when sites include other site's javascript),
and stashed images.
Bug: 53032
Change-Id: I8f915f6a4756f750c74d9ee9bec58f7ba6c0c827
OAuth was going to return different values for UserIsEveryoneAllowed
depending on whether OAuth headers were provided, so the bolding on
Special:SpecialPages wouldn't be odd. That wasn't liked, so instead
we'll only mark special pages as restricted based on $wgGroupPermissions
and not what extensions might do.
Also, it was suggested that if an extension can remove 'read' then the
cache headers set by RawAction and the API should reflect that.
Change-Id: I381553e79c5320083c6d6d9ddd5bc0b146600f9e
It hasn't been used for its documented purpose for a while.
In fact the one significant thing it can cause wasn't even
documented. If set to anything other than "text/javascript"
it will cause action=raw to no longer respond to
ctype=text/javascript requests (such as done by wikibits'
importScript function).
Follows-up 97caae596d.
Change-Id: Ib04ff5b21eb0ae172b94e31bc0dc16c9649e1864
- Separate file and class documentation
- Add some missing class documentation
- Fix erroneous documentation
Change-Id: I35c846ad63e837165b79456dc89d330498aebf64
In RawAction, there are several cases in which we have null instead
of a Content object. Most importanty, this applied for deleted revisions
and missing sections. Handle these cases gracefully.
Change-Id: Iac8560755718a46dcc4dcf118322a66d1caefdae
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.
For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191
The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.
Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
Created a new method User::groupHasPermission and check also
$wgRevokePermissions for the given right
Change-Id: I41edb091fa35c8c68b6f95cc5fd208ea99418cdb
Representing content_model and content_format as integers in the
database was suggested by Asher mainly to save space.
This change entails some refactoring and renaming, but no big
change in logic.
The $isFullKey parameter means the message key already contains the language subpage ("/de", etc.)
Change-Id: Iceb1243ae6af126e2abbabbb05441a8602c17ef6
The check to WikiPage::getTouched will load the latest revision data, which is
not ideal for performance. In a quick test using ab -c 100 -n 1000 and without
MemCached enabled, the request rate for plain GET requests drops slightly from
108 to 104 req/second. As described in my comment
https://bugzilla.wikimedia.org/show_bug.cgi?id=10023#c9, this could certainly be
improved on. Overall, a few unmodified responses should still make the
server-side performance impact of this patch positive, while improving
client-side performance considerably for unmodified content.
* PermissionsError now calls OutputPage::showPermissionsErrorPage() to display the error (this is needed to make the item above work correctly)
* Removed the override of the HTML title in OutputPage::showPermissionsErrorPage() so that it shows "Permission errors - Sitename" instead of simply "Permission errors" for consistency with the other things
* Pass the error array returned by Title::getUserPermissionsErrors() to PermissionsError where available
* Converted direct calls to OutputPage::showPermissionsErrorPage() to throw an PermissionsError error instead
* Added 'action-rollback' message that will be displayed when accessing action=rollback without sufficient rights
* Changed getRestriction() in subclasses of Action to return null when they previously returned 'read' so that user rights can be check with Title::getUserPermissionsErrors()
* Reordered checks to do first user rights, then block (if needed) and finally read only (also if needed) so that users don't think the error is temporary when they both don't have right and the database is locked
* Left RawPage with back compat code for extensions that use it
* Removed calls to Skin for gen=(css|js). Calling action=raw&gen=(css|js) will now unconditionally return empty content
* Removed Skin::generateUserJs() and Skin::generateUserStylesheet() since they were only used in RawPage