Commit graph

126 commits

Author SHA1 Message Date
Aaron Schulz
4689cf11fe Don't hang up page views with jobs 2008-09-12 17:01:41 +00:00
Aaron Schulz
fa315edbb4 minor code tweaks 2008-08-21 03:05:25 +00:00
Alexandre Emsenhuber
c985f72800 Tweaks for Credits and Metadata:
* Put all functions into classed so that they can be autoloaded
* Marked all private methods as protected
* Article::getContributors() now returns UserArrayFromResult object
2008-08-18 19:21:55 +00:00
Aaron Schulz
5204507282 profile out 2008-08-18 05:50:03 +00:00
Aaron Schulz
58f01b0645 Re-commit fixed r37006 2008-07-04 09:38:12 +00:00
Brion Vibber
bbaa82d5f9 Revert r37006 -- causes fatal errors:
PHP Fatal error:  Using $this when not in object context in Article.php on line 135
2008-07-04 00:04:58 +00:00
Aaron Schulz
8c77d16317 Make redirects work properly with flagging (bug 14714) 2008-07-03 20:37:44 +00:00
Chad Horohoe
8af42e9413 Pass $mediaWiki object to MediawikiPerformAction hook. 2008-07-01 03:56:16 +00:00
Alexandre Emsenhuber
58460cd8ed Fix doxygen warnings 2008-05-17 10:15:59 +00:00
Bryan Tong Minh
bbfcb113c3 Don't call wfFindFile twice when it's not necessary. 2008-05-10 14:19:25 +00:00
Bryan Tong Minh
ddf879fccf (bug 13943) Fix image redirect behaviour on image pages:
* Confused redirect source with target
* Don't check for article existence if the target is a foreign image page
2008-05-10 11:12:53 +00:00
Bryan Tong Minh
ec1f42a1e9 * Use getters where appropriate
* Fix following foreign file redirects again
2008-05-09 10:42:49 +00:00
Bryan Tong Minh
3611f529a8 * Move image page redirect checking to ImagePage. Should now also work on foreign repos.
* Changed File::getRedirected to return a DBkey instead of a formatted text
2008-05-08 20:55:13 +00:00
Bryan Tong Minh
581554c080 * Add new flag FIND_IGNORE_REDIRECT to wfFindFile and functions it depends on
* Follow redirects on image pages if the redirect is actually an image redirect
* Add comments to the check for redirect code in MediaWiki::initializeArticle so that I actually understand what it does
2008-05-08 20:15:09 +00:00
Aaron Schulz
5d2ee948f2 Don't make extensions have to play around with NS_MEDIA 2008-04-22 01:06:51 +00:00
Aaron Schulz
aa2b75a26b Pass title by ref to consistently override the whole thing. Image pages where acting oddly with Media: urls, thinking the page didn't exist when it did. 2008-04-22 00:56:58 +00:00
Brion Vibber
ea8b2965a8 Revert some chunks of r33133 and r33375:
* Let followRedirect() *always* work correctly by working from the article text.
* This ensures that we're not falsely looking up data from another version and that we're not missing interwik and fragment data.

Should clean up both bug 13754 (editing old version of redirect sometimes gives the target page text)
and bug 13752 (bugs with fragments and probably interwikis in redirect target).

Haven't been able to repro 13754 at home though, so we'll see.
2008-04-15 18:11:28 +00:00
Alexandre Emsenhuber
2dd7e59f17 (bug 13752) Section redirects now works again 2008-04-15 17:32:23 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +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
7304f81288 missed one 2008-03-26 18:57:37 +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
Tim Starling
982fbb2dd9 * Don't show edit permissions errors on a red link click, just redirect to the article. This is so that readers who don't know what a red link is aren't confused when they are told they are range-blocked.
* Put "not yet written" in the title attribute of red links, so that readers unfamiliar with the site might guess what the colour means.
* Fixed minor bugs and refactored code in the vicinity of EditPage::edit().
2008-02-21 09:32:59 +00:00
Victor Vasiliev
bf01bc026b * Don't follow redirects if image exists 2008-01-20 16:05:44 +00:00
Victor Vasiliev
f1850a9238 * Support redirects in image namespace
Now doesn't require schema change
2008-01-16 18:27:43 +00:00
Domas Mituzas
01ccf55545 Few sanity things for database activity:
* Provide function to COMMIT master connection in case there were any changes
* Use it at cleanup, instead of sending too many COMMITs to all slaves
* Don't acquire master connection, if no updates are to be done
* Don't care about closing database connections, let PHP do that (would close HTTP socket few nanoseconds earlier)
2008-01-12 22:51:16 +00:00
Brion Vibber
7c1170dcbf Revert for now r28986, 28987, 28992 - image redirects.
Would prefer to properly review how this works and how it interacts with current and future image behavior, rather than being surprised by it in the middle of ten other things being reviewed.
2007-12-31 20:26:53 +00:00
Victor Vasiliev
27c967825a * Proper redirect deletion
* Don't use ImagePage on redirects
2007-12-29 14:43:17 +00:00
Roan Kattouw
4895ce631f Revert part of Brion's 27627: please don't throw away the child (maxlag) with the bathwater (format=raw) 2007-11-19 15:57:58 +00:00
Brion Vibber
b61adceeb9 Revert r27581, 27598, 27626
format=raw is an HTML injection machine like action=raw but without any safeguards; it's trivial to create JavaScript exploits which hit at least Internet Explorer.
There's no reason to add a whole new danger point here when you've got machine-readable structure already... please do not add this raw formatter back.
2007-11-19 15:32:06 +00:00
Victor Vasiliev
96940993bd * (bug 11206) api.php should honor maxlag
* Add wfMaxlagError function
* Add MIME type override option for format=raw
2007-11-18 09:37:52 +00:00
Victor Vasiliev
29308b8ce8 Make action=render follow redirects by default. There's no reason why someone may want to render redirects (even if he need, he may use redirect=no) 2007-11-15 15:10:04 +00:00
David McCabe
5549750977 The uncontroversial Liquid Threads hooks.
The hook SkinTemplateTabAction got left in from a previous attempted commit, but the documentation is added in this commit. The other new hooks here are ChangesListInsertArticleLink, MediaWikiPerformAction, and BeforeWatchlist.
2007-11-06 01:16:25 +00:00
Brion Vibber
6a3260fe26 Revert r26670 [LiquidThreads-related patches] for now:
* Adds five undocumented hooks
* Unclear purpose for change to SpecialPage
* Big search-and-replace in EditPage for title usage which seems to still leave things inconsistent; a bit confused what all that's mean to be doing.
2007-10-18 14:55:48 +00:00
David McCabe
c474b77da3 Merged in changes from Liquid Threads branch including extra hooks and minor changes to EditPage. (Liquid Threads itself is still an extension; this is just some things it needs.) 2007-10-12 23:12:24 +00:00
Brion Vibber
202b5d1a47 Revert r26414 -- causes image reverts to fail as it disables the revert action 2007-10-07 20:44:16 +00:00
Rob Church
58536527c7 (bug 11561) Don't throw a PHP fatal error when non-existent "revert" action attempted 2007-10-04 20:54:35 +00:00
Brion Vibber
137ce4517b * (bug 8054) Return search page for empty search requests with ugly URLs
Send things to Special:Search as long as a 'search=' parameter is given, even if it's empty.
Also removed a redundant second check for the parameter.
2007-07-17 17:16:59 +00:00
Nick Jenkins
00fc8be3bc Mark Mediawiki::articleFromTitle() as static to prevent following strict standards warning:
---------------------------------
Non-static method MediaWiki::articleFromTitle() should not be called statically in extensions/TalkHere/TalkHere.php on line 81
---------------------------------
2007-07-13 08:40:08 +00:00
Brion Vibber
cd83b6bb29 woops -- parens broke teh diffs 2007-07-10 20:01:43 +00:00
Brion Vibber
326b1c4cea Fix regression caused by the namespace check on oldid override.
Don't die if we don't have a valid title yet!
2007-07-10 19:37:12 +00:00
Rob Church
9a9db53167 * Code conventions
* Tweak release notes
2007-07-10 14:19:22 +00:00
Yuri Astrakhan
5ffae93ef8 Added $wgShowHostnames to shows/hide host names in API results and HTML comments 2007-07-10 13:46:22 +00:00
Aaron Schulz
2bfd2e6544 *Use NS_SPECIAL constant to be formal 2007-06-30 00:10:49 +00:00
Aaron Schulz
861f5a0f32 *Don't fuck over special pages with oldid param 2007-06-30 00:08:58 +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
Brion Vibber
05b21233ff * (bug 7071) Properly handle an 'oldid' passed to view or edit that doesn't
match the given title. Fixes inconsistencies with talk, history, edit links.

This reverts r23445 and moves the check upstream into the title setup at
MediaWiki::checkInitialQueries(). As the most specific identifier which can
be passed, the revision title listed for the oldid (if any) trumps both
'title' and 'curid' parameters.
2007-06-27 15:30:43 +00:00
River Tarnell
e59f873bef - Http::request(), Http::post()
- don't redirect page views on POST
- Special:Export shouldn't do POST special case when page name provided
- Special:Import should use POST for interwiki fetches
2007-05-10 19:13:02 +00:00