Commit graph

131 commits

Author SHA1 Message Date
Tim Starling
5f3b51db07 moving wfProfileIn() to the start of the function, adding warning suppression like I did in MessageCache.php 2004-10-23 08:21:39 +00:00
Brion Vibber
963901c8dd * Drop a couple instances of wfTimestamp2Unix & reverse for wfTimestamp()
* Make wfTimestampNow() a wrapper on wfTimestamp()
* Add some tests and docstrings
2004-10-19 07:12:15 +00:00
Brion Vibber
2a847aab34 Don't forget to urlencode the data in wfArrayToCGI() 2004-10-19 05:46:14 +00:00
Brion Vibber
005cab63d6 * add a require dependency
* allow do_html_entity_decode() to be called with different charsets during the script lifetime
2004-10-18 09:49:03 +00:00
Wil Mahan
2a03980093 Bug 589: make random selection slightly more random. PHP's
mt_rand() function has a maximum value of 2^31-1, which
is small enough that duplicate values can occur due to the
Birthday paradox, e.g. on the English Wikipedia. To fix
this, add a wfRandom() function that calls mt_rand()
twice to get the desired amount of randomness.
2004-10-11 17:34:39 +00:00
Brion Vibber
33d9c93803 * Remove deprecated wfLocalUrl(), wfLocalUrlE()
* Remove some duplication in wfUtf8Entity(), the guts now moved to UtfNormalUtil.php
* Moved $wgReplacementKeys to a static var
* Some comments and cleanup
2004-10-02 02:55:26 +00:00
Zheng Zhu
a8a113d22d fix fallback in wfMsgReal() as well 2004-09-26 00:00:52 +00:00
Zheng Zhu
ada3997051 first attempt to support multiple language variants in the MediaWiki: namespace. 2004-09-25 04:15:47 +00:00
Zheng Zhu
32c223e2a1 removed caching of UI messages; it does not make sense, after all. 2004-09-25 02:23:04 +00:00
Zheng Zhu
19004a27e8 new wfMsg* functions to use the wgContLang object for translating content related messages 2004-09-22 03:49:23 +00:00
Zheng Zhu
fa794e9f0e corrected testing the existence of an object 2004-09-21 00:48:45 +00:00
Jens Frank
744ab639f7 Cleaner handling of NoConvert, for variable number of arguments 2004-09-18 16:38:55 +00:00
Jens Frank
4e19e889aa Removed hardcodes for Zh-conversion 2004-09-17 05:58:28 +00:00
Zheng Zhu
f1cc605133 Do Simplified/Traditional Chinese conversion in wfMsgReal() when the language code is zh 2004-09-17 04:47:01 +00:00
Arne Heizmann
6f55251951 change all occurrences of "Mediawiki" to "MediaWiki". 2004-09-04 00:05:30 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
b6024820fc More comments ! 2004-09-03 17:13:55 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Brion Vibber
d2246bff7c Adjust UTF-8 generator for correctness. (Upper private use area, probably affects nothing.) 2004-08-29 02:04:01 +00:00
Tim Starling
0f9c5b24fd Abstracted site name in LanguageFi.php. This required the implementation of general handling for inflected languages, in particular the {{grammar:}} tag 2004-08-27 14:55:41 +00:00
Brion Vibber
35c74af604 Start migrating wfCheckLimits to WebRequest::getLimitOffset() 2004-08-23 02:19:02 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Tim Starling
595b892e25 Hey! Stop breaking my functions! 2004-08-21 14:14:58 +00:00
Brion Vibber
41c8b7bf72 Antiglobalization!
* Remove some unused and some useless functions from GlobalSettings.php
* wfEscapeHTML() replaced with PHP built-in htmlspecialchars().
* Moved some functions into Parser.php and Image.php
2004-08-13 15:55:59 +00:00
Tim Starling
631e737c7f added {{ to wfEscapeWikiText, so that the deletion log looks nicer (requested on #wikipedia) 2004-08-12 01:27:31 +00:00
Arne Heizmann
b28ab61f58 With &debugmsg=1, PHP output a warning because the link trail no longer
constituted a valid regular expression; fix that
2004-08-10 22:48:02 +00:00
Arne Heizmann
57fae72421 If &debugmsg=1 is passed as part of the request parameters, display all
the message keys instead of the actual messages.  I think this will be
very useful to sysops trying to find out what message in the MediaWiki
namespace to edit.  I hope this does not incur too much of a server
performance degradation, since this function is used pretty frequently.
2004-08-10 20:17:55 +00:00
Arne Heizmann
63a52404cb expand comment 2004-08-10 16:51:26 +00:00
Domas Mituzas
5af42946aa Add internal timestamp wrapper wfTimestamp($outputtype,$timestamp);
Obsoletes: wfTimestamp2Unix, wfUnix2Timestamp, wfTimestampNow;
Autodetects database, mediawiki and unix timestamps

to be done: inverted timestamp support
2004-08-10 08:28:43 +00:00
Brion Vibber
a55d07c1ef Suppress notices 2004-08-08 09:39:16 +00:00
Arne Heizmann
0b99c990f9 remove commented-out code. We have CVS for archiving it 2004-08-04 00:28:56 +00:00
Magnus Manske
6cd83364ec bug 964201 fix 2004-08-03 20:01:52 +00:00
Brion Vibber
b2ce8e4306 Fix typo in reference to sql file that needs to be run 2004-08-02 04:58:54 +00:00
Tim Starling
1773cd1e76 * Introducing bit field for database parameters
** Database constructor calling sequence, and Database::newFromParams()
** Including flags in the server initialisation structs
** Support for setting appropriate flags from legacy globals in Setup.php
** Moved some defines to Define.php so that they can be used in LocalSettings.php, most importantly the bit field constants

* Changes related to post-parse link colouring
** Turn the link cache back on when using it for updating the links table
** No longer need to call preFill() on page view

* Better synchronisation of slave servers
** Rearranged getConnection()
** System for beginning and committing transactions when multiple connections are open
** wfAbruptExit() commits transactions, wfErrorExit() does not. Various functions changed to use wfErrorAbort()

* Allowed reporting of database errors during deferred updates by moving them above output()
2004-07-24 07:24:04 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Tim Starling
3c4d38faee Removed arbitrary change in timestamp formats between MySQL and PostgreSQL, moved global functions to GlobalFunctions 2004-06-29 12:23:59 +00:00
Tim Starling
524d56a6f1 DB error log 2004-06-29 07:09:00 +00:00
Tim Starling
05703f122b Nicer looking errors in command line mode 2004-06-26 03:28:58 +00:00
Brion Vibber
d66d9bd492 Fix for the is_a() reimplementation on old PHP versions. I swear I thought
this had been checked in ages ago...
2004-06-24 05:52:27 +00:00
Tim Starling
5cc5b123cd fixed bug for PHP <4.3.0 2004-06-14 08:58:10 +00:00
Antoine Musso
ae8a5e31ab fix isWindows to wfIsWindows. 2004-06-12 21:32:18 +00:00
Tim Starling
49749f3091 wfSetRef doesn't work, making isWindows() function which I was going to use somewhere else but decided against it 2004-06-12 06:05:02 +00:00
Antoine Musso
e73f3d2a28 replace several double quotes by single quotes. 2004-06-08 20:06:01 +00:00
Tim Starling
727d419e7e Support for database profiling, profiling bracket in ParserCache.php 2004-05-28 05:45:13 +00:00
Gabriel Wicke
018a2eead0 use ?, not \& for top-level wikis 2004-05-17 20:04:50 +00:00
Tim Starling
98f45933ed bug fix in wfUtf8ToHTML 2004-05-15 14:03:00 +00:00
Tim Starling
f8bbc61b42 Various board vote enhancements, moving to the BoardVote directory 2004-05-15 10:36:59 +00:00
Tim Starling
e3676a470c Introducing special page modular extensions, making the board vote special page the first of these.
* Moving common special page handling to SpecialPage.php
* Special page lists in the language classes are obsolete, replaced by the list in SpecialPage.php
* Special:Specialpages uses the standard page titles wfMsg(pagename) instead of the description list previously contained in the $wgSpecialPagesEn arrays
* Ability to add custom messages to the MessageCache. Overridable by the MediaWiki namespace.
* Moving board vote functionality from includes/SpecialBoardvote.php to extensions/BoardVote.php
2004-05-15 03:36:39 +00:00
Brion Vibber
33f1e77c11 PHP 4.1.2 compatibility fixes (based on patch submission by Asheesh Laroia)
Also, urlencode anchor names for non-ascii compatibility. This is the
recommendation of HTML 4.01 standard in B.2.1, as far as I can tell.
Works in UTF-8 at least for IE6/win, Firefox, Safari.
2004-05-10 01:54:56 +00:00