Commit graph

62 commits

Author SHA1 Message Date
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
Domas Mituzas
31e4c31bd4 allow getField, selectField and select to have empty conditions and table names. 2004-08-19 13:02:01 +00:00
Domas Mituzas
8aa6ebc2da Add Database*::timestamp(), using wfTimestamp() 2004-08-10 11:12:18 +00:00
Tim Starling
045d9a3b02 marking error suppression operators so that they can easily be removed with a search and replace 2004-08-07 03:41:50 +00:00
Brion Vibber
eda444e217 Wrap Database::setTimer() in a check for existence of mysql_thread_id()
function which was added in 4.3.0. If it's not available, don't set up
the thread killer.
2004-08-06 19:07:55 +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
8fd8374c34 fixed bug with masterPosWait() 2004-07-23 12:36:22 +00:00
Jens Frank
fe15e23107 Fix Userlogin 2004-07-19 06:35:56 +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
Domas Mituzas
a5a06ca36f add Database->limitResult($limit,$offset) instead of old wfLimitResult. Allows several DB classes to be loaded concurrently. 2004-07-15 14:50:22 +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
fbc9303fbf Log function name 2004-07-10 01:07:30 +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
Tim Starling
0bc71915ec Check for missing mysql functions, give nice error message if they are missing rather than a blank page 2004-06-25 04:32:45 +00:00
Tim Starling
6c5254e2db allowing calls to getArray with no conditions 2004-06-21 07:31:41 +00:00
Tim Starling
b5ef8d221b Bringing the load balancer to the main branch. Still doesn't do much. I needed a DB connection cache for my Article.php alterations, which LoadBalancer provides. 2004-06-15 15:00:54 +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
Brion Vibber
e2ee87c6e7 On emergency abort check if headers have already been sent to avoid useless warnings at that point. 2004-06-12 03:13:46 +00:00
Domas Mituzas
212c3afcb2 add wfLimitResult, for LIMIT/OFFSET compatibilities 2004-06-11 14:32:53 +00:00
Domas Mituzas
83a3aa9f8f added wfFetchRow() besides wfFetchObject. Used by objectcache code 2004-06-10 13:02:27 +00:00
Antoine Musso
52eedffd62 dont require FulltextStoplist on mysql4 databases (saves some memory) 2004-06-07 23:51:48 +00:00
Jerome Jamnicky
cf5da16687 SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
SHOW INDEX should work for 3.x and up:
http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
2004-05-24 22:24:49 +00:00
Tim Starling
de13435a76 fixed database error handling 2004-05-23 05:32:20 +00:00
Tim Starling
53a43db6a8 fixed bug in tableExists() 2004-05-23 03:38:25 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Jerome Jamnicky
315be130a5 stop newFromParams() ignoring the $bufferResults param 2004-04-16 03:26:13 +00:00
Brion Vibber
f3be3bfbe6 Don't use the connection ID in error checks. If the connection itself fails, this just spits out extra error messages and is useless. 2004-04-10 09:45:00 +00:00
Brion Vibber
3d2a067e8c HTML tweaks inching towards XHTML-friendly output. To test:
$wgMimeType = "text/xml";
	$wgDocType = "-//W3C//DTD XHTML 1.0 Transitional//EN";
	$wgDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";

Mozilla will spit out angry erorrs at all the well-formedness errors.
2004-04-03 10:01:08 +00:00
Brion Vibber
68b801e987 mysql_list_tables() is deprecated; switch to more elegant solution used
in REL1_2 branch.
2004-03-24 07:49:50 +00:00
Tim Starling
bdcc49b3b6 new function updateArray(), fixed bug which caused database messages to be ignored 2004-03-23 10:13:59 +00:00
Tim Starling
8eebcbc3a0 extra debugging info 2004-03-20 14:07:56 +00:00