Commit graph

92 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Siebrand Mazeland
6b237ebf55 Update docs for files in includes/actions/
Change-Id: I99655ad3df4bc252e3c176e4f465f5ecd615c55f
2013-11-14 20:09:19 +01: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
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
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
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
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
Siebrand Mazeland
8df9e32ad0 Fix PHPDoc
"The" is an unknown class.

Change-Id: Ic8ce1f1252f4b435dbca789226056781d606d8ee
2013-04-01 18:45:18 +02:00
Alexandre Emsenhuber
f4b1735753 Fix case of some Title methods (final round)
Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
2013-03-28 11:30:06 +01: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
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
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
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
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
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