Commit graph

511 commits

Author SHA1 Message Date
cenarium
f827d5a261 Avoid muliple cache calls to explicitly defined tags
This avoids muliple cache calls to explicitly defined tags by
calling the showTagEditUI of ChangeTags only once in logs and
histories.

Change-Id: I2e36dbd96d3fcca06de0bf418bc6dc294d8d18d3
2015-06-14 20:02:30 +02:00
Timo Tijhof
f57b6af45b WebResponse: Implement statusHeader() using the new HttpStatus::header()
* Convert existing use of WebResponse::header() for HTTP status headers
  to use this new statusHeader() method.

* Extend unit test forFauxResponse.

I'm not calling HttpStatus::header directly in code. We keep the abstraction
layer of WebResponse so that responses can continue to be mocked/fauxed without
affecting the outer HTTP response.

Change-Id: I8a536e16659fa88b54cffa1457efb889efa5fcd6
2015-06-04 02:27:30 +00:00
Federico Leva
b66622f343 Use getActionName() static
Change-Id: I3225ecd2b8e4294c28ea0aa664f0246d0d028b11
2015-05-18 20:27:48 +00:00
Nemo bis
1e81e7f8a0 Declare global in Action
Follows up e928d5bdd0.

Change-Id: I06e8490865554a0efa7678be6787deb8a22c5b82
2015-05-16 19:51:32 +00:00
jenkins-bot
a96465f40a Merge "Allow to customise addHelpLink() target via system message" 2015-05-15 10:42:51 +00:00
Federico Leva
e928d5bdd0 Allow to customise addHelpLink() target via system message
Method similar to SpecialPage::outputHeader() to avoid registering
tons of system messages and to have -summary and -helppage tidily
listed together in Special:AllMessages by default.

Bug: T45591
Change-Id: Ic849dde00be7379c1909a8486cf20f48c5aea5cf
2015-05-15 10:14:28 +02:00
jenkins-bot
86e80813d6 Merge "Converted InfoAction to using the WAN cache" 2015-05-05 11:41:42 +00:00
Brad Jorsch
a2415baa1a ChangeTags: Don't show UI when no editable tags exist
Bug: T97773
Change-Id: I001f15ca6f58bc9318eed84aa8ace2bddcb1b315
2015-05-01 11:12:31 -04:00
Aaron Schulz
19878798ef Converted InfoAction to using the WAN cache
Bug: T93141
Change-Id: I8988f77fa5a3504793d9b8e0eea6863888c9e226
2015-04-30 01:29:56 +00:00
jenkins-bot
dcfaa4e995 Merge "Show correct counts in category-info on action=info" 2015-04-17 01:24:05 +00:00
umherirrender
831d07a3a5 Show correct counts in category-info on action=info
The number of pages was always the total count of all members of that
category, not just pages. Correct that and also show the total count.

Change-Id: I246d92b35d508e10fd93f9c7209db11a6e0eeb7a
2015-04-16 20:26:27 +02:00
daniel
a7f26eb3b7 Introduce PageHistoryPager::doBatchLookups hook.
The intention of the new hook is to allow extensions to prefetch
any information that may be needed for displaying history rows.

In particular, this is needed by Wikibase to allow us to inject
localized entity labels into the edit summaries.

Bug: T95672
Change-Id: Ie10ef99154da35713a4f583e2de2162fba28eef2
2015-04-16 16:02:13 +00:00
Brad Jorsch
75cc98c324 ChangeTags was backported to 1.25
So change the relevant references to 1.26.

Change-Id: I351de6a77747e3152052a448b8b6d2f25699e1d0
2015-04-15 17:31:16 -04:00
This, that and the other
5c4681012e UI for adding and removing change tags on revisions and log entries
There is a new special page, Special:EditTags, which is very similar to
Special:RevisionDelete in a lot of ways. In fact, the SpecialEditTags class
started off as a copy-paste of SpecialRevisiondelete.

You invoke this special page by going to an article history page, checking
some revisions, and clicking "Edit tags of selected revisions". Then you
pick the modifications you want to make and click "Apply". Very much like
the revision deletion workflow.

I had to restructure some of the Action routing code, which was only
designed to handle revision deletion. Also removing some code from
SpecialRevisiondelete which didn't work as advertised in the first place,
and definitely doesn't work now.

Change-Id: I7d3ef927b5686f6211bc5817776286ead19d916b
2015-04-15 18:31:12 +00:00
Aaron Schulz
14979be39d Moved $wgShowUpdatedMarker checks to the right place
Change-Id: Icee2ec24aac5fe78f7204aabf434640251791cae
2015-04-14 18:56:39 -07:00
ayush_garg
0e4c158b79 Displaying protection expiry date and time in action=info
Bug: T94129
Change-Id: I2df726e04c0555eb550036c31e538ec2594b517c
2015-04-04 01:26:02 +05:30
Aaron Schulz
e2db8e69ee Made InfoAction::invalidateCache() use READ_LATEST
Change-Id: I794c443b9d65d924366eff9baaf4460ce196a967
2015-03-31 23:49:10 +00:00
jenkins-bot
5907e840cc Merge "Add top help link to MediaWiki.org in several pages via indicator" 2015-03-04 16:15:53 +00:00
Nemo bis
376c0a13df Add top help link to MediaWiki.org in several pages via indicator
All the chosen targets are translatable public domain help pages
on MediaWiki.org. Mostly special pages and actions for privileged
users for now.

Adapted from the Translate extension, credit to Niklas Laxström
(TranslateUtils::addSpecialHelpLink).

Depends on 6f5b29ff4e, whose commit
message has a typo addIndicator() instead of setIndicator().

Bug: T45591
Change-Id: I2934b1708a0d207dcf3d940264f140613646f203
2015-03-04 10:59:03 +01:00
umherirrender
a30c4f4980 Escape messages 'word-separator' and 'parentheses' in InfoAction
This change will not break the usage of the messages, because there are
usually used escaped in mediawiki/core.

Change-Id: I049134e2fbfadab04ac228090d17fd18c5baca3d
2015-02-26 20:11:15 +00:00
jenkins-bot
ff05579d1c Merge "Fix type hint in HistoryAction::getArticle" 2015-02-06 21:58:02 +00:00
Thiemo Mättig
986f3df85b Fix type hint in HistoryAction::getArticle
See the type hint of the accessed Action::$page variable.

Change-Id: I10e4e27773bcca507c10cf526d193bf0a1cc97ac
2015-02-06 16:54:25 +01:00
Niklas Laxström
acc2bcaf37 Escape unescaped messages shown in action=info
Change-Id: Id16d8c8dff73fdacad6c9a4ff7f2919945b7e893
2015-01-30 16:56:11 +00:00
umherirrender
6a84f22b05 Pass user to Title::userCan in InfoAction
Change-Id: Id4dac8ca3b36839abdb184d0ad538b2400aa80ff
2015-01-28 19:16:44 +01:00
Ricordisamoa
2ae155da52 Fix phpcs errors in includes/
Mostly Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines

Change-Id: I678b2f0902f11cd1dfa1611b9da24e7237df9122
2015-01-08 20:15:07 +01:00
Chad Horohoe
aa21e125a3 Remove obvious function-level profiling
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.

Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.

Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
2015-01-07 11:14:24 -08:00
jenkins-bot
13d083b206 Merge "Hide file links in action=info's 'Number of redirects to this page'" 2014-12-20 01:27:18 +00:00
Ricordisamoa
6f6c7c14c4 Hide file links in action=info's 'Number of redirects to this page'
Special:WhatLinksHere gets now passed hideimages=1
if the concerned page is in the File namespace.

A bit of history:
the 'hideimages' parameter has been added to Special:WhatLinksHere
with commit 06ad0d25 (r34267), then removed with commit cdc7e22d
(r34277), and finally added back with 725cb284 (r34320).

Change-Id: I0f358e52c38bb525cee8085ca206118ee276889d
2014-12-20 01:18:18 +00:00
Ricordisamoa
fc5fd5c37a Typo fixes and non-code tweaks
Skipped replacements:
* prefered → preferred
* prolly → probably

Skipped files:
* resources/lib/jquery.ui/jquery.ui.mouse.js
* resources/lib/jquery/jquery.form.js

Change-Id: Ib7923f362ddfca1b892bf5d601785d6b5aa5d44c
2014-12-12 18:31:15 +00:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
umherirrender
7da1cbc78c Fix backlink for RevertAction
RevertAction::getDescription cannot set subtitle on OutputPage,
because the subtitle on OutputPage gets cleared before the
result of getDescription is added and than the subtitle is gone.

Refactored the code for building the backlink into a static function
and use it.

Change-Id: Iedad0b8e040035a9a10a0b140d2322357e6b539a
2014-12-05 14:28:18 +00:00
umherirrender
8410b26b37 Avoid implicit Message::toString in InfoAction
Call explicit escape to show which message format is used.

Change-Id: I725f7ab394c275ad68a0b816b841c9b6b8bc325c
2014-10-23 16:32:33 +00:00
Chad Horohoe
90d90dad6e Remove hitcounters and associated code
The hitcounter implementation in MediaWiki is flawed
and needs removal. For proper metrics, it is suggested to use
something like Piwik or Google Analytics.

RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Removing_hit_counters_from_MediaWiki_core
Change-Id: I0e5006a7e8a09c800f8fa4effa9399e8afdd7a57
2014-10-20 13:01:55 -07:00
umherirrender
2682eb00aa Undefined variable: attrs in HistoryAction.php on line 202
Replaced by an array() and removed an unused variable near by.

Follow-Up: I61bb3c358f755ed9f2153d94b744c1a9da02c456
Change-Id: I5c4dc22e1e9346bfc410a9dda4353d5297a5825e
2014-10-05 19:08:15 +02:00
jdlrobson
a155ac55ea Hygiene: Make construction of buttons easier
Stop littering MediaWiki with globals, provide a common
api for generating them similar to how we do text input
attributes before things get out of control.

Adds
* submitButton
* linkButton

Change-Id: I61bb3c358f755ed9f2153d94b744c1a9da02c456
2014-09-30 14:54:56 -07:00
Prateek Saxena
a54893704e HistoryAction: Use correct classes for buttons
Bug: 71141
Change-Id: I95ac411e7c06d3b7aec966527f196ef347f1c710
2014-09-29 13:45:09 -07:00
Max Semenik
0fddd42ca4 Deprecate HTMLFileCache::newFromTitle() in favor of constructor
Change-Id: I903e68fc1f486501d790ca69146ecb835d90c9cc
2014-09-19 00:07:51 +00:00
umherirrender
cb33db78be Use local var in Action::setHeaders
Change-Id: I543d45835016fd6f4f2ec0e84f4e5453237bbf25
2014-09-13 07:21:32 +00:00
Chad Horohoe
f7ada91b09 RawAction: private variable removing m prefix + doc better
Change-Id: I526ebcbb1429af42fa9e33cdf59d12c4854247f7
2014-09-12 11:39:36 -07:00
addshore
0a6b7e0f56 Add @since tags for initial Action.php methods
These were introduced in r86001
Hash: 8779f4b55f

Change-Id: I1ae1d4f220d20961f77d2c913fd4f17233893c45
2014-08-29 14:53:54 +01:00
umherirrender
4922c1b57f Use getConfig in HistoryAction for global
Change-Id: I4a3bb4149c3c1da75215e0e6336c89e4a00fc8e4
2014-08-22 21:52:27 +02:00
Alexandre Emsenhuber
2263cb185b Use getConfig on local context to get configuration settings in Action
Follow-up I47db5eab45 (aa15d528)

Change-Id: I76409f5fc61e5d35235f964e094dd8881bcc8311
2014-08-19 03:42:49 +00:00
jenkins-bot
a8b5e408bf Merge "Fix the (un)watch token to include the namespace name." 2014-08-16 13:20:31 +00:00
jdlrobson
aa15d5287d Add blanket support for mediawiki ui via globals
This provides better mobile experiences on various pages
and a more consistent UI across both mobile and desktop.

It does this in two ways.

1) Forces HTMLForms to not use table based layouts so as
not to interfere with responsive nature of mediawiki ui elements

2) Applies MediaWiki.UI classes to most pages
If a page is created via Xml or Html classes it will use mediawiki ui
Where possible I've added classes unconditionally, but for cases of buttons
this is behind the $wgUseMediaWikiUIEverywhere global since button styling is
enabled on pages by default and for checkboxes since it is changes HTML markup.

3) Adds all MediaWiki.UI styles to pages which can use it
When enabled:
* Apply these styles to all pages which use HTMLForms
* Apply to EditPage
* Apply to anything that uses certain elements outputted by the
Xml or HTML helper classes
* Apply to History page
* Apply to protection page
* Apply to move page
* Apply to deletion page

Currently kept behind a global to allow us time to finetune
existing elements. After further testing we will look to kill the
globals and make mediawiki.ui the default

See: I430c0fbb79d2a33bb828b2427bda0ee01115d73f
Change-Id: I47db5eab4569514d039261d11b6dedb0eeae17b5
2014-08-15 14:48:00 -07:00
umherirrender
3b2b6a2773 Add missing @param to function docs
Change-Id: I47fa96a976f55a1a93cb75397285edb8c7f4cd8a
2014-08-14 20:22:52 +02:00
Kunal Mehta
f6b5b8c899 includes/actions/: Use Config instead of globals
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
2014-08-13 20:34:32 +00:00
jenkins-bot
f0845d71a2 Merge "Remove return from Action::checkCanExecute" 2014-08-13 01:31:07 +00:00
addshore
6b40bbe016 Fix phpcs issues in actions and revisiondelete dirs
Change-Id: I54c1e336b8c44ff8720ac38c8b2d68ede42af305
2014-08-12 22:53:14 +00:00
withoutaname
e53c6dbd8d actions: Move SubmitAction class out of EditAction.php
Straight move, except for the slight change in the comparison operator
for session_id().

Change-Id: I9404f48ee75ff3d3655f2f5b75a05d66f334b80d
2014-08-12 22:26:54 +00:00
umherirrender
226760304e Remove return from Action::checkCanExecute
No need to return true on success, because failure gives Exception,
so the return value needs no checking.

Change-Id: Id59bfaebc14bd1c638a721c303f585c1de627508
2014-08-12 18:17:27 +02:00
Tyler Romeo
d0439af89f Make UserNotLoggedIn redirect to login page
For pages like Special:Watchlist that throw
a UserNotLoggedIn exception when the user is
anonymous, this patch makes the page redirect
to the login page automatically.

This is instead
of the current behavior of showing a link to
the login page that the user must click.

(Also, Special:Userlogin has existing functionality
that will redirect the user back once they are
logged in.)

Bug: 15484
Change-Id: Idd9325374cb5dc13c4c057f45f88a33bdff523a9
2014-08-07 13:38:16 -04:00
addshore
3263900481 Split UnwatchAction into own class
Change-Id: Ief650c115237214345bef7733d33967f0e042521
2014-08-07 01:40:35 +01:00
addshore
f902738503 Split UnprotectAction into own file
Change-Id: Ibde9dca89631522a25e2f0eef2790c2654a2bbd9
2014-08-07 01:33:12 +01:00
withoutaname
b8654eb75a Documentation: put FormAction and FormlessAction into "Actions" group
Change-Id: Iac8a203426897446b8c9f3fbaaa9d608c419bce6
2014-08-02 08:11:26 +00:00
jenkins-bot
4169b4f425 Merge "Shorten ternary expressions in RawAction.php" 2014-07-31 17:44:29 +00:00
Étienne Beaulé
b230bdce16 Create preference to watchlist pages after rollbacking
This change adds a  preference in the 'watchlist' section to
automatically watchlist a page after rollbacking.

The setting is only visible, if the user has the 'rollback'-right.
I have removed the watch reverts function per advice by Vogone.

Bug: 4488
Change-Id: I3aa831c9c04d627684641af0ca5a332795c87062
2014-07-30 21:51:41 +00:00
umherirrender
02dc9da399 Cleanup some docs (includes/[a-d])
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I7b65fe04db431342cc58b469dc48f41a50c4e891
2014-07-24 19:42:45 +02:00
jenkins-bot
e219e90fda Merge "Fix documentation of HistoryPager::lastLink() and make code more readable" 2014-07-23 20:38:32 +00:00
withoutaname
db635855f2 Shorten ternary expressions in RawAction.php
Change-Id: Idc9e74344989bf1394e05ebaf23cfd9a8fb38e1a
2014-07-23 12:02:37 -07:00
umherirrender
cabbc6eaa4 Docs: {function} -> callable
Change-Id: Iab0760ce5c518854a127330d3e0c0ee7ed0c526c
2014-07-21 21:38:56 +02:00
withoutaname
3702d19788 Remove deprecated RawPage class
Change-Id: I7a75a09de934250604317983a4446ecaa9fa6550
2014-07-20 22:58:44 -07:00
withoutaname
071353c89a Remove deprecated HistoryPage class
Change-Id: I3db4d5a1a2c574a73e2fcfe1fd1da49f3570e4b6
2014-07-21 04:54:40 +00:00
withoutaname
a4aaac4f80 Remove execute() from Action and subclasses
Since show() is always the preferred entry point, this is never used
nor implemented properly.

Change-Id: I5fde4bbd420a6695b01fb9220542fd3b49060675
2014-07-16 14:03:43 -07:00
withoutaname
033ce4471d Remove getFormFields(), onSubmit() and onSuccess() from FormlessAction
Leftovers from the FormAction class which has since split off

Change-Id: I519566205bd39f4c511b0418a0564e9ef1eec6d0
2014-07-15 23:28:18 +00:00
withoutaname
0367d94952 Fold RevertFileAction class into RevertAction
RevertAction was simply a dummy class for outputting an error message
if the action was not done in the file namespace. I've instead
moved RevertFileAction to RevertAction and threw an exception
from within checkCanExecute().

Change-Id: I7b87de60680009bf4e74d33342cbe81cc0d211b5
2014-07-13 02:16:58 +00:00
Alexandre Emsenhuber
3de2f5a64d Allow to set a salt for the edit token in HTMLForm
And set one in RevertAction.

Change-Id: I9f72c6203e8d9d0770009083263ddca98845f530
2014-07-08 22:45:14 +02:00
Alexandre Emsenhuber
11471501ec Fix the (un)watch token to include the namespace name.
Title::getDBkey() only returns the page name without the namespace
which means that "Test" and "User:Test" (for example) pages would
have the same token; use Title::getPrefixedDBkey() instead to
avoid this.

Change-Id: I80333b23cec0cfe6546f6e7776b0a77b56ee20c8
2014-07-08 22:00:43 +02:00
Alexandre Emsenhuber
28c16e384b Fix documentation of HistoryPager::lastLink() and make code more readable
- Describe the possible types of $next parameter in the documentation
  rather than inline along with the possible values
- Split the big if ... elseif block into separate blocks. The elseif
  are not needed since each path returns
- Only create the revision object when really necessary

Change-Id: Ic92a6f6bd405d3f820d562a7322d34e3d9d33d17
2014-07-01 19:10:07 +02:00
Kartik Mistry
3e50955269 Fixed typo
unkown -> unknown

Change-Id: Ibbe73853258fd476d4e6f1b28dce27a20233f58f
2014-07-01 17:00:04 +00:00
umherirrender
87609efbe5 Remove comment about externaledit from EditAction
The ExternalEdit class was removed in
Ic3791d188688f556753ab5556a4d9733bbf2e85e

Change-Id: I3cec96c0fe2a597ba5360c08d6bde55397fc9204
2014-06-29 14:22:55 +00:00
Kunal Grover
50144cd02a First version of Page Language selector
Special page PageLanguage to set the page language of a page.
To enable the feature, set $wgPageLanguageUseDB to true
and assign the 'pagelang' user right to a user group.

Bug: 35489
Change-Id: I0f82b146fbe948f917c1c5d29f7469644d797e80
2014-06-27 23:27:07 +00:00
withoutaname
e45e0b1a66 Removed getLang() from IContextSource and subclasses
Change-Id: I94c3df814c06c54c071f371101882dcc71c99417
2014-06-20 11:36:59 -07:00
JuneHyeon Bae
4ea2e06d45 Add 'X-Robots-Tag: noindex' header in action=render pages
Bug: 63891
Change-Id: I297a6269fcab999610bc01755462938c70eb64a1
2014-06-02 16:04:51 -04:00
csteipp
0b695ae09a SECURITY: escape sortKey in pageInfo
DEFAULTSORT isn't escaped before being added to the action=info table.

Bug: 63251
Change-Id: I087bfde8cbc69c3507f68ee3cb6e22aba0ffa7db
2014-04-24 21:52:22 +02:00
Bartosz Dziewoński
59002d8935 Consistently use '@deprecated since <version>'
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
2014-04-15 22:18:19 +02:00
umherirrender
829886b10a Fixed some @params documentation
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
2014-04-14 12:59:19 +00:00
jenkins-bot
9fc959d109 Merge "WatchAction: Add 'returnto' and 'returntoquery' to the login link" 2014-04-06 01:12:18 +00:00
konarak
5053348474 WatchAction: Add 'returnto' and 'returntoquery' to the login link
Bug: 60594
Change-Id: Ic8c0ea5b203c63f9273992cb70bfb06c0d461311
2014-04-06 01:07:46 +00:00
umherirrender
23fab68274 Fix spacing after @param and friends in comments
Searched for:
\@(param|return|throws|since|deprecated|access|todo|var)[ \t]{2,}

Change-Id: Icce22ba9fe0635455691ca58d9872d618151f346
2014-04-05 20:02:29 +00:00
Alexandre Emsenhuber
449ee32451 Add missing line breaks to wfDebug() calls
Also removed true as second parameter to it from CloneDatabase.php
since it is the default value of that parameter.

Change-Id: I727ebae2bd4df0e26019985ce8c7ce73381c5642
2014-03-29 11:52:07 +01:00
addshore
58884580eb Split the rest of Action.php into /actions/
Change-Id: I071ac5778af63a5cffffd59d804c99b2c799d4e5
2014-03-03 12:31:57 +00:00
umherirrender
d7acfe079f Show 'Indexing by robots' status correct on action=info
When $wgNamespaceRobotPolicies contains a noindex for a namespace and
the page contains __INDEX__, the index status on action=info was
"Disallowed", but that is wrong, because the page is indexed.

Pass the 'index' to the robot policy logic.

Change-Id: Ib77c3e73968cdc72f657e50371a2372564a1c618
2014-02-14 19:43:55 +00:00
Siebrand Mazeland
f077c4b1d6 Update formatting
Change-Id: I18aff576262479c9bb1c56eb8e1d1aaae200e4b1
2014-02-06 09:27:05 +01:00
Aaron Schulz
34a9db1d67 Put expensive info action count behind $wgMiserMode
Change-Id: Ie0507b9ed62556f8caaaaf9499a4a40b3342b5af
2014-01-27 11:38:21 -08:00
Aaron Schulz
ba8c6db5ea Avoid expensive backlink counts for info action in miser mode
Change-Id: I13b64db1b23afd995cd0a2f5872fcedadd86c8ea
2014-01-16 12:39:33 -08:00
Brian Wolff
6e2be46e82 Send cache purges for action=raw after editing user css/js
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
2014-01-03 18:43:23 +00:00
Siebrand Mazeland
8a096e3444 Random documentation tweaks
Change-Id: I57c3bde6551c14324cf34e4db003a319d6cebc47
2014-01-02 23:45:14 +01:00
Reedy
d0554cd521 Revert "Update type hint for CreditsAction::getAuthor()"
This reverts commit 8a9a1eff3e.

Change-Id: I689645c812b1a28821a3d6854bc7737fc677e29e
2013-12-30 18:11:20 +00:00
Siebrand Mazeland
8a9a1eff3e Update type hint for CreditsAction::getAuthor()
This function calls $page->getUserText() and $page->getTimestamp(). These
functions are not specified in the interface Page (which actually specifies
nothing at all). Page is only implemented by WikiPage and Article. Article
does not implement getUserText() and getTimestamp(). WikiPage does.
CreditsAction::getAuthor() cannot ever be given an Article, because that
would cause a fatal error "call to undefined method".

Change-Id: I0ba29622b7307845345ce645cb63b53614aaf2ab
2013-12-30 18:03:09 +00:00
Kunal Mehta
bc798535fd Deprecate SpecialPage::getTitle
Callers should use SpecialPage::getPageTitle, which is
exactly identical.

This is so that in the future we can turn SpecialPage
into a ContextSource, which requires getTitle to return
getContext()->getTitle.

Change-Id: Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40
2013-12-24 12:53:11 -08:00
Siebrand Mazeland
96ce563c1f Fix comment
Change-Id: Icb52c2d236827d78eb420be9a1bcee9664d3bc4e
2013-12-03 13:40:03 +00:00
Alex Monk
f809241c46 Set title to Special:Revisiondelete on action=revisiondelete
Bug: 48616
Change-Id: Idb85c797dbe349e956d21b5cde6a59d89dab4fd2
2013-11-16 21:24:41 +00:00
jenkins-bot
8f806d211f Merge "Exclude override to make method public from checks" 2013-11-15 17:59:15 +00:00
jenkins-bot
9c345a4326 Merge "Update docs for files in includes/actions/" 2013-11-15 17:57:21 +00:00
csteipp
636c64482d SECURITY: Don't cache when a call could autocreate
Fixes for action=raw (used when sites include other site's javascript),
and stashed images.

Bug: 53032
Change-Id: I8f915f6a4756f750c74d9ee9bec58f7ba6c0c827
2013-11-14 14:36:24 -08:00
Siebrand Mazeland
29e0009785 Exclude override to make method public from checks
Change-Id: I66df2efa5900c5a192ae88217e736b7fc7335dcd
2013-11-14 19:16:41 +00:00
Siebrand Mazeland
6b237ebf55 Update docs for files in includes/actions/
Change-Id: I99655ad3df4bc252e3c176e4f465f5ecd615c55f
2013-11-14 20:09:19 +01:00
Siebrand Mazeland
cb8a9bb78a Break long lines in Action classes
Fixes CodeSniffer errors and warnigs.

Change-Id: Ic9cf4b9c677b3168d7c9820e2694080907997ee3
2013-11-14 18:18:49 +00:00
Siebrand Mazeland
6ea188fee5 Update formatting
Change-Id: I3cbe1f5e48730fbbe57e4b20a0c202edddc93c95
2013-11-14 12:20:43 +01:00
umherirrender
11fb421c7c Add content model to the page information
This patch adds a new table row with the content model of the page, this
is usally wikitext, can also be javascript or CSS.

Bug: 56033
Change-Id: If91f6c20d79cd7b3b8924ab6c3df5f90acd8c7a1
2013-11-10 07:39:27 +01:00
jenkins-bot
8fe0cf9704 Merge "Add cache versioning to InfoAction." 2013-09-05 22:15:07 +00:00
MatmaRex
df8ec1e216 No spaces after (casts)
Also removed some unnecessary ones. I think I've caught them all.

The spaceless version already appears in core ~300 times (after
accounting for false positives when grepping). Some consistency would
be nice.

Change-Id: I607655b5f4366e66dc78730d5fd2f57ed8776cae
2013-09-04 20:05:43 +02:00
Timo Tijhof
90749a261c doc: Remove repetitive "Give grep a chance" phrase from comments
* Follows-up b2e2b2e016.
* Minor clean up of surrounding documentation comments.
* Fixed missing keys for messages in WebInstallerPage

Change-Id: Iaa692064262f3c0e10cfa5e4b1ec8c86e5d02362
2013-08-29 10:46:46 -07:00
shirayuki
b2e2b2e016 Give grep a chance to find the usages
Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
2013-08-16 22:07:38 +09:00
MatmaRex
e7f58fee73 HistoryAction: There is no mediawiki.legacy.history module
Remove the reference to it.

Change-Id: Ia34b2ea6155273faaa8961238e07672f9e65c576
2013-08-10 00:25:20 +02:00
Brad Jorsch
cdd46ac98e Followup Idfee1b4d per Tim
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
2013-07-26 11:03:11 -04:00
MatmaRex
26060318e8 HistoryPager: Remove superfluous join condition
It is already added by ChangeTags::modifyDisplayQuery().

Change-Id: I00f1f87aa77392a544be50c0298a8d9acb239d4c
2013-07-12 21:30:20 +02:00
jenkins-bot
5b04704d30 Merge "Correctly use $wgFeedLimit in page history feed" 2013-07-11 14:58:19 +00:00
umherirrender
0a810a5a87 Avoid date()/gmdate() for date formatting
Added a MWTimestamp::format method to format a timestamp object in the
given pattern. This avoids date(), which needs the local time
zone corretly set on the server, which is assumed at the moment in
Setup.php

Added MWTimestamp::getInstance for gmdate() and
MWTimestamp::getLocalInstance for date() to create a MWTimestamp object
and use it as inline statement.
Also MWTimestamp::setTimezone and MWTimestamp::getTimzone was added for
timezone handling.

Change-Id: I812aa013be2f4380e0cf10dc465202756fe8347b
2013-07-08 04:14:12 +00:00
MatmaRex
0b7ecb1a64 Correctly use $wgFeedLimit in page history feed
The previous behavior enforced a minimal maximum of 10, even if
$wgFeedLimit was set to a lower value.

Also grepped everything for $wgFeedLimit and fixed all other
error-prone (but correct) uses.

Bug: 50886
Change-Id: Ia81bbadfcf4270b0f932b543265ca37f364530f3
2013-07-07 20:39:53 +02:00
jenkins-bot
624dc39ae4 Merge "Add ID to action=info table rows" 2013-06-30 16:30:37 +00:00
Brad Jorsch
18062eb3b0 Add user rights 'viewmywatchlist', 'editmywatchlist'
These are needed for OAuth grants.

Note that, even if 'editmywatchlist' is not granted, various actions
will still allow for adding but not removing of pages.

Change-Id: Ie33446a228dd6ed0114730935c1bf65667f5ce01
2013-06-26 10:20:40 -04:00
Alex Monk
187321aded Add ID to action=info table rows
MZMcBride wants to use these to highlight certain pieces of information.

Bug: 44252
Change-Id: Id4fd17e748c0fe3a9f4c51846abcaa8942fa5c50
2013-06-23 09:53:48 +01:00
Brad Jorsch
c94454687f Return errors from WatchAction
Currently, WatchAction::doWatch and WatchAction::doUnwatch return true
always. Let's have them return a status object instead.

This also cleans up the handling of Status objects in some of the API
modules.

Change-Id: I9dd9f0fd499c37f29fa12bcdb6142238a1f11e4d
2013-06-20 15:51:05 -04:00
Aaron Schulz
66500c1f44 Fixed long memcached keys for infoaction.
* One place was already using SHA1, so invalidation was broken.

Change-Id: Ie0d3b9274ed2e1c5a7b1616cd237a5e25fd99d12
2013-06-06 13:40:13 -07:00
Tyler Anthony Romeo
fedb594f14 Add cache versioning to InfoAction.
To avoid PHP notices, add a cache version key to
the page count cache so that it is invalidated
when the InfoAction cache format is changed.

Bug: 43766
Change-Id: I7fe4da351506d8b98490e9fbbeb51c2c081fc2a8
2013-05-24 19:38:01 +00:00
Tyler Anthony Romeo
22eb569fb4 Fixed behavior of Title::invalidateCache.
Removed actions that should not be in Title::invalidateCache,
specifically the clearing of the InfoAction cache, and added
those actions to their appropriate locations.

Added a new method InfoAction::invalidateCache that clears the
cache for a given title.

Bug: 46816
Change-Id: Ic12c66446c0d71f567dceb5d4630382ff41ad8bf
2013-05-21 10:41:42 -07:00
Timo Tijhof
1f956360b8 Deprecate $wgJsMimeType
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
2013-05-21 01:17:44 +02:00
Timo Tijhof
4bd5471ca3 docs: Remove odd colons after @todo
Most were this way already:
https://doc.wikimedia.org/mediawiki-core/master/php/html/todo.html

Ran a find/replace on the odd ones. Also made them all
lower case.

Change-Id: I70c6a69344ddebc603e9a1c1d87e3cc4f4f4c560
2013-05-15 06:23:40 +00:00
Tim Starling
45ce72f907 Revert "Fixed behavior of Title::invalidateCache."
Causes jenkins build failure

This reverts commit 3b4c514efa

Change-Id: Ieeb54f1e7a9cfb5ac02b8a9f49bbe0644a064fa0
2013-05-06 00:52:46 +00:00
Tyler Anthony Romeo
3b4c514efa Fixed behavior of Title::invalidateCache.
Removed actions that should not be in Title::invalidateCache,
specifically the clearing of the InfoAction cache, and added
those actions to their appropriate locations.

Added a new method InfoAction::invalidateCache that clears the
cache for a given title.

Bug: 46816
Change-Id: I38ac616d2e99fb339aca33425745368ba85b6350
2013-05-06 00:21:25 +00:00
umherirrender
6f79eef473 Fixed spacing around parenthesis in includes
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397
2013-04-28 15:50:07 +00:00
umherirrender
1bfc8feb25 Fixed spacing in actions/cache/filebackend/filerepo/job folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Idb93d34e314e5f314223b79208968d6bcd30c40e
2013-04-20 19:18:13 +02:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
Chad Horohoe
4be6236352 Remove externaledit/externaldiff preference
Change-Id: Ic3791d188688f556753ab5556a4d9733bbf2e85e
2013-04-11 09:20:36 -04:00
jenkins-bot
b59c210193 Merge "Add docs for constructor" 2013-04-01 20:13:15 +00:00
jenkins-bot
2092cb9bcf Merge "Fix PHPDoc" 2013-04-01 17:07:29 +00:00
Siebrand Mazeland
338ba4cb0b Add docs for constructor
Change-Id: I976dc8fc8a3736aaa7964cedb8e9470eacf5fda0
2013-04-01 18:54:07 +02:00
Siebrand Mazeland
8df9e32ad0 Fix PHPDoc
"The" is an unknown class.

Change-Id: Ic8ce1f1252f4b435dbca789226056781d606d8ee
2013-04-01 18:45:18 +02:00
Siebrand Mazeland
bb06eee756 Fix PHPDoc
Was incorrectly documenting Article instead of Page. Also changed $article
to $page to avoid confusion.

Change-Id: I366769a201b5fda1c8d59119bdac908fd7727cbf
2013-04-01 18:39:01 +02:00
Siebrand Mazeland
2e0f191829 Use double quotes to use variable $oper properly
Introduced in Change-Id: I29461e5332f3fc6523cbd899e14394aa88865d93

Change-Id: Ic4e8d133fc9ab362f3f463309d799e80fff5d883
2013-04-01 18:25:05 +02:00
Alexandre Emsenhuber
f4b1735753 Fix case of some Title methods (final round)
Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
2013-03-28 11:30:06 +01:00
Alexandre Emsenhuber
df5265e14d Fix case of some Title methods
Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
2013-03-27 14:36:05 +01:00
Kaldari
c5233396cd Changing OutputPage param to a Context param in PageHistoryBeforeList
Change-Id: I348b449043fefba181e28486a07c4aa761bcef24
2013-03-13 21:06:39 +00:00
Kaldari
024ea78574 Adding output parameter to PageHistoryBeforeList hook
This will allow us to easily add other RL modules to the page

Change-Id: I2ec00d44e37298ef91ab428759bda037072b0120
2013-03-12 16:27:16 -07:00
Kaldari
930955762a Adding hooks for thank you notification links
These will allow Echo to add a 'thank' link next to the 'undo' links

Change-Id: Ifb93e49b30bb325ecd17ece9f36bcd83c63a2563
2013-03-12 10:37:39 -07:00
jenkins-bot
6114f05fc1 Merge "Correct case of Title::getPrefixedDBkey() calls" 2013-03-12 15:13:21 +00:00
jenkins-bot
bbd9c84e10 Merge "Documentation improvements in includes/actions" 2013-03-12 15:11:12 +00:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
Alexandre Emsenhuber
cd4dd7ca85 Correct case of Title::getPrefixedDBkey() calls
Change-Id: Ic9ef0cc6dbb0a8eb0ee93432299ef59759223e2c
2013-03-09 21:14:22 +01:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
Alexandre Emsenhuber
a09a89b48e Documentation improvements in includes/actions
- Separate file and class documentation
- Add some missing class documentation
- Fix erroneous documentation

Change-Id: I35c846ad63e837165b79456dc89d330498aebf64
2013-03-05 16:39:35 +01:00
jenkins-bot
7423e185de Merge "(bug 44219) Avoid fatal errors when a revision doesn't exist in action=info" 2013-02-26 17:01:31 +00:00
Alexandre Emsenhuber
563a5226fe Add line breaks to the output of action=info
This makes the source code of the page much more readable.

Change-Id: Icf3edc4a108bd4c0821f301986bb3d612071086c
2013-02-14 11:29:29 +01:00
Alexandre Emsenhuber
e6467452c6 (bug 44219) Avoid fatal errors when a revision doesn't exist in action=info
WikiPage::getRevision() and WikiPage::getOldestRevision() may return null
when a revision does not exist; catch this in InfoAction::pageInfo().

Change-Id: If141213aedfe7c55e935105abf4415b6feced57c
2013-02-14 11:08:57 +01:00
Timo Tijhof
e4e67ed655 InfoAction: Heading ID should not include # character.
It was using Parser::guessSectionNameFromWikiText, which expects
a string of wikitext (e.g. "== Foo ==") and extracts the heading
text, and from that it generates an ID, and from that it
generates an anchor link.

The extraction and anchor link are wrong and caused the output
to be <h2 id="#Foo"> instead of <h2 id="Foo">.

Follows up I702f2f13.

Bug: 44989
Change-Id: I81f67ae1ac86ed709c69f1bced970b2cbb5138db
2013-02-14 10:58:21 +01:00
umherirrender
f3cf109e62 remove space before semicolon
Change-Id: Ic0d890f5e27cec017c7f7910a67d53b2edf82079
2013-02-09 22:44:24 +01:00
jenkins-bot
ea0776b1e8 Merge "(bug 44253) Add message when there are few watchers" 2013-02-07 18:10:15 +00:00
umherirrender
f97a3a4027 fix some spacing
Change-Id: I670a7baf3ba1e70d18346bb00938d518ba2063bd
2013-02-04 19:59:14 +00:00
Brad Jorsch
1baa0e8151 (bug 44253) Add message when there are few watchers
When a page has fewer than $wgUnwatchedPageThreshold watchers and the
user does not have the 'unwatchedpages' right, the row for number if
watchers is not being displayed at all. This is confusing to some users,
so instead display the row with an appropriate message.

Change-Id: I2425e45ec5db2dc743f875acf3fd3717b7d06286
2013-01-29 13:27:21 -05:00
jenkins-bot
ec493cc750 Merge "(bug 41330) Default to the current year in the history page filter form" 2013-01-28 18:15:10 +00:00
Alex Monk
c2c982c4e8 (bug 36537) Rename calls to wfArrayToCGI to wfArrayToCgi
Done with this command:
grep wfArrayToCGI * -R -l -Z | xargs -0 -l sed -i -e 's/wfArrayToCGI/wfArrayToCgi/g' && git checkout -- HISTORY

Change-Id: If7f4d4bfc199289c11c43cf519c2415a1aad1c51
2013-01-28 18:04:20 +00:00
jenkins-bot
843b5d9eda Merge "Use a LinkBatch for the creator/last editor user (talk) pages in InfoAction" 2013-01-22 02:13:18 +00:00
Tyler Anthony Romeo
685e2181a6 (bug 44131) Change InfoAction cache key to use SHA1.
Long title names caused errors in caching of InfoAction
results, so this commit wraps the title in a SHA1 call
so that all titles will have valid cache keys.

Change-Id: I803a7dd58f5bd69070291192d3eead065d0403f1
2013-01-21 14:32:11 -05:00
jenkins-bot
6c31ca8b46 Merge "Remove hardcoded quotes on integer" 2013-01-21 17:05:08 +00:00
Alexandre Emsenhuber
27c9ee9089 Use a LinkBatch for the creator/last editor user (talk) pages in InfoAction
This avoid having to do four single queries to know whether these pages exist.

Change-Id: I98b8c84abb2fc64c00fc2f3177b95c62c9606536
2013-01-21 07:52:43 +01:00
Brent Garber
58bff0230a Fix changes for Ia1878588 to work with databases that use non-integer timestamps.
Change-Id: Id51ab135baa35440005b38f2f2f466f4378deb31
2013-01-20 21:25:31 +00:00
umherirrender
9824792a75 Remove hardcoded quotes on integer
Change-Id: Ifb1e9777fe1338a5b97d061d80355d51d52ea8da
2013-01-18 19:25:38 +01:00
Marius Hoch
a53fe6f080 (bug 39397) Only show rollback links if they work
To only show rollback links if they work I had to patch Linker
to have a function (Linker::rollbackData) which can verify
that the editor isn't the only editor of the page. Furthermore
it is checked that the user name or the text of the revision
we might rollback to isn't deleted. Due to the fact that I've
altered the already existing method which showed how many edits
a rollback will revert for that, this wont affect the performance.

Change-Id: I5d1adec993370c39ae8c5c712edd919d456441c6
2013-01-09 17:04:44 +01:00
Tyler Anthony Romeo
265404d93c (bug 41365) Added transclusion count to InfoAction.
Currently InfoAction lists the pages that are transcluded
onto the specified page. This adds a list of pages on which
the current page is transcluded. Also, it adds an option to
limit the list size for transclusion links due to memory
concerns.

Change-Id: I45b077cf3f241b1927f7b1818b04b72115d55c28
2013-01-08 11:45:45 -05:00
Tyler Anthony Romeo
6c75098626 (bug 41368) Added category information to InfoAction.
Added a Category information section to InfoAction that
only shows for NS_CATEGORY pages. It lists the number
of pages, subcategories, and files in the category.

Change-Id: Ic8965ffc7e4f9abb1f46d773839bdf5c2f06b72e
2013-01-06 12:20:39 +00:00
umherirrender
26f13ec28f Use Database::addQuotes instead of hardcoded quotes
Change-Id: I29461e5332f3fc6523cbd899e14394aa88865d93
2013-01-04 20:07:37 +01:00
Brian Wolff
24584cab86 (bug 43379) History page fail gracefully if rev_len unavailable
If the length of a revision is unavailable, do not show
the page size (or char difference) instead of pretending
it is 0 and showing wrong info.

Change-Id: I2b2ca3da480e9222911ff6a91f3ab1ca4a8b9ba1
2012-12-24 10:53:43 +00:00
Liangent
116f3550b8 (bug 43316) Don't fetch revision ID when a page doesn't exist.
Fixes I90446b7b.

Change-Id: I429653942bc388b6658b956d36d16398bbcf04e5
2012-12-21 23:20:16 +08:00
Antoine Musso
cb60d72be1 misc style fix
* makes booleans lower case
* add spaces before open braces

Change-Id: Id88884e08bc23d7730361ee91646f54f5e16920b
2012-12-20 16:09:25 +01:00
Tyler Anthony Romeo
65f5aa22cf (bug 39957) Added threshold for showing number of page watchers.
Added configuation variable that allows bypassing the unwatchedpages
permission when the number of people watching a page is greater
than a certain threshold. The default value is false, meaning the
unwatchedpages permission is always required.

Change-Id: I1cb6ee22d50d871a8c7083c5b7a091d31cf640f5
2012-12-20 02:06:03 +00:00
Tyler Anthony Romeo
4f71793786 (bug 39490) Add caching to InfoAction.
Added caching to InfoAction. The cache key uses the ID of the
latest revision so it is auto-invalidated when the page is
changed. Also, the cache key is deleted whenever the page is
purged.

Change-Id: I90446b7bcb4517959605aa38eacfada2b785060b
2012-12-18 15:33:00 -05:00
Alex Monk
1a6de1b24b (bug 41330) Default to the current year in the history page filter form
Change-Id: Ia510f0a24248f95c839ab88062cee1c0c0b9b6c1
2012-12-17 00:59:28 +00:00
robin
5c103a3940 Add the page content language to the page information
Change-Id: Id2aa19c66b299e3462cf3bea4020827f9f2ee1ef
2012-10-29 12:03:15 +01:00
Antoine Musso
9362bb6c56 miscellaneous doxygen warnings
* @licence -> @license
* Protects inline HTML by using double quotes, our inline comments uses
  elements such as <h1> or <firstnameLastname@gmail.com>
* Commands in lowercase (@TODO -> @todo, @NOTE -> @note)
* removes @abstract and @static since doxygen detects them from PHP
  code.
* various undocumented function parameters
* typos in parameters declarations

Change-Id: I62ad6fc124c355bf31acc780b9614a59cf79a421
2012-10-22 14:00:08 +02:00
daniel
acedeeb360 [Bug 41128] Handle null content in action=raw.
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
2012-10-18 12:58:25 +02:00
Alex Monk
a079411cde (bug 40829) Show cascading protection info on action=info
Change-Id: Ibc26bf8ae4e50bb9f158f48747b648df3ecb4b49
2012-10-17 23:50:08 +01:00
Marius Hoch
020d7b425c Minor action=info redirect changes
Follow up to Change-Id: I17ab90af902b3b23d5c9bc23f0c71a18d1006cb8
fixing minor stuff (using the word separator message to seperate
the page name and (info) and escaping the link text given to
Linker::link)

Change-Id: I6d5e2ecf2c8a9394556426e952812f4b0d2ad529
2012-10-17 22:00:15 +02:00
TheDJ
4dacfda31a Merge "(bug 40154) On action=info show where this page redirects to and whether it's a content page or not." 2012-10-17 19:37:56 +00:00
daniel
0d78e4aedb [Bug 40032] code 415 for bad type in action=raw
Non-text content is not supported via action=raw. Use code 415 instead
of 406 to indicate this.

Change-Id: I6b7fbc5f4d0040ca2c90b77b2ceb39853f136fd8
2012-10-14 23:35:52 +00:00
Alex Monk
5e1e5df968 (bug 40154) On action=info show where this page redirects to and whether it's a content page or not.
Change-Id: I17ab90af902b3b23d5c9bc23f0c71a18d1006cb8
2012-10-14 17:50:15 +01:00
madman
cbed68b994 (bug 39688) action=info displays misleading edit history for redlinks
* Will not display edit history and properties for nonexistent pages
* Will not display misleading page information for noncurrent revisions

Change-Id: I23dd6ead555449d0810cbc64d79737654818e3e6
2012-10-14 13:34:23 +02:00
Alex Monk
b5a79ed84c (bug 23721) Only show deletedOnly checkbox on contribs and history if the user can see deleted entries
Change-Id: Id47f2883e22a8742d4e5c322c349743e9101f4a3
2012-10-14 02:03:07 +01:00
MaxSem
68f25d6b8a Merge "Remove a bunch of trailing spaces and unneeded newlines" 2012-10-12 18:36:46 +00:00
Alex Monk
388df2ee24 Tidy up InfoAction and note it's hook in docs/hooks.txt
Also add $context parameter to the hook and (bug 40845) don't
overwrite pageInfo's $title parameter.

Change-Id: I41128abb72553142b45e90befabde541b2d8941f
2012-10-11 01:41:43 +01:00
umherirrender
85d8ee1f87 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
2012-10-10 20:14:40 +02:00
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
Siebrand
2b7464152b Merge "Merge branch 'Wikidata' into master." 2012-10-09 09:39:47 +00:00
daniel
329d5b3516 Merge branch 'Wikidata' into master.
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
2012-10-09 11:34:24 +02:00
Alexandre Emsenhuber
5fc20f89cb Removed useless $title parameter to InfoAction::pageInfo()
The $title variable is set to $this->getTitle() before its
first use in that method, so it's useless to pass it as parameter.

Also changed the call to exist() in InfoAction::onView() to use
the Page object instead of the Title object.

Change-Id: Ic07ee0ccccfd9cc3aabd497aebf7965136a2d3bd
2012-10-09 10:56:25 +02:00
umherirrender
22dd67ea3c Avoid direct access to $wgGroupPermissions
Created a new method User::groupHasPermission and check also
$wgRevokePermissions for the given right

Change-Id: I41edb091fa35c8c68b6f95cc5fd208ea99418cdb
2012-10-09 06:41:23 +00:00
daniel
bb51a58e57 Cleanup of Wikidata branch.
This cleans up several issues raised in comments to I3b2dad3a,
mostly style and merge artifacts.

Change-Id: I99f5e300a671db1353db151cd187ffd2e4478d03
2012-10-08 17:34:47 +02:00
daniel
c546fae8ed merge latest master into Wikidata branch
Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d
2012-10-08 13:58:54 +02:00
Siebrand Mazeland
e591bda6fd Fix issue with link in history line for revs hidden from sysops
Looks like this link should have been called $del instead of $cdel.

Needs some verification. Blame came up with Aaron's change in
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/58351. Looks like it may
have been a typo.

Change-Id: I36607e1d1365ddfb0383d68702291509b94a931a
2012-10-08 01:57:15 +02:00
Reedy
026ce9c37a Merge "(bug 40820) Revert my changes to includes/actions/CreditsAction.php" 2012-10-07 21:01:24 +00:00
umherirrender
1572841659 Simplify code for usertools in RollbackAction
Change-Id: Ib550084ca60f54a0c1b1a3d6479fba75bc4f22bf
2012-10-07 19:05:34 +02:00
Alex Monk
8945408808 (bug 40820) Revert my changes to includes/actions/CreditsAction.php
Also don't show contributors on action=info

Change-Id: I48b70b3d6b94e295aca23d506c7cce9185df4bcc
2012-10-07 15:05:26 +01:00
IAlex
74575ab772 Merge "pass user object for delete/undelete/filerevert in api/gui" 2012-10-07 06:07:39 +00:00
umherirrender
9dfdfeba71 Add userToolLinks to action=info
Useful link to talk page for the user

Using Linker::revUserTools to have the striked "username removed"
instead of nothing.

Change-Id: I234cb2a483139407087b18ad47ac5b362b8ee5e9
2012-10-06 22:37:22 +02:00
umherirrender
36c375f766 pass user object for delete/undelete/filerevert in api/gui
Change-Id: Idd214fa1ad9d05ebb2a79225256fb344a1085e9d
2012-10-06 11:54:50 +02:00
madman
6fcc477edc (bug 38559) Add hook to info action to allow extensions to add extra
information to a pages info

* Added new function, pageInfo, to return page information in easily
  manipulated format.
* Added call to wfRunHooks.
* Moved credits to follow the footer (this is a change for my
  aesthetics that may be reverted, but it also allows admins to more
  easily add a horizontal break or some such in pageinfo-footer).
* All messages are escaped.

Have tested extensively, all information is rendered exactly as it
was before as far as I can see.

Change-Id: I702f2f13d3b7af26d89c4fd9002d3161dc7905d2
2012-10-05 14:34:50 +00:00
Alex Monk
c32c322cdd A few action=info bugfixes and enhancements.
(bug 39533) Merge action=credits into action=info.
(bug 39951) Remove redundant 'Page protection' text.
(bug 39953) Don't show irrelevant protection statuses.
(bug 39954) Use proper section headers.
(bug 39955) Link page creator and latest editor values.

Change-Id: I68308aac96b89c2aec296e2a4fa385fd1d42ab5a
2012-10-04 15:29:51 +00:00
Alexandre Emsenhuber
737b29472b Convert valign HTML attribute into inline CSS
Change-Id: I62c14f3373e6f8b35c73a02fd042c79a01fab814
2012-10-01 18:16:38 +02:00
daniel
b6b686c13b merged master
Change-Id: I0ef7c7f33a5dc5855f38b20c03ddc5306f38ec66
2012-09-19 12:34:10 +02:00
madman
100473d60e (bug 40046) MediaWiki's info action should link first revision of a page
Change-Id: I9cf13eafc7a18db27391cfc160f780cd73d88b87
2012-09-18 22:31:29 +02:00