Commit graph

179 commits

Author SHA1 Message Date
Alexandre Emsenhuber
de0847f16c * (bug 22496) Viewing diff of a redirect page without specifying "oldid" parameter no longer makes the page displayed as being the redirect target 2010-04-04 08:55:01 +00:00
Lisa Ridley
bc1023ac89 Updated documentation on Title, Wiki. Added @internal tag to Article, Title, Wiki indicating documentation review date for tracking purposes. 2010-03-15 23:22:50 +00:00
Max Semenik
007b4b8a7d Follow-up to r60744: one more const != $var <--> $var != const switch 2010-01-17 18:25:44 +00:00
Sam Reed
b6e0df246f Attempt at normalistion of comparison styles - empty string on left and right hand side normalised to it being on the rhs
Before this change, there were (? being regex 0 or 1)

"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32

== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85


Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)

Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising
2010-01-06 19:59:42 +00:00
Philip Tzou
0a6a24661f follow-up r59522. follow Tim's suggestion to serve same vary and XVO headers for the same URL. Now the vary headers should be consistent. Feel free to test it. 2009-12-21 18:55:42 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Danny B
6333fe241c * (bug 21776) Empty project + language interwikis do not work anymore [patch by Platonides] 2009-12-07 18:28:25 +00:00
Philip Tzou
13d7d9936a follow-up r59522 and r59735. only redirect to a variant URL when logged out. 2009-12-05 05:39:21 +00:00
Philip Tzou
3a3ce3fd7f follow-up r59522 and r59541. To make the condition when we'll use Accept-Language in Vary and XVO more clear. 2009-12-04 15:47:25 +00:00
Tim Starling
bd8fffe24d Reverted r58646 as per my comments on bug 20554. 2009-12-01 01:55:04 +00:00
Philip Tzou
080f144fc4 follow-up r59544. more comments added. 2009-11-29 18:38:57 +00:00
Philip Tzou
303b2b745d follow-up r59522, r59523, r59527, r59529, r59530.
1. Only use Accept-Language when 301 redirection happens. It won't call the parser, but it is the most case we need to ensure it uncacheable.
2. Merge addXVOHeader with addVaryHeader.
2009-11-29 06:47:51 +00:00
Roan Kattouw
1b89cd274a API: (bug 20554) Expose average slave lag (avglag) as well as maxlag. Patch by Sam Reed. 2009-11-06 14:38:55 +00:00
Tim Starling
c3e788299d (bug 20966) Use the name of the <button> element to determine which button was clicked, instead of the value. This avoids some IE-specific non-standard behaviour. 2009-10-06 06:30:24 +00:00
Aaron Schulz
5dba28ef9a Rename and document initializeSpecialCases() a bit 2009-09-28 03:43:07 +00:00
Aaron Schulz
2b5c51f177 missing wfProfileOut() calls 2009-09-23 00:34:57 +00:00
Aaron Schulz
62dd3d9fb6 bug 20519 Redirects in the stable version showed up wrong 2009-09-06 10:09:45 +00:00
Tim Starling
281cbfb883 * Fixed CR r48837. Although using ids[]=x in the query string is wrong and broken, ids[x]=1 works just fine and is a convenient interface.
* Fixed CR r49408: removed JS dependency for multiple revision delete/undelete. Using <button type=submit> we can submit the parameter "action=revisiondelete". The custom action is then distributed to Special:Revisiondelete, which can understand this kind of entry point with only minor changes.
* Also used <button type=submit> to avoid submitting the htmldiff button caption back to the server
* Show the same buttons at the top and bottom of the history page, refactored duplicated code
2009-09-02 01:59:36 +00:00
Tim Starling
3b4e961c47 * Renamed PageHistory to HistoryPage. Brion gave me permission to do this a couple of years ago, I thought it was about time. Provides naming consistency with ImagePage, RawPage, etc.
* Moved historyLine(), beginHistoryList(), endHistoryList() and related helper functions to the pager class.
* Renamed HistoryPage member variables, removed "m" prefix.
* Added declaration for IndexPager::$mIsFirst
2009-08-17 05:09:36 +00:00
Niklas Laxström
a39cf220d9 * Forward get parameters to local interwikis
* Patch by str4nd
2009-08-04 16:31:19 +00:00
Chad Horohoe
90a940cb6b (bug 15209) New hook right after initialization 2009-08-03 22:31:52 +00:00
Chad Horohoe
0e50b04b03 Handle todo: Mediawiki::initialize() is now called Mediawiki::performRequestForTitle() 2009-07-31 00:56:50 +00:00
Roan Kattouw
201ff65e60 Fix interesting regression from r49324: on a redirected page view, the content action tabs (article, discussion, edit, history) would point to the redirect instead of the target article. 2009-05-02 15:38:32 +00:00
Aaron Schulz
1859f993e9 Made DB profiling work by actually committing it to the DB 2009-04-21 01:51:17 +00:00
Chad Horohoe
2d921487e4 (bug 7830) Pending transactions failed to commit on loginToUse() error 2009-04-10 14:27:29 +00:00
Chad Horohoe
d5dd4044e5 Stage 2 of war on $wgTitle!! Make OutputPage, Skin and children rely on mTitle rather than $wgTitle. In theory, you could have an OutputPage/Skin that was referring to some title other than $wgTitle, unlikely though. In any case, make getTitle() return $wgTitle for now, just in case. 2009-04-09 02:22:36 +00:00
Tim Starling
b484417ddb Profile RawPage 2009-02-17 03:28:54 +00:00
Aaron Schulz
e84e1c4168 Redo simple ?diff check code for setting the right title (bug 15233) 2009-01-07 13:23:12 +00:00
Brion Vibber
fd02185e3b Pull back r45458 "Fix diff= urls with no title (bug 15233)"
This code is illegible; it's not very clear what it's doing or why. Please redo with clearer code; comment if necessary.
2009-01-07 04:01:05 +00:00
Aaron Schulz
b48561197b Fix diff= urls with no title (bug 15233) 2009-01-06 20:54:48 +00:00
Aaron Schulz
82c0328abf Tweak r45314: just return out 2009-01-02 15:56:33 +00:00
Aaron Schulz
19024619f6 (bug 9243) Avoid exit to make MW handle page exceptions properly 2009-01-02 11:36:52 +00:00
Aaron Schulz
a7e6cd9d5d * Move filecache hits to faster lower level index.php code
* Disable outputpage after file cache hit, since output was streamed already.
2008-12-27 07:07:16 +00:00
Aaron Schulz
34e1fe9e2a Skip redirect checks for NS_MEDIAWIKI 2008-12-23 22:48:44 +00:00
Brion Vibber
39e23c60ec Pull back r44972 for now "(Bug 16677) Media: view URLs should HTTP-redirect to canonical File: namespace"
r44972 isn't quite behaving transparently; non-view URLs are also being redirected to the raw view page, so for instance an ?action=edit or diff or whatever gets lost.

See for example:
http://en.wikipedia.org/wiki/Image:Wiki.png?action=edit
http://en.wikipedia.org/wiki/Media:Wiki.png?action=edit

these both currently behave just like:
http://en.wikipedia.org/wiki/File:Wiki.png?action=edit

while with this patch the Media: one would unexpectedly redirect to the view URL.

The redirection should probably just be done where other existing normalization is... perhaps all that's actually needed is just to replace a Media: Title with the equivalent File: one when initializing the title in the first place, and the existing normalization-redirection will take care of it.
2008-12-23 21:57:31 +00:00
Brion Vibber
4c13e8800e Revert r44970 "Add FileCache exit back from r44801"
Forcing an exit from the middle of an initialization function seems like pretty poor practice.
2008-12-23 21:50:42 +00:00
Aaron Schulz
d64229f145 (Bug 16677) Media: view URLs should HTTP-redirect to canonical File: namespace 2008-12-23 21:05:33 +00:00
Aaron Schulz
7526a42586 Add FileCache exit back from r44801 2008-12-23 20:56:20 +00:00
Brion Vibber
a4e2060e45 Revert r44801 "Tweaks from profiling"
Mostly seems to be formatting tweaks, loss of useful debug log output, and mysterious unexplained changes.
If some of these tweaks actually are based on profiling data, please provide details, such as "rearranging this call reduces service time from 80ms to 50ms for client cache hits on my machine" or whatever.
2008-12-23 19:39:00 +00:00
Brion Vibber
0356a38934 Revert r44798 "short-circuit update call"
Article::viewUpdates() may do things other than update counters (for instance, it updates the user-talk and watchlist for last-viewed status, and might do other things in the future). Let it centralize its own checks for what things are enabled. Since you won't necessarily know them all over in Wiki.png, they may get out of sync and lead to bugs if you try to replicate the check.
2008-12-23 19:31:08 +00:00
Aaron Schulz
6444714ca6 Avoid extra page_touched query 2008-12-22 07:35:56 +00:00
Aaron Schulz
eef9a8cdd7 Tweaks from profiling 2008-12-19 09:21:20 +00:00
Aaron Schulz
3289652bc1 short-circuit update call 2008-12-19 08:16:05 +00:00
Aaron Schulz
632896e341 Pull up and tweak filecache check to make it much faster and able to for request to avoid a db hit if counters are off and job rate = 0 2008-12-11 14:29:16 +00:00
Brion Vibber
b61b27b6cf Revert r44381 "Remove noisy profiling"
We... like profiling? :D
2008-12-11 00:54:21 +00:00
Brion Vibber
3dea7e4cb3 Revert r44335 "Tweak profile calls"
Let the doUpdates() func get counted even when it has nothing to do; otherwise stats will be skewed to only times when there are multiple updates. Or.... hmmm. bleah.
2008-12-11 00:29:37 +00:00
Aaron Schulz
d3e278c4f0 Minor RawPage tweaks 2008-12-10 04:54:46 +00:00
Aaron Schulz
db9f5258e6 Remove noisy profiling 2008-12-10 04:40:18 +00:00
Aaron Schulz
b3d0a9767e Whitespace/style consistency 2008-12-09 23:00:28 +00:00
Aaron Schulz
ca8eaca30f Tweak profile calls 2008-12-09 11:51:00 +00:00