Commit graph

316 commits

Author SHA1 Message Date
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Greg Sabino Mullane
ef047e87e2 Add Postgres timestamp stuff, from the patch at bug 6632 by Robert Treat. 2006-07-18 01:40:38 +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
Niklas Laxström
fa9f340ad0 * Added RFC to list of strings to escape 2006-07-08 13:38:18 +00:00
Brion Vibber
000fc1fbf5 * (bug 6566) Improve input validation on timestamp conversion
$ matches trailing newline without D set. gmdate whines more about the value passed to it, so for Unix-timestamp-y things it would dump out a notice. Added D to regexes to be a little more anal about valid input.
2006-07-06 17:28:57 +00:00
Tim Starling
fb7421206e Made wfMkdirParents() faster and more robust 2006-07-04 14:08:27 +00:00
Tim Starling
2ff288720c Various performance and initialisation issues:
* Made autoloader work for unserialize()
* Made XmlFunctions.php and HttpFunctions.php autoloadable modules, via Http:: and Xml::
* Made Image class autoloadable, global functions moved to ImageFunctions.php where they can be loaded on every invocation.
* Removed some unnecessary require_once() calls
* Deferred $wgValidSkinNames initialisation
* Fixed a couple of silly construct/initialise splits. My idea from C++ experience, bad practice in PHP.
* Deferred skin initialisation in ParserOptions
* Removed $wgMwRedir during an attempt to make MagicWord autoloadable. Didn't complete that, but removing the global is still the right direction.
2006-07-02 15:57:59 +00:00
Rob Church
823a1e9c48 * (bug 6484) Don't do message transformations when preloading messages for editing 2006-06-29 00:18:30 +00:00
Tim Starling
adaf195148 Defer initialisation of the special page list, allow autoloading of the SpecialPage class. SpecialPage.php is not loaded for ordinary page views. Implemented some interfaces which allow special pages to do the same thing, although backwards compatibility is maintained. Old special page extensions will load SpecialPage during initialisation, so all extensions will have to be ported to get the full performance benefit. 2006-06-25 08:38:17 +00:00
Tim Starling
864083ffd2 Stop using memory_limit as a virtual memory limit for shell processes. Use a separate setting instead. 2006-06-17 10:21:55 +00:00
Brion Vibber
8a42f0b1a8 (bug 2099) Deleted files can now be archived and undeleted, if you set up an appropriate non-web-accessible directory.
Set $wgSaveDeletedFiles on and an appropriate directory path in $wgFileStore['deleted']['directory']
2006-06-16 01:16:45 +00:00
Tim Starling
1e987d7c19 Made wfDebugDieBacktrace() throw an exception: roughly backwards-compatible behaviour for the benefit of the extensions which use this function. Marked wfAbruptExit() and wfErrorExit() obsolete, they're only called from one extension as far as I know (gis), and nowhere from within the core. 2006-06-08 07:05:57 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Tim Starling
ec377a67c4 default argument 2006-06-06 23:16:32 +00:00
Domas Mituzas
effe3dda4c AutoLoad UpdateClasses: SiteStatsUpdate, LinksUpdate, SearchUpdate, SquidUpdate 2006-06-06 10:15:57 +00:00
Rob Church
710f298b4d Add hooks to manipulate the sitenotice/anonnotice:
* SiteNoticeBefore
* SiteNoticeAfter
2006-06-04 16:55:19 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Niklas Laxström
bd24bf4fb4 * Reverting BiDi changes because there were some problems left 2006-05-31 20:39:14 +00:00
Niklas Laxström
558436ae2e * Correct direction for special pages 2006-05-31 19:08:17 +00:00
Niklas Laxström
c59b619ff8 * (bug 6100) BiDi: different directionality for user interface and wiki content (core parts of the patch) 2006-05-31 15:19:40 +00:00
Brion Vibber
469cc8686d Fix microtime breakage 2006-05-29 05:29:27 +00:00
Domas Mituzas
9aa7ac0d2c microtime(true) instead of slow php4 hacks 2006-05-28 21:25:03 +00:00
Brion Vibber
f6a581a9b9 Had to revert the changes in r14424 / r14427 due to massive side-effect breakage on zh.wikipedia.org:
* Move parameter replacement before brace transformations in most of the
  wfMsg() family (except for wfMsgHtml). This allows things like {{plural:}},
  {{urlencode:}}, and {{fullurl:}} to be used in most cases correctly.
  The content or UI language will be used accordingly for (forContent)?.
* Work around glitch with the above in {{int:}}; skip redundant transformations,
  allow the including parser to do it.
* Fix {{int:}} to use content language, so it won't break caches and links
  tables and randomly include data from the wrong language.

Uncertain what the cause is of the breakage, I have a hard time duplicating it
and it looks massively wrong (should not be possible). Failure on Parser.php
line 590, claims var not array, but the check two lines above ensures that
it is first...
2006-05-28 09:31:04 +00:00
Brion Vibber
8637bac8ca Move parameter replacement before brace transformations in most of the wfMsg() family (except for wfMsgHtml). This allows things like {{plural:}}, {{urlencode:}}, and {{fullurl:}} to be used in most cases correctly. The content or UI language will be used accordingly for (forContent)?. 2006-05-27 23:25:32 +00:00
Brion Vibber
cf91714d58 * wfShellexec() now accepts an optional parameter to receive the exit code
* Failed, but not zero-length, thumbnail renderings are now removed. Should help clean up when rsvg fails in weird ways.
2006-05-26 02:41:20 +00:00
Brion Vibber
cb504bfe41 * wfHostname() function for consistent server hostname use in debug messages
* Send thumbnailing error messages to 'thumbnail' log group
2006-05-26 01:03:34 +00:00
Rob Church
3d3ee93b12 Better safe than sorry 2006-05-07 18:53:15 +00:00
Rob Church
b41b3abadf Fix foul-up with <nowiki> et al., wfMsgExt and all sorts of other exciting fun. 2006-05-07 18:51:26 +00:00
Niklas Laxström
8b403ede36 * (bug 5805) message nbytes can now use {{plural:}}
* Cleaned up Special:Imagelist a bit
2006-05-05 12:21:12 +00:00
Niklas Laxström
6136b2fee4 * Bidi-aid on list pages
* Some lists with bidi titles should be more readable now
2006-05-01 21:17:31 +00:00
Antoine Musso
473cd5cbcc unused variables as per #3692 2006-05-01 10:53:59 +00:00
Antoine Musso
2301a8d9da Fix bug in wfMsgExt under PHP 5.1.2 2006-04-29 13:55:38 +00:00
Niklas Laxström
e30e9bdd12 * Parser can now know that it is parsing an interface message
* (bug 4737) MediaWiki:Viewcount supports {{PLURAL}} now
2006-04-29 13:15:19 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Niklas Laxström
8b73122a0d Yet another wfMsg, which includes hack to get inline wikitext blocks 2006-04-14 16:59:59 +00:00
Rob Church
d71e043fc7 (bug 5475) New pages feeds ignore "limit" argument 2006-04-13 20:01:48 +00:00
Brion Vibber
818835185a Remove live profiling hack that domas accidentally committed 2006-04-12 00:04:38 +00:00
Domas Mituzas
742198d735 could not resist, provide more accuracy on elapsed ;-) 2006-04-08 20:29:21 +00:00
Brion Vibber
a5d6a7db89 * Additional protections against HTML breakage in table parsing
Avoid splitting table cells on "||" appearing in HTML tag attributes.
Bad tag nesting is still possible, but this should keep things from
being split unexpectedly in the middle of an element, and might
avoid some potential injection points.
See http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html
2006-04-03 08:36:17 +00:00
Brion Vibber
5a197f8b61 Live fix: debug shell-outs 2006-04-02 03:58:17 +00:00
Jens Frank
c938e3fc8f Useless with modern PHP. Users should update their PHP. Brion says I should remove it. 2006-03-27 19:59:19 +00:00
Brion Vibber
103be1dda1 * Further work on rev_deleted; changed to a bitfield with several data-hiding
options. Not yet ready for production use; Special:Revisiondelete is
  incomplete, and the flags are not preserved across page deletion/undeletion.
  To try it; add the 'deleterevision' permission to a privileged group.
Also split some functions from GlobalFunctions to XmlFunctions.php, added
some convenience functions for building form controls, some more Linker
conveniences for formatting various types of standard link clusters.
2006-03-16 19:04:25 +00:00
Lupin
c7408b9223 trailing whitespace removal 2006-03-11 17:13:49 +00:00
Tim Starling
12063aa443 fixed whitespace 2006-03-07 02:08:24 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +00:00
Rob Church
1a5a8726a1 (bug 5150 and related) Fix missing ID attribute in HTML namespace selector 2006-03-03 07:27:38 +00:00
Tim Starling
e1ff7bf588 Maintain backwards-compatibility in $wgUrlProtocols, so that wikis don't get transformed into a sea of external links when upgrading from 1.5 to 1.6:
http://jan.moesen.nu/media/images/screenshots/2006/20060228-mediawiki-1.6a-fubar.png
2006-02-28 12:33:40 +00:00
Tim Starling
2fc4490049 Proper windows escaping in wfEscapeShellArg() 2006-02-06 23:50:45 +00:00
Tim Starling
df09b7b2cc make wfShellExec() work on windows a bit better 2006-02-06 05:14:58 +00:00