Commit graph

82 commits

Author SHA1 Message Date
Sam Reed
10ecfeb03b Various unused variables, add some braces
Explicitally define some variables used in hook type calls
2010-11-10 19:49:04 +00:00
Chad Horohoe
c7f9eaf626 Postgres updater stuff, needs review
* Move setup_database() from DatabasePostgres to PostgresInstaller
** Add install step after interwiki for the COMMIT
** Put the table creation test (should we abstract this?) in setupDatabase()
** The leftover stuff in initial_setup() also belongs in setupDatabase(), I think?
2010-11-10 16:06:16 +00:00
Platonides
4147b8a5bb dieout() function already takes into account if a </ul> is needed. 2010-11-05 23:36:30 +00:00
Sam Reed
d189aaee05 (bug 24853) Kill failFunction - Fixed! :D 2010-10-24 21:27:33 +00:00
Sam Reed
16cded8b32 Start of bug 24853, killing off 'functional' parts of failfunction code. Seems when the constructors start getting changed, it starts borking. Using this as a point of reversion/stashing 2010-10-24 20:48:48 +00:00
Sam Reed
6b3b915353 Big attack on unused variables... 2010-10-14 20:53:04 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Chad Horohoe
e4189f5920 Fix a bunch of '? true : false' instances 2010-09-27 14:24:13 +00:00
Platonides
945fb1293d Unused globals. 2010-09-17 15:07:07 +00:00
Chad Horohoe
14aaf4d1fe Followup r65542, rm some unused vars 2010-09-15 07:41:03 +00:00
Jack Phoenix
0443990ccd coding style tweaks 2010-09-05 18:35:34 +00:00
Jack Phoenix
1252d00372 trim trailing spaces 2010-09-05 18:00:33 +00:00
Aryeh Gregor
338ae40072 Suggest running update.php on database error
This is a pretty frequently asked question in #mediawiki -- most
database errors are probably due to not running update.php.
2010-09-05 17:40:47 +00:00
Sam Reed
b14e26cb49 Followup r72234, pass $this->mConn instead of null 2010-09-03 15:53:08 +00:00
Sam Reed
66a28589b1 Fixup some method calls with missing parameters 2010-09-02 21:54:53 +00:00
Chad Horohoe
9e6c7cc8ef Get rid of PHP4-style constructors 2010-08-30 16:52:51 +00:00
Chad Horohoe
e0cb9ef9b6 Make getSoftwareLink() static so I can use it without instantiating (and opening) a bunch of databases I probably can't support. Can't have an abstract parent now, so throw an exception for anyone who writes a child class without bothering to implement it. All of this to add some helpful text links in an infobox in the installer :) 2010-08-22 20:55:07 +00:00
Sam Reed
85af1b0901 Revert r71250 r71251 r71252 r71253
Know what the problem is, roughly, can't fix atm, so not leaving phase3 broken
2010-08-18 14:15:32 +00:00
Sam Reed
96114da761 Fix wrong removal in r71250 2010-08-18 13:50:07 +00:00
Sam Reed
9ea1f1d388 Kill some crappy "failFunction" stuff, marked as old in r14625 2010-08-18 13:38:42 +00:00
Chad Horohoe
4c74490bb8 Big commit: kill almost every freeResult() call as useless 2010-08-08 12:27:48 +00:00
Chad Horohoe
d6c112d38d Remove dupe implementations of begin/commit from Postgres. Also included checks for $mTrxLevel on commit/rollback, based on patch on bug 24629 2010-08-06 12:54:39 +00:00
Greg Sabino Mullane
ee2b60ca60 Correct casing for PL/pgSQL 2010-08-04 11:58:35 +00:00
Alexandre Emsenhuber
c13687bdb6 Standardisation of file headers 2010-08-01 21:13:44 +00:00
Platonides
df0793dc59 Followup r69909. This.. is.. no.. longer... a global! 2010-07-26 20:55:44 +00:00
Sam Reed
24bb8304f2 Followup r69921
PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting T_PAAMAYIM_NEKUDOTAYIM in includes/db/DatabasePostgres.php on line 1157
2010-07-26 06:57:58 +00:00
Platonides
36d86e7ae9 Kill $wgDBversion 2010-07-25 22:09:34 +00:00
Platonides
77fa1cdc99 Kill $wgDBsuperuser 2010-07-25 21:02:42 +00:00
Sam Reed
e8a5082c22 Fix spaces from r69814
Grrrr
2010-07-23 20:58:09 +00:00
Sam Reed
ffa27f26f1 Add missing $wgDBname global 2010-07-23 20:41:53 +00:00
Max Semenik
775adbf329 Got rid of remaining usages of immediateBegin()/immediateCommit(), marked these functions with wfDeprecated() 2010-07-05 19:47:46 +00:00
Max Semenik
75d41fe3b6 Refactored Database*::getLag(): moved the default implementation to MySQL, replaced it with a proper dummy, deleted stub implementations from other classes. This adds fake lag support to all databases. 2010-07-02 13:17:28 +00:00
Max Semenik
67ebe72ade * Replaced the mess of every database class implementing filedExists() is its own way with one simple function in base class. Verified to work on MySQL, Postgres and SQLite.
* Fixed fieldInfo() on Postgres not using tableName() and thus failing for table user, for example.
* Made fieldInfo() on MySQL return false instead of throwing a query error if table does not exist. This is consistent with other databases' behaviour.
2010-07-02 10:01:09 +00:00
Max Semenik
b1fc491ae0 Fixed yet another borkage from r67707 2010-06-29 09:20:09 +00:00
Max Semenik
83b88a5f3b Fixed a fatal installer failure on PG introduced in r67707. 1.16 is unaffected 2010-06-29 09:11:37 +00:00
Chad Horohoe
44229b50e6 Fixed a bunch of silly instances of [^!=]==\s*(true|false) 2010-06-09 11:44:05 +00:00
Platonides
62a615c6c0 Actually check sourceFile for failure, showing the error message in the install.
See report on http://permalink.gmane.org/gmane.org.wikimedia.mediawiki/33902
Fixed several tag nesting problems from setup_database().
Make sourceFile() always use text errors in the installer. It can't handle 
exceptions properly (introduced in r36211). But they are appropiate for update.php
thus the ugly branches.
The installer now always handles sourceFile() errors.
2010-04-29 21:49:58 +00:00
Chad Horohoe
b9648ffd01 Kill last vestiges of mediawiki_version. Nobody actually uses it anymore, it just gets silently updated (and only for Postgres at that) 2010-04-26 13:46:04 +00:00
Greg Sabino Mullane
0e5f0e043b Support looking up deferred constraint information. 2010-03-22 18:14:25 +00:00
OverlordQ
76e2c017c4 Force new connection to database, fixes bug 20475, might have unforseen consequences 2010-02-05 05:40:50 +00:00
Tim Starling
fd3794c5bc For r60757: implement Database::getType() explicitly in each subclass, to make Roan happy. 2010-01-08 00:31:24 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Tim Starling
c5fc589257 Replaced all instances of <<<END (which breaks vim syntax highlighting), with a type-specific end token. For HTML and SQL, this causes vim to highlight the embedded text with the HTML or SQL file type plugins respectively, which is very neat. 2009-12-07 08:51:52 +00:00
Greg Sabino Mullane
bc1196170d Typo. 2009-11-27 15:19:05 +00:00
Max Semenik
1e3b2b8d5d Abstracted some parts of database interaction for parser tests, needs verification on Postgres. SQLite still doesn't work, though fails much later 2009-11-06 10:17:44 +00:00
OverlordQ
d46dd02c81 (bug 18909) Add missing INSERT SELECT wrapper for Postgres 2009-10-27 05:33:31 +00:00
Alex Z
374b9e4af1 Mostly revert r53358 and r53365 per comments on code review. Change message to just say "Database" and remove the getDBtypeForMsg function (since I can't think of any other use for it) 2009-08-22 20:17:28 +00:00
Chad Horohoe
df296de32e * Move generic return true; various for lock functions to parent, no need to implement this everywhere
* Make LOW PRIORITY optional
* Use sourceFile instead of dbsource
2009-07-29 23:41:16 +00:00
Alex Z
bc1b8182e9 Followup to r53358 - Tweak the function name to be a little clearer as to what it does
Also make it abstract in DatabaseBase so all subclasses have to implement some human readable name 
(also make getSoftwareLink abstract for the same reason) Every current Database class already implements both.
2009-07-16 16:49:09 +00:00
Alex Z
3742d1058d (bug 19590) Database error messages are no longer hardcoded to use "MySQL".
Added a new function DatabaseBase::getDBtype() to get the DB type for messages, updated all subclasses.
Message change needs propagating.
2009-07-16 15:18:57 +00:00