Daniel Friesen
ff33175e96
Update index.php and Wiki.php to make better use of the context.
2011-04-04 00:18:33 +00:00
Happy-melon
bfdcdd1371
Follow-up r85278, r85240:
...
* Internalise $title in MediaWiki base class
* Fix access fatal in SpecialPage by getting the context from the MediaWiki base class rather than the OutputPage
* Fix a couple of typos in RequestContext which would have thrown errors/fatals if anyone had ever called them.
2011-04-03 21:32:50 +00:00
Happy-melon
3319058b88
Expand wfShowMaxLagError() into index.php. It was only being called from here and it's pretty non-portable. Doing so reveals that it's safe to move the declaration of $mediaWiki below the maxlag test, which will fractionally improve performance in that instance (partly compensating for having to parse OutputPage as introduced in r85278).
2011-04-03 20:43:50 +00:00
Happy-melon
d6defb9679
Store the WebRequest and OutputPage in the MediaWiki class, don't pass the global variables in to each function separately.
2011-04-03 19:39:39 +00:00
Happy-melon
08e7495043
Cleanup in Wiki.php and index.php:
...
* Add visibility to MediaWiki::*() methods.
* Refactor out MediaWiki::preliminaryChecks(), was actually just one preliminary check :D
* maxlag is a property of the database, not the wiki, so MediaWiki::checkMaxLag() doesn't belong. Since it was only called in index.php I just expanded it there, it's only a trivial wrapper anyway.
* Run stylize.php over code.
2011-04-03 15:56:29 +00:00
Alexandre Emsenhuber
82ee110998
Made index.php's profiling cosistent with other entry scripts
2011-04-02 18:59:47 +00:00
Alexandre Emsenhuber
56a0a92abb
Fix for r78512: set the default value to "view" for the action parameter
2011-03-06 16:51:56 +00:00
Alexandre Emsenhuber
3b5fc40667
Update copyright year
2011-01-01 12:40:21 +00:00
Bryan Tong Minh
0ff3a40b6e
Add main contributors in SpecialVersion to README and index.php as well
2010-12-29 11:57:52 +00:00
Alexandre Emsenhuber
fed60b047c
Per ^demon, follow-up r78260: introduced MediaWiki::getAction() to get the action that will be executed
2010-12-16 20:11:53 +00:00
Alexandre Emsenhuber
6f686426ea
Call finalCleanup() after outputting a cached page to run the deferred update list since Article::viewUpdates() adds a SiteStatsUpdate object to that list
2010-12-09 15:59:44 +00:00
Alexandre Emsenhuber
0fdb7455af
Use the AutoLoader to load the AjaxDispatcher class
2010-12-08 10:00:25 +00:00
Alexandre Emsenhuber
1343d55200
Removed OutputPage::setEncodings(); its current implementation just converts $wgInputEncoding and $wgOutputEncoding to lowercase but the inclusion of Language.php will set them back to uppercase.
...
So instead of playing with these variables, let's just remove that function.
2010-12-08 08:03:52 +00:00
Alexandre Emsenhuber
c819104407
* Don't unset $wgTitle if it's null, just let it as is so that the variable is always defined (it is already set to null in in Setup.php). It was added in r12612 when all the code that set $wgTitle was moved in MediaWiki::checkInitialQueries()
...
* Removed comment that documented a line removed in r45126
2010-12-07 12:35:14 +00:00
Alexandre Emsenhuber
30caa2a8b9
Merged wfDoUpdates() and MediaWiki::doUpdates() in wfDoUpdates(); avoids code duplication
2010-12-07 11:49:13 +00:00
Chad Horohoe
db461a7165
Rm two unused vars
2010-12-06 21:56:07 +00:00
Alexandre Emsenhuber
cb6f556784
* (bug 26253) Removed $wgPostCommitUpdateList
...
As I said on the bug, this variable is not used since ages
2010-12-06 16:17:43 +00:00
Aryeh Gregor
a6aac77d16
Revert r70960 "AjaxDispatcher, now ~30 lines shorter and not using $_GET or $_POST"
...
Broke CategoryTree, see code review for the error message.
2010-08-13 21:39:51 +00:00
Chad Horohoe
5806e63383
AjaxDispatcher, now ~30 lines shorter and not using $_GET or $_POST
2010-08-12 14:34:54 +00:00
Chad Horohoe
c9b31e0216
Remove unnecessary require(). Autoloader already handles this
2010-08-09 18:55:09 +00:00
Chad Horohoe
c3ca2c3632
Remove extra linebreak
2010-03-21 14:56:44 +00:00
Aryeh Gregor
f2d8c17bc1
Annual copyright year update
2010-01-01 21:09:14 +00:00
Chad Horohoe
a4e5e935b6
Mass convert NULL -> null. Left strings and comments alone, obviously.
2009-12-11 21:07:27 +00:00
Tim Starling
bd8fffe24d
Reverted r58646 as per my comments on bug 20554.
2009-12-01 01:55:04 +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
Aaron Schulz
9025f9dc54
reverted r55161 - not needed
2009-08-17 02:25:02 +00:00
Aaron Schulz
7ead47486d
Fixed html filecache handling of ?curid urls
2009-08-17 01:54:31 +00:00
Chad Horohoe
0e50b04b03
Handle todo: Mediawiki::initialize() is now called Mediawiki::performRequestForTitle()
2009-07-31 00:56:50 +00:00
Tim Starling
b02dd9c492
Reverted r50065, restInPeace does this since r49684.
2009-05-27 05:32:32 +00:00
Tim Starling
c2433e3be2
Commit master changes on all ajax requests. There's no reason that this should be the responsibility of the callee. Causes annoying bugs when omitted.
2009-04-30 05:28:02 +00:00
Alexandre Emsenhuber
0bf494a1f6
* Added "@file" so that doxygen doesn't attribute the comment to the first instruction
...
* whitespaces fixes
2009-03-20 12:00:38 +00:00
Aryeh Gregor
ffa193fcb4
Increment years
2009-01-08 01:29:11 +00:00
Aaron Schulz
43c6f33ddb
Fix doc comment, sigh
2008-12-28 15:17:21 +00:00
Aaron Schulz
ba77d25db2
FileCache - Leave raw page cache control alone to avoid hits
2008-12-28 15:14:15 +00:00
Aaron Schulz
0dd5d00e67
FileCache tweaks:
...
* Fix typo self -> MediaWiki
* View updates run on client cache hits
* Removed unneeded $wgOut->disable() call
* Disabled unused output on rawpage cache hits
* Removed redundant checkLastModified()
2008-12-28 15:03:57 +00:00
Aaron Schulz
9b206552ac
Opps, forgot to commit this
2008-12-28 14:32:49 +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
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
Aaron Schulz
eef9a8cdd7
Tweaks from profiling
2008-12-19 09:21:20 +00:00
Aaron Schulz
b3d0a9767e
Whitespace/style consistency
2008-12-09 23:00:28 +00:00
Alexandre Emsenhuber
11a9a8dac4
* (bug 12568) configuration script now produce valid XHTML
...
* Updated copyright (taken from SpecialVersion.php)
2008-07-20 14:29:04 +00:00
Alexandre Emsenhuber
c44fc31ac7
tweaks:
...
* group master queries with other queries in "SQL Queries" in profileinfo.php
* end 'main-misc-setup' section before executing ajax requests so that they don't get closed by the profiler for ajax requests.
2008-04-29 16:35:11 +00:00
Tim Starling
fbfb509df5
* Introduced LBFactory -- an abstract class for configuring database load balancers and connecting to foreign DBs.
...
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB.
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system.
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete.
* Removed the useless force() function.
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features.
* Removed ancient benet-specific hack from waitForSlave.php
2008-03-30 09:48:15 +00:00
Brion Vibber
c893cdddd6
Drop some useless parameters to silly methods on the pretty much broken MediaWiki object.
...
These are just globals, and will never be anything other than the globals, so just use them...
Works around mysterious segfault we started having on some wikis, for no apparent reason, and simplifies ugly code. Sigh.
2008-03-26 18:18:24 +00:00
Alexandre Emsenhuber
e59670fa15
* Document Exception.php
...
* Pass $wgArticle by reference in MediaWiki::initialize() so that it can be set before executing an action and can be used when throwing an exception.
2008-03-21 16:56:44 +00:00
Alexandre Emsenhuber
88a0e17557
Rewrite a bit the MediaWiki class:
...
* Document function parameter and undocumented functions
* Move use of global settings to localized one setted in index.php
* fix whitespaces
* Use __METHOD__ instead of hardcoded method names
* Call MediaWiki::articleFromTitle() staticly
2008-03-19 19:55:26 +00:00
Aaron Schulz
e3a39d4803
Whitespace tweak
2008-02-19 21:19:55 +00:00
Niklas Laxström
9021990c13
* Use full path (for example for apc.filters)
2008-02-09 16:24:09 +00:00
Victor Vasiliev
30a45db7c9
Update some copyright dates to 2008
2008-02-04 04:50:55 +00:00
Aryeh Gregor
a15c419b3d
Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.)
2007-06-29 01:19:14 +00:00
Tim Starling
916997d6f6
maxlag hidden parameter. Allows client-side bots to throttle under slave lag conditions, just like server-side maintenance scripts.
2007-04-22 21:17:10 +00:00
Brion Vibber
1ed58139f6
* (bug 9256) Add a quick note to index.php header comments
...
References documentation and main site, explains that web server is misconfigured if you're reading it, and lists copyright/license info.
2007-03-12 15:57:17 +00:00
Brion Vibber
0b06a4fffc
Revert r19529 ('ajax editors list'); per chat w/ hashar I recommend working on this as an extension for now. It seems pretty modular, and should be an ideal candidate for that.
2007-01-21 03:14:06 +00:00
Antoine Musso
ed8e8e5833
Optional feature : 'Ajax show editors' based on an idea by Tim Starling
...
Merge from hashar's branch.
2007-01-20 21:05:36 +00:00
Antoine Musso
f7dfe35d1e
Load the ajax stuff once we have a title or we will not be able to parse
...
wikitext. The parser requires a $wgTitle object or it throws an exception.
2007-01-09 21:00:14 +00:00
Tim Starling
c822e80e8f
Exit from AJAX requests properly. Calling exit after doing something is really bad.
2006-08-24 17:01:45 +00:00
Daniel Kinzler
acd1c91af1
fixed include path of AjaxDispatcher.php in index.php
2006-07-26 23:35:49 +00:00
Tim Starling
3ea576aa25
Consolidated web initialisation code into includes/WebStart.php. Moved profiling setup to a hook file "StartProfiler.php", following Brion's suggestion to merge Wikimedia's early profiling patch into subversion. Renamed Profiling.php and logProfilingData(), removed unnecessary wfProfileClose() calls.
2006-07-14 05:35:31 +00:00
Domas Mituzas
9aa7ac0d2c
microtime(true) instead of slow php4 hacks
2006-05-28 21:25:03 +00:00
Jens Frank
cf256a36bf
Fix wrong path
2006-03-27 20:15:24 +00:00
Jens Frank
97666d062d
OOP'ed Ajax functions, embedded in index.php for better compatibility with wikipedia.org setup
2006-03-27 18:53:15 +00:00
Antoine Musso
0cb608f2da
* additional comments
...
* line wrap at 80 columns
2006-01-15 23:12:27 +00:00
Antoine Musso
313c45d5ae
funny quotes
2006-01-15 23:07:19 +00:00
Brion Vibber
59b62d1eb7
revert to Wiki.php 1.28 and index.php 1.130
...
this broke wikipedia. please DO NOT COMMIT BROKEN CODE ON HEAD EVER AGAIN
2006-01-13 17:33:37 +00:00
Magnus Manske
b71834bdec
index.php now fits on a single screen :-)
2006-01-13 12:52:04 +00:00
Magnus Manske
3ccace42c0
Further cleanup of index.php
2006-01-13 12:10:59 +00:00
Magnus Manske
ae035e1d27
Moving more stuff to Wiki.php
2006-01-11 19:33:15 +00:00
Magnus Manske
dcae8b53ae
Most of index.php now in Wiki.php
2006-01-11 15:46:01 +00:00
Magnus Manske
a0302856fc
Consolidation of mediaWIki calls into Wiki.php
2006-01-11 14:42:32 +00:00
Magnus Manske
f53d6be786
Page creation now mostly moved from index.php to Wiki.php
2006-01-11 14:01:40 +00:00
Magnus Manske
7d9d598ef8
moved more stuff
2006-01-11 13:28:23 +00:00
Magnus Manske
62265d4b1a
fix
2006-01-11 13:04:43 +00:00
Magnus Manske
c3a994a639
Moving more stuff
2006-01-11 12:56:13 +00:00
Magnus Manske
da73d9192f
Slowly moving more stuff from index.php to Wiki.php
2006-01-11 12:25:41 +00:00
Magnus Manske
38f0c4969d
mini-fix
2006-01-10 21:49:56 +00:00
Magnus Manske
c8c91d0c23
Brion-style conformity :-)
2006-01-10 21:45:56 +00:00
Magnus Manske
8137979dd3
moving some more stuff from index.php to Wiki.php
2006-01-10 21:20:03 +00:00
Magnus Manske
a2ddb0c688
Moving image and category detection
2006-01-10 18:41:23 +00:00
Magnus Manske
579bcc8c16
Second attempt at (partially) moving to Wiki.php; tested this time, worksForMe
2006-01-10 17:34:04 +00:00
Magnus Manske
006c0ae27b
Catching: getrusage() does not exist on Windows platforms
2005-12-31 20:30:22 +00:00
Domas Mituzas
70c5b8cf42
close profiling on script exits instead of page flushing
2005-12-30 23:14:34 +00:00
Tim Starling
81217f55a0
* Added templatelinks table. The table currently represents a literal list of templates included from each article. That is, the table contains pages which were actually loaded during parsing, not the markup which went into resolving their names.
...
* Ended the role of $wgLinkCache in link updates. Instead, links (and related entities) are registered in the ParserOutput object during a parse. The LinksUpdate constructor now takes a ParserOutput object as a parameter. $wgLinkCache is still used, but only as a cache of article IDs.
* Because the link list is now saved and restored in the parser cache, meta tag keywords now work on parser cache hits. Some refactoring took place in this area.
* Rendering of the HTML for category links has moved from Parser to OutputPage.
* Did some general pottering around in Article.php, such as allowing an Article object to be created with a specified revision ID, thereby optionally removing the dependence on $wgRequest. Not used at the current time.
* A few documentation tweaks.
2005-12-30 09:33:11 +00:00
Brion Vibber
93ae7a9b80
Revert to working version
2005-12-29 20:46:25 +00:00
Magnus Manske
d9efc105b9
finishing moving of code from inex.php to includes/Wiki.php
2005-12-29 10:50:06 +00:00
Magnus Manske
2b1dfa10a9
moving stuff from index.php to includes/Wiki.php
2005-12-29 10:21:20 +00:00
Ævar Arnfjörð Bjarmason
1c0b4ab96d
* Whitespace
2005-11-25 06:31:22 +00:00
Brion Vibber
ee402472ac
* Recognize Special:Search consistently so read whitelist works
2005-11-16 21:31:41 +00:00
Tim Starling
06e5561545
Require POST method for action=purge, to prevent bots from hitting it
2005-11-07 04:14:15 +00:00
Tim Starling
239ba39261
workaround for any current or future exploit of the $GLOBALS overwrite vulnerability
2005-10-31 21:14:07 +00:00
Brion Vibber
e638ea4295
Reverting fix for 2585; some users report seeing error displays of some
...
kind with some versions of MSIE (unable to reproduce here).
2005-10-24 02:41:54 +00:00
Brion Vibber
219094eb01
Committing various live hacks from Wikimedia servers
2005-10-22 20:52:30 +00:00
Tom Gilder
2afff59a8b
(bug 2585) Return proper 404 code when pages don't exist
2005-10-12 03:12:40 +00:00
Tom Gilder
1380971d5d
Nicer default page (complete with sharks with frigg'n lasers on their heads)
2005-10-06 13:07:01 +00:00
Tim Starling
534cd02a0b
fixed redirects from one namespace to another
2005-08-20 11:42:19 +00:00
Antoine Musso
062dc6198e
No check needed when viewing old versions
2005-08-12 13:18:57 +00:00
Antoine Musso
7b007ab37c
Fix #710 : redirect to category pages got an empty category list.
...
TODO: redirect to image pages doesn't show the image.
2005-08-11 05:28:48 +00:00
River Tarnell
7b810c22ef
let sysop delete trackbacks
2005-07-23 06:30:26 +00:00
Ævar Arnfjörð Bjarmason
38df72df60
* There's no more need for this here than anywhere else..
2005-07-08 01:57:08 +00:00
River Tarnell
e4a87e105a
implement "action=render"
2005-07-03 04:00:33 +00:00
Tim Starling
17b532e175
fixed hook call
2005-07-02 09:14:30 +00:00