Commit graph

42 commits

Author SHA1 Message Date
Alexandre Emsenhuber
09bb6975c5 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1615bf268515ed7169e33173cea6ec30402451dc
2012-05-06 07:50:15 +02:00
Jure Kajzer
e42c970e2d * partly fixes two issues exposed by bug 34280
** forcing recreate if creating user
** parent::createTables was setting DB to a wrong setting
2012-02-27 19:01:10 +00:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Sam Reed
856faea6d6 Add documentation
Fix some unused variables, commented some others out
2011-10-18 17:26:09 +00:00
Tim Starling
b37cde66c1 PostgreSQL install fixes:
* Made PG throw a DBQueryError when it gets a query error, instead of DBUnexpectedError. Apparently this mistake goes back to r14625, when exceptions were first introduced. Did it by removing reportQueryError(), the DatabaseBase version works fine.
* Fixed several places where there was an attempt to check for a query error by checking if the result of query() was false. This never worked. Used try/catch instead.
* Made the DBConnectionError messages go on one line so that they don't mess up the formatting in the installer.
* In DatabasePostgres::selectDB(), only disconnect and reconnect if the DB name is actually changing.
* Made DatabasePostgres::schemaExists() less weird and scary.
* Added DatabasePostgres::roleExists() for use by the installer.
* Removed the PostgreSQL-specific hack to make _InstallUser have a default other than "root". Made _InstallUser into a proper DBMS-specific internal variable instead, since every DBMS we support so far needs a different default.
* Removed the $dbName parameters from openConnection/getConnection, and got rid of $this->useAdmin. Implemented a more sophisticated caching scheme instead. Partial revert of r89389 and r81440.
* When connecting as the install user before DB creation, and when testing the web user's credentials, try a few different database names and use whichever one works. 
* Instead of connecting as the web user to create tables, I used SET ROLE. It seems cleaner and more like what the other DBMSes do during installation. "SET ROLE wikiuser" requires the same privileges as "CREATE SCHEMA ... AUTHORIZATION wikiuser", so it's unlikely to break anything.
* In the area of web account creation, fixed various minor logic errors and introduced more informative error messages at the submit stage, pre-install. Show a helpful error message if the web user exists already and the install user can't do the relevant SET ROLE.
* Split schema creation out to a separate install step.
* When creating an account as a non-superuser, add the administrative account to the new account's group. This is necessary to avoid a fatal error during installation (bug 28845).
* Removed code which alters an existing web user to have appropriate search paths and permissions. This may break other apps and is not necessary. As in other DBMSes, If the web user exists, it is the responsibility of the sysadmin to ensure that it has appropriate permissions.
* Rewrote setupPLpgSQL() to use the query builder functions.
2011-06-10 11:32:57 +00:00
Mark A. Hershberger
9be60e5725 forward port r88929 2011-06-03 03:41:11 +00:00
Mark A. Hershberger
44f9460caf w/s cleanup 2011-05-20 18:20:16 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Happy-melon
602020b1df Move minimum database versions to Defines.php 2011-05-07 15:25:27 +00:00
Jure Kajzer
3002621fb7 * OracleInstaller now also supports installation with (requested by Tim):
** preexisting account 
** privileged account into a restricted account
* DatabaseOracle fixed a fixme (made by Reedy)
2011-03-01 13:50:52 +00:00
Tim Starling
e1c8e80297 * Fixed Oracle new installer support, broken by r80957. This is a minimal patch and doesn't address the architectural issues.
** Moved the responsibility for calling setupSchemaVars() on install to the DatabaseInstaller subclass. This allows it to be called after setupDatabase() has completed, as required by Oracle and PostgreSQL.
** Fixed OracleInstaller::getConnection() so that it respects $this->useSysDBA correctly.
** In OracleInstaller, added some more variables to the list of schema vars, which are needed by user.sql and tables.sql
** In SearchOracle, specify the database name when calling ctx_ddl.sync_index(). This fixes a fatal error in the createMainpage step, caused by the schema name not being equal to the current user. 

* In oracle/tables.sql, fixed a couple of indexes with missing table prefixes.
* Improved debugging output in DatabaseInstaller::getConnection() and Installer::createMainpage().
* In DatabaseBase::selectDB(), set $this->mDBname correctly, as in DatabaseMysql.
2011-01-27 08:25:48 +00:00
Tim Starling
0c86b1611a * Fixed a bug causing the installer to ignore the "engine" and "charset" settings when installing a MySQL database.
* Fixed a bug causing the engine and charset settings to not be properly preserved when adding new tables on upgrade.
* Fixed total breakage of SQLite upgrade, by reusing the administrative connection to the SQLite database instead of creating a new one when wfGetDB() is called. Added LBFactory_Single to support this. 
* Introduced a "schema variable" concept to DatabaseBase to avoid the use of globals for communication between the installer and the Database. Removed a lot of old global variable names from Database::replaceVars(), most were only added on a whim and were never used.
* Introduced DatabaseInstaller::getSchemaVars(), to allow schema variables to be supplied by the DatabaseInstaller child classes.
* Removed messages config-mysql-egine-mismatch [sic] and config-mysql-charset-mismatch. In the old installer it was possible for users to request a certain character set for an upgrade, but in the new installer the question is never asked. So these warnings were shown whenever a non-default character set or engine was used in the old database.
* In MysqlInstaller::preUpgrade(), fixed the incorrect strings used to identify the MySQL character sets: mysql5 instead of utf8 and mysql5-binary instead of binary.
* On install, initialise the site_stats table, using code copied from the old installer. Unlike the old installer, use SiteStats to increment the user count when the initial user is added.
* Fixed several instances of inappropriate call-by-reference. 
* Replaced call_user_func_array() with call_user_func() where possible, it is shorter and simpler.	
* Moved the caching boilerplate for DatabaseInstaller::getConnection() to the base class, and have the derived classes override an uncached function openConnection() instead. Updates r80892.
* In MysqlInstaller::getLocalSettings(), escape PHP strings correctly with LocalSettingsGenerator::escapePhpString(). 
* Reduce timeout for checks in dirIsExecutable() to 3 seconds, so that it doesn't take 30s to run when apache is in single-threaded mode for debugging.
* MySQL and SQLite have been tested and they appear to work. PostgreSQL upgrade is totally broken, apparently it was like that before I started. The Oracle code is untested.
2011-01-25 07:37:48 +00:00
Jure Kajzer
be8ce87825 * changed variable list as per comment on r79954 left only wgDBtype
* all other variables get set trough ->getGlobalNames
* could somone test this on mysql, postgres and sqlite ... it should work, but to be sure
2011-01-14 07:05:21 +00:00
Jure Kajzer
f853d711ac * fixed Oracle code for installer and phpunit tests
* removed ORABlob class
2011-01-10 19:22:27 +00:00
Chad Horohoe
8fed0eb241 * Fix r78774 for Oracle and Postgres, broke by method rename
* Get rid of Postgres version check, already handled by PostgresInstaller::submitConnectForm()
2010-12-23 20:24:11 +00:00
Mark A. Hershberger
aa08646a71 Misc whitespace changes, mostly EOL w/s and indention fixes so TAB = 4 spaces 2010-12-19 04:31:15 +00:00
Aaron Schulz
281018701f Changed doQuery() -> query() 2010-12-15 20:59:29 +00:00
Brandon Harris
4f8f4bf675 Revert r77860, which was a reversion of r75832.
Didn't see comments about escaping html and use of tipsy; will be addressed in next commit.
2010-12-06 20:04:28 +00:00
Tim Starling
41b92f3343 Reverted r75832 per my comments on CR, unanswered for 19 days. Moving all help information into tooltips is a step backwards for usability. Reverted followups r75836, r75866, r76314 and r76315. 2010-12-06 07:08:31 +00:00
Platonides
dfe4979df4 Document a bit what's going on and get rid of a warning. 2010-11-30 18:24:02 +00:00
Sam Reed
cadc951d15 More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully) 2010-11-25 22:24:11 +00:00
Antoine Musso
6fe29c9c30 revert r76464
* mixed style changes and variable removing
* logic changes
* useful comments removed
2010-11-25 20:01:34 +00:00
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
2c965c5dc4 Followup r76055, missed a few more 2010-11-04 23:23:34 +00:00
Chad Horohoe
0bee9581b4 Replace XML->HTML methods throughout most of the installer 2010-11-04 23:21:24 +00:00
Brandon Harris
d00ddeef7f * Added tipsy library
* Added associated files for tooltip display
* Added associated css rules for tooltip display
* Updated installer's help system in (most?) places to display help as tooltips instead of show/hide system
* Beginnings of visual changes (e.g., less boxes, more color)
* Modified several of the installer's widget display methods
* Added a couple new i18n values
* Fixed small bug in installer logic:
  - Password validation on new users was being executed even if there wasn't a $user object
2010-11-01 21:17:15 +00:00
Jure Kajzer
e99125adf1 * installers skips recreation of existing user
* updater for 16->17 schema changes 
* i dedicate this revision to my greatest supporter ... Reedy :)
2010-10-27 14:52:18 +00:00
Jure Kajzer
1eede8e88b * DatabaseOracle - throw connection exception instead of debug+false
* DatabaseOracle - fixed $wgContLang local usage in update
* Installer - added Main Page insertion as a new installation step (fixes bug 22308)
2010-10-25 16:49:59 +00:00
Jure Kajzer
5bc09c7c5c * Installer for Oracle fixes
* added Main Page creation within install
* added MEDIAWIKI_INSTALL constant; some scripts still use it
* started OracleUpgrader scripts for upgrade from 1.16
* fixed some not null defaults that comply with mysql data type default on not null fields
* FKs made defferable
2010-10-25 11:07:55 +00:00
Jure Kajzer
49c9990074 * fixed r74949 remarks
* modified version lookup, added 9iR1 as minimum version for installation.
2010-10-19 06:25:12 +00:00
Jure Kajzer
6d11fb986f * Installer: works (beta). More testing tomorow.
* Updater: todo. For now it skips.
2010-10-18 16:09:18 +00:00
Chad Horohoe
4a50d55600 Add getConnection() for Oracle 2010-09-01 19:09:27 +00:00
Chad Horohoe
ed7ff76d50 Move createTables() up a level, this code was practically identical 2010-09-01 19:03:56 +00:00
Chad Horohoe
9fb2b16dc0 Reduce some duplication, just implement stub in parent 2010-09-01 18:10:02 +00:00
Alexandre Emsenhuber
47296df668 * Make the MySQL updater work in the new installer
* DatabaseInstaller::doUpgrade() is now abstract

TODO: MysqlUpdater::doUpgrade() is horrible, please someone fix it once it could be
2010-08-22 10:37:27 +00:00
Alexandre Emsenhuber
b8cafd4978 * Added file description headers
* Added @file where needed
2010-08-21 18:20:09 +00:00
Jeroen De Dauw
635e2c38f2 Added deployment documentation group 2010-07-29 18:36:39 +00:00
Jeroen De Dauw
62e25771a1 Clarified field and method visibility and added TODOs 2010-07-20 11:27:52 +00:00
Jeroen De Dauw
05e8dc29f8 Renamed InstallerDBType to DatabaseInstaller 2010-07-20 09:30:33 +00:00
Chad Horohoe
67281454eb Partial revert r69128: go back to making isCompiled() an instance method rather than static. Moved $installSteps tweaking to new preInstall() method rather than piling more hacks into the constructor. Also pass InstallerDBType to install steps, reduce some code duplication 2010-07-07 13:52:05 +00:00
Mark A. Hershberger
bec7a947e7 * Add Status::getWarningsArray() to complement Status::getErrorsArray()
* Add Status::getWikiTextArray() to allow different ways of formating a bunch of status messages (e.g. CLI output)
* Clean up messages in CliInstaller, use more i18n
* Use warning messages from Status return object in CLI installer
* Make Installer::isCompiled static so we don't have to create an object just to see that we can't use it.
* Add Installer::addInstallStepFollowing so we don't have MySQLInstaller mucking in its parent's data
2010-07-07 02:53:19 +00:00
Chad Horohoe
a4393915e2 Merge new-installer branch to trunk
* This is not complete yet, and should not be used outside of testing. Using it on a production database may ruin everything. This is the reason for the second entry point of new-index.php. You've been warned. 
* Known issues are at [[mw:New-installer_issues]]. Please add new items to the list if you find them.
2010-05-07 12:25:01 +00:00