Commit graph

451 commits

Author SHA1 Message Date
Brion Vibber
31e80b39fb Apply $wgCookieHttpOnly setting to the session cookie as well 2008-04-16 23:06:51 +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
Andrew Garrett
4f61581a90 Add wfGenerateToken function, to generate a random hex token. Used in CentralAuth, currently. 2008-04-11 00:43:13 +00:00
Alexandre Emsenhuber
2f41e3c98b Removed usage of deprecated settings 2008-04-06 16:14:04 +00:00
Aaron Schulz
ea7e67e653 And here... 2008-04-05 15:54:05 +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
Aryeh Gregor
fa7fd87647 Don't require commandLine.inc when not using the command line; instead, move wfWaitForSlaves() to GlobalFunctions.php, which is where I expected it to be to begin with. That appears, sensibly, to be loaded by all code paths. While I'm there, add some documentation. 2008-03-18 13:18:06 +00:00
Aryeh Gregor
c2f8e932d8 Improve on r32014 with a helper function to avoid code duplication/possible inconsistency. Would it be nice to start using this more, or should we just keep all the deprecated functions forever and not whine about it? 2008-03-16 00:50:14 +00:00
Brion Vibber
9463b17980 * regression fix: make dumpUploads.php work again
* dumpUploads.php options now actually supported
* wfRelativePath() no longer includes spurious ".." when base path is "/"
* wfRelativePath() now returns full path for differing Windows drives
2008-03-06 01:07:00 +00:00
Brion Vibber
82cd975e9e * (bug 13139, 13074) Fix request data for parameters with numeric names 2008-02-26 22:33:04 +00:00
Tim Starling
cd56a97356 * Add wfReadOnlyReason() to supply the reason for the wiki being read only. Use it in OutputPage. 2008-02-24 03:50:05 +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
Tim Starling
377561cd1e * Introduced OutputPage::addWikiMsg() and OutputPage::wrapWikiMsg(), to make it easier to avoid double-parsing. Double-parsing introduces differences between the old and new parsers.
* Used the new functions in the relevant places throughout the core. Where this was not possible, used wfMsgNoTrans() to avoid double-parsing.
* Calling wfEscapeWikiText() on a title before passing it to a message is unnecessary and causes bugs. The best idea is to let the message do its own escaping. Removed wfEscapeWikiText() from the caller of addedwatchtext, removedwatchtext, deletedtext, protect-text, nosuchusershort and movepage-moved. Updated all message files to use <nowiki>$1</nowiki> where appropriate in these messages. 
* Removed unnecessary empty message handling from semiprotectedpagewarning
* Removed nonsense warning about the output of wfMsg() not being safe for inclusion in HTML. 
* Changed wfShellExec() to use passthru/ob_get_contents instead of exec(). This avoids corruption of whitespace in the response. 
* Added $wgValidateAllHtml feature, to optionally validate HTML on output. 
* Fixed missing newline in cascadeprotected in MessagesEn.php
* Belatedly updated addedwatchtext to take account of the new "monobook" skin. No unwatch link in the sidebar anymore.
2008-02-18 07:25:35 +00:00
Brion Vibber
8e476b31cc * (bug 12935, 12981) Fully-qualify archive URLs in delete, revert messages
Replaced a bunch of instances of 'if-this-is-not-fully-qualified-prepend-$wgServer' with a function, wfExpandUrl()
2008-02-13 05:59:14 +00:00
Aaron Schulz
89c41b1b63 A file should be at $time 2008-02-04 08:18:55 +00:00
Aaron Schulz
5b5ed9a986 Partial revert: invalid placeholder 2008-02-03 08:10:05 +00:00
Aaron Schulz
3b34a1ce15 Add time parameter here 2008-02-03 07:23:25 +00:00
Brion Vibber
492d502295 Put the suppress & restore warnings calls *around* parse_url() rather than around an empty space after it. :)
This avoids PHP warning notices when given not-quite-valid input, such as "http://en.wikipedia.org{{localurl:Talk:Wet_Tropics_of_Queensland/Comments|action=edit}}"
2008-01-30 23:44:26 +00:00
Brion Vibber
61cd5b2313 Replacing a live hack in wfIncrStats:
Add $wgStatsMethod to control how (and whether) to update the stats.
Setting to 'cache' (the default) gives the previous behavior of updating in $wgMemc.
Setting to 'udp' sends a line to the UDP profiling host.
Setting to false or 'disabled' or whatever will disable it.
2008-01-29 00:49:06 +00:00
Siebrand Mazeland
8538fc7962 Revert 'oops' 2008-01-19 21:33:50 +00:00
Siebrand Mazeland
eef8e79f01 Localisation updates from Betawiki (2008-01-19 20:50 CET) 2008-01-19 21:24:12 +00:00
Tim Starling
6bfc746e83 * Eliminated message mode (OT_MSG), using OT_PREPROCESS instead. As proposed on wikitech-l.
* Fixed #tag behaviour in preprocess()
* Fixed #tag quote stripping regex
* Made MessageCache::getMessage() never transform its result, that is now left up to the caller. 
* A few other minor changes
2008-01-19 09:03:45 +00:00
Niklas Laxström
b8aab1c088 2 PHP Notice: Undefined offset: 1 in /var/www/w/includes/GlobalFunctions.php on line 1986 2007-12-05 22:07:08 +00:00
Aryeh Gregor
b1935023d4 Make sure to normalize invalid character references. 2007-11-30 18:47:35 +00:00
Aryeh Gregor
e6bc73f6b5 Fix regression from r26893: a few messages that formerly accepted character entities such as &nbsp; no longer did. This broke existing behavior with no effective workaround, since a very common browser (Firefox < 3) cannot save forms containing literal nbsp (Mozilla bug 218277). The messages (which are link text) now allow entities, but not wikitext or other HTML, via a new 'escapenoentities' option for wfMsgExt. 2007-11-30 18:03:29 +00:00
Tim Starling
b959147e0a LF at file end 2007-11-27 05:34:36 +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
Brion Vibber
909e5b363c * Changed signature-ip to signature-anon
* Removed the hardcoding of the link parameter ($1), let the message control the destination.
* Removed the hardcoded talk page links. They can be easily re-added if desired, though, and added per-wiki.
* Removed the $3 and $4 parameters
* Fixed wfEscapeWikiText() to do "]" as well as "[", so sigs with "]" won't break links
* Updated a parser test case for the escaping change
2007-11-15 03:30:03 +00:00
Domas Mituzas
653ab71610 remove use of anon function in stacktrace parsing, repeated calls are far more friendly for proper functions 2007-11-14 22:11:33 +00:00
Niklas Laxström
b20844540e * (bug 11452) wfMsgExt uses sometimes wrong language object for parsing magic words when called with options ''parsemag'' or ''content''. 2007-10-22 19:33:46 +00:00
Niklas Laxström
893ee310c6 * Removing some globals that seem unused 2007-10-13 11:40:42 +00:00
Niklas Laxström
a0d40e108b * Support plural in undeleted{revisions,revisions-files,files} 2007-10-12 15:33:58 +00:00
Brion Vibber
1a45c87c47 Make wfIniGetBool() more accurate:
* accepts 'yes' as well as 'on' and 'true'
* accepts negative and non-1 integers, as well as garbage characters after the number (as C atoi() function for nonzero result)
2007-09-26 17:59:29 +00:00
Brion Vibber
983e2d0ff7 * (bug 11355) Fix false positives in Safe Mode and other config detection
when boolean settings are disabled with 'Off' via php_admin_value/php_value
2007-09-17 19:44:15 +00:00
Brion Vibber
8e73228dc6 * (bug 9252) Fix for tidy funkiness when using editintro mode 2007-09-11 18:22:37 +00:00
Rob Church
2fe74340d8 (bug 8737) Fix warnings caused by incorrect use of /dev/null when piping process error output under Windows 2007-08-15 21:44:58 +00:00
Tim Starling
164bb322f2 Basic integrated audio/video support, with Ogg implementation.
* JavaScript video player based loosely on Greg Maxwell's player
* Image page text snippet customisation
* Abstraction of transform parameters in the parser. Introduced Linker::makeImageLink2().
* Made canRender(), mustRender() depend on file, not just on handler. Moved width=0, height=0 checking to ImageHandler::canRender(), since audio streams have width=height=0 but should be rendered.

Also:
* Automatic upgrade for oldimage rows on image page view, allows media handler selection based on oi_*_mime
* oi_*_mime unconditionally referenced, REQUIRES SCHEMA UPGRADE
* Don't destroy file info for missing files on upgrade
* Simple, centralised extension message file handling
* Made MessageCache::loadAllMessages non-static, optimised for repeated-call case due to abuse in User.php
* Support for lightweight parser output hooks, with callback whitelist for security
* Moved Linker::formatSize() to Language, to join the new formatTimePeriod() and formatBitrate()
* Introduced MagicWordArray, regex capture trick requires that magic word IDs DO NOT CONTAIN HYPHENS.
2007-08-15 10:50:09 +00:00
Tim Starling
bfcb3e32ef debugging code accidentally left in 2007-07-23 17:18:32 +00:00
Tim Starling
ca76169bbe * Introduced FileRepoStatus -- result class for file repo operations.
* Ported file delete/restore to the filerepo framework. Some user-visible changes in error reporting. 
* $wgSaveDeletedFiles has been removed, the feature is now enabled unconditionally. Added a "deleted" directory for the default location, protected by a .htaccess file and the practical obscurity of content hashes.
* Fixed bug 2735: "Preview" shown in title bar for action=submit on special pages
* Removed "restore" links from the deletion log embedded in Special:Undelete
* Added img_sha1/oi_sha1 fields, preserved through upload, delete and restore
* Referenced the new oi_metadata etc. fields to preserve metadata across upload and delete/restore.
2007-07-22 14:45:12 +00:00
Rob Church
1ec212b612 (bug 10520) Preview licences during upload via AJAX 2007-07-14 22:06:01 +00:00
Brion Vibber
ba17e8b8c5 Add support for $suffix parameter on wfBasename() clone of basename(), for completeness' sake 2007-07-13 18:08:41 +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
Rob Church
69e2f161c1 ...and remove some un-needed lines 2007-07-06 04:25:06 +00:00
Rob Church
b5cf6fe9a3 Use SiteStats accessors so we benefit from caching, etc. in wfQueriesMustScale() - per Simetrical 2007-07-06 04:23:33 +00:00
Rob Church
fe74d822da Document and clean up wfQueriesMustScale(); less verbose comments inside the function, more function documentation, please -- and don't use an if statement when it's not needed 2007-07-06 03:55:36 +00:00
Rob Church
dcd57754d9 * Introduce wfScript() wrapper around script path generation
* Honour script extension in ApiFormatBase
* Fix up some uses of short open tags, which are discouraged, in ApiFormatBase
2007-07-06 03:41:04 +00:00
Rob Church
1e1f1b3dc4 Coding conventions - spacing 2007-07-05 18:34:31 +00:00