Commit graph

94 commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason
011c75c483 * Changed makeSelectOptions() so that its paramater must always be an array
* Documented makeSelectOptions()
* Changed select() to always pass makeSelectOption() an array
* Cleaned up delete(), addQuotes() and useIndexClause()
2005-05-03 07:47:08 +00:00
Brion Vibber
aed4a04076 Clean up e-mail authentication code.
* Add Special:Confirmemail unlisted page for requesting confirmation emails and as the destination
* There is now a confirmation token separate from the login password, which is cleaner and hopefully a lot less confusing.
* Confirmation token expires after 7 days
* Added support functions for nullable timestamp columns: wfTimestampOrNull and Database::timestampOrNull
* userMailer now returns WikiError objects
* Added convenience functions to User for email management, consolidated some checks

There are changes to the user table, so run update.php
2005-04-25 18:38:43 +00:00
Tim Starling
aeab2e64a8 ported live patches 2005-04-25 03:30:24 +00:00
Tim Starling
6c1ccfd02e Made updateSpecialPages.php more robust to database problems 2005-04-24 08:31:12 +00:00
Tim Starling
faabce5662 Automatic reconnect when the connection is lost. This hopefully won't happen much for HTTP queries, since it breaks the transaction model. But it might be useful for maintenance scripts which sleep for long periods. 2005-04-24 07:21:15 +00:00
Tim Starling
cdb3f96ab8 Various live patches ported from REL1_4 2005-04-12 04:03:21 +00:00
Tim Starling
abfd2e7500 ported improved table quoting from 1.4 2005-04-10 18:26:26 +00:00
Tim Starling
c02064779a Add seek method to ResultWrapper 2005-04-03 07:27:25 +00:00
Tim Starling
7597b899d6 Fixed ordering of SQL debug log 2005-03-28 07:56:17 +00:00
Tim Starling
9d4d4b7779 Bought me a horizontal scrollbar, no need for this anymore 2005-03-27 17:09:48 +00:00
Tim Starling
ba9ae79212 Fixed efficiency problem with $wgSiteNotice. Introduced wfSiteNotice(), which allows the script to load it on demand instead of on every invocation 2005-03-27 16:56:11 +00:00
Tim Starling
c5381f1f87 Fixed comment 2005-03-20 14:26:37 +00:00
Brion Vibber
7150b26584 Include function name for SQL statements dumped to debug log 2005-03-18 04:22:05 +00:00
Brion Vibber
0a5bd473fd fix deadlock loop 2005-03-13 06:43:33 +00:00
Jens Frank
9ce0e67162 Allow an array of tables for insertSelect() 2005-01-30 19:34:07 +00:00
Antoine Musso
7e901668b2 fix phpdoc comment 2005-01-27 18:28:30 +00:00
Tim Starling
59717e5161 Merging server feature from REL1_4 2005-01-14 13:03:34 +00:00
Tim Starling
2682b7db86 Fixed problem with missing query errors, noticed in installer but I seem to remember seeing it before 2005-01-14 13:00:17 +00:00
Antoine Musso
991f798587 * Remove some hardcoded 0 instead of NS_MAIN
* Note in define.php that people should NOT change the integer values for NS_* constants
2005-01-11 18:18:16 +00:00
Tim Starling
da7f1649dd Fixing synchronisation bug: can't open a transaction before calling MASTER_POS_WAIT(), because you get consistent reads. Instead, we commit any open transaction, then call doQuery() directly, thereby avoiding re-opening it. 2004-12-22 03:58:25 +00:00
Brion Vibber
64ac6b8e77 Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
2004-12-19 08:00:50 +00:00
Brion Vibber
1fd8260c25 Allow empty array in select() for the where conditions 2004-12-13 03:54:56 +00:00
Tim Starling
6d4ce2a3bd Fixed connection errors yet again, hopefully in a more robust way this time 2004-12-12 04:44:17 +00:00
Evan Prodromou
4b42f18b66 Removed CVS keywords from files, to make merging between branches
easier. Interpolated keywords cause lots of conflicts and headaches at
merge time for older (<1.12.x) CVS versions.
2004-11-29 18:25:30 +00:00
Antoine Musso
46bd449a17 Patch by "Neil Barsema" <neil@barsema.org> :
http://bugzilla.wikipedia.org/show_bug.cgi?id=809

Attempt to load mysql php extension if it is not loaded.
2004-11-09 15:25:40 +00:00
Brion Vibber
a263b7c9f0 Let Database do the quoting of the 'group' table, so that prefixed tables will work. 2004-10-24 22:02:02 +00:00
Tim Starling
412eda0517 Correcting bugs due to double-prefixing table names. Removing obsolete Database member functions. Adding comments to Database.php 2004-10-24 07:10:33 +00:00
Brion Vibber
881b36f316 * Add support for prepared statements. This should be safer than dumping variables into raw SQL and more flexible than the array-based wrapper functions
* Add some quick PHPUnit tests for Database::fillPrepared()
2004-10-18 07:25:56 +00:00
Brion Vibber
53856406a6 Clean up a few scriptlets 2004-10-14 02:13:12 +00:00
Brion Vibber
df096a1e19 Fix brainfart that broke options on insertArray() 2004-10-10 22:40:58 +00:00
Domas Mituzas
d54c3602df Database::makeList() now checks in LIST_AND mode if supplied list item
value is an array, and uses IN (x,y,...). This extends select() syntax
as well, as arrays can be specified for conditions.
2004-10-04 19:43:49 +00:00
Brion Vibber
045e51de38 Extend select() wrapper to allow specifying multiple tables as an array 2004-10-03 05:59:45 +00:00
Zheng Zhu
ca7619c81c made some more wfMsg() to wfMsgForContent changes 2004-09-22 04:09:31 +00:00
Domas Mituzas
98ef9682ae return status of selectdb 2004-09-15 06:02:16 +00:00
Tim Starling
fa93b832d7 documentation: noting that a function is obsolete 2004-09-11 09:44:15 +00:00
Domas Mituzas
ed7dc234b2 add aggregateValue(), as some databases require different aggregated value specifications in HAVING and ORDER clauses 2004-09-09 12:04:39 +00:00
Brion Vibber
52b1b6e9c3 Add Database::conditional() function to build IF() or CASE statements
depending on the RDBMS used. Allowed NULL in some RC fields on PostgreSQL.

Fix for bug 407: rebuildrecentchanges.php fails on PostgreSQL
http://bugzilla.wikipedia.org/show_bug.cgi?id=407
2004-09-09 00:02:38 +00:00
Brion Vibber
24619e4c66 Add Database::getSoftwareLink() and Database::getServerVersion(), and use
those in Special:Version.

Fixes bug 388: Special:Version shows MySQL version when using PostgreSQL
http://bugzilla.wikipedia.org/show_bug.cgi?id=388
2004-09-08 20:36:41 +00:00
Brion Vibber
cbfdfb60dd Use array_keys() rather than array_flip(), which fails for NULL values. 2004-09-07 08:25:35 +00:00
Domas Mituzas
2d344ad9a8 extend makeList so it could include database field names 2004-09-06 08:30:05 +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
b3eb2ce4b3 Comments for phpdocumentor + comments placeholder. 2004-09-03 16:36:46 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Brion Vibber
d867e6d863 ResultWrapper object, so you can pass a result back as a return value without passing along the database object you used too. 2004-09-02 02:43:13 +00:00
Brion Vibber
b8329819cf Quote seemingly numeric values in SQL, as they might
actually be strings which may not convert 1:1 if passed
to MySQL as numbers.

fix for Bug 255: Number articles on Special:Newpages
http://bugzilla.wikipedia.org/show_bug.cgi?id=255
2004-08-31 01:01:44 +00:00
Jens Frank
79303cd93a ENH#59 Provide a (diff) link in Special:Contributions
Does not look up the next old revision for every change but links to pseudo-revision 'prev'.
DifferenceEngine looks up the previous revision if user requests a specific diff.
2004-08-28 23:00:04 +00:00
Erik Moeller
76ea9e6220 rename $wgUserTablePrefix to $wgSharedDB as discussed on #mediawiki 2004-08-28 13:32:14 +00:00
Jens Frank
22525a2771 New global setting: wgUserTablePrefix
set wgUserTablePrefix to the name of the DB where your users
table is for single login. Disabled by default.
If set, the users table will be fetched from another MySQL schema (called
database by MySQL). Can not be on a different MySQL server, though.
2004-08-23 18:49:05 +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
Domas Mituzas
95281cb81e remove bad functions:
wfLimitResult() - replaced by Database::limitResult()
QueryPage::getOrderLimit() - replaced by getOrder() + Database::limitResult()
2004-08-20 10:32:12 +00:00