Commit graph

54 commits

Author SHA1 Message Date
Max Semenik
7966eae6e6 (bug 28237) Installer doesn't create extension tables 2011-03-30 17:32:20 +00:00
Brion Vibber
4ac9bc6a0a * (bug 26937) [Installer] Fix for Javascript-opened sections being incorrectly open or closed when returning to page
The sections whose visibility was being controlled by the checkbox had an initial visibility hardcoded in the page output, which had been manually set to match the expected initial default state. I've switched these to instead check what the variable is set to and base the initial style visibility on that.
Could be better to encapsulate these settings together in some way, but this'll do for now.

Note that the way these are all done now means that the sections can never be used when JS is off; if a fully-functional installer is desired in a JS-free environment, it may be necessary to change these further to default to shown, and do the initial hiding in JavaScript (could have 'flashing' issues though: the bits showing up, then quickly hiding. laaame but oh well)
2011-03-27 19:22:14 +00:00
Chad Horohoe
34dc3650b6 (bug 12070) After Installation MySQL was blocked. GRANT with IDENTIFIED BY will overwrite the password of an existing user silently, moving CREATE USER and GRANT to two separate operations so we can handle the different errors. Put in HISTORY, needs backporting with RELEASE-NOTES 2011-03-01 18:46:16 +00:00
Chad Horohoe
8fcd602c89 Don't allow the user to create DB users with no passwords, it's not good practice.
We can't stop them from using users that already have empty passwords, but we can refuse to create it ;-)
2011-02-23 16:18:51 +00:00
Sam Reed
7ebf2e5165 More function level documentation
Fixup some indenting
2011-02-19 00:44:38 +00:00
Mark A. Hershberger
b4cee86beb w/s fixups 2011-02-12 04:06:22 +00:00
Chad Horohoe
31b0483aa6 Suppress warnings on reading interwiki.list in case permissions or something else makes it not work.
Tweak message since we no longer read the .sql file.
2011-02-04 21:10:02 +00:00
Sam Reed
a15519fabc Few more return types 2011-02-03 23:09:42 +00:00
Sam Reed
4a5298e6fd Fix return type documentation 2011-02-03 20:57:56 +00:00
Chad Horohoe
3f5e23548c Fixups to r81266 2011-01-31 20:09:29 +00:00
Chad Horohoe
742ea74200 (bug 26857) Fatal error during installation enabling 'Vector' extension (or any extension, really). The reason we're including extensions during setup is so they have a chance to register with LoadExtensionSchemaUpdates. Before including extensions, we now include DefaultSettings.php, so any operations on those variables won't result in the fatals described in the bug.
More importantly, this adds support for installing extension tables *at* install time. Previously, the best we could do was to add the require()s to LocalSettings. However, without a subsequent update, wikis will probably start having errors immediately after install (this is really bad!). So I've added an interface to the DatabaseUpdater passed to LoadExtensionSchemaUpdates. An extension can now call addNewExtension() which will allow the extension to be enabled on install and not just update. Example committed in CodeReview
2011-01-31 20:00:59 +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
12c87d042c Removed getConnectionOrDie(), accidentally added in r80957 2011-01-27 03:54:33 +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
Chad Horohoe
a5053d4c5a * Cleanup massive duplication across Database constructors. Default implementation fairly sane. Now they all share the same if( $server ) logic to allow constructing the class without forcing open a connection (MySQL has done this since at least r15094)
* Get rid of intermediate installTables() callback
* Actually cache the result of DbInstaller::getConnection() like the documentation says
2011-01-24 18:36:09 +00:00
Chad Horohoe
44dd1794a1 Partially revert r69738 (splitting Installer/CoreInstaller). As discussed on CR, this probably wasn't the best route to go with this code.
We can figure that out sometime in 1.18
2011-01-21 15:27:16 +00:00
Sam Reed
cb70fd7cdb * (bug 26733) Wrap initial table creation in transaction 2011-01-14 20:43:14 +00:00
Sam Reed
b883e46c7e Parent in DatabaseInstaller is a CoreInstaller, not just an Installer 2011-01-11 02:46:55 +00:00
Jure Kajzer
f853d711ac * fixed Oracle code for installer and phpunit tests
* removed ORABlob class
2011-01-10 19:22:27 +00:00
Alexandre Emsenhuber
62e5d4ba70 Fix for r64254: undefined variable 2011-01-02 19:04:23 +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
Sam Reed
984c692ec4 Removing trailing whitespace 2010-12-16 11:20:39 +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
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
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
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
9b9cbb4206 * moved installMainpage to CoreInstaller as requested in r75366 2010-10-25 18:57:44 +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
Alexandre Emsenhuber
835b1cad6a Fix for r72553: DatabaseUpdater::execute() doesn't exist... 2010-10-01 20:39:07 +00:00
Chad Horohoe
ee7e7c9085 outputHandler() isn't static 2010-09-09 15:37:23 +00:00
Alexandre Emsenhuber
a2bbf10231 Per ^demon's comment on r71430: moved doUpgrade() to DatabaseInstaller (did not remove the stub method in Oracle installer) 2010-09-07 20:57:53 +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
17da093eb9 More duplication reduction 2010-09-01 18:16:05 +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
Mark A. Hershberger
79907b4b08 OverloardQ or other PG person, please review
These patches were necessary to get new-installer working on PG for me.  I'm not sure about the ‘create lang' bits — they should maybe be in another step?
2010-08-17 03:07:27 +00:00
Mark A. Hershberger
aeb2df736b * Make parsertests work with interwiki table on sqlite
* re r69542 temporary fix for new-installer + interwiki table
* temporary fix for outputing LocalSettings.php in the CliInstaller
2010-07-30 20:17:28 +00:00
Jeroen De Dauw
635e2c38f2 Added deployment documentation group 2010-07-29 18:36:39 +00:00
Jeroen De Dauw
a620daf697 Split Installer into Installer and CoreInstaller + made misc style and doc improvements 2010-07-22 17:58:26 +00:00
Jeroen De Dauw
e98162901b Doc and style improvements 2010-07-20 11:17:36 +00:00
Jeroen De Dauw
68341f2e5c Re-did r69590 2010-07-20 11:00:51 +00:00
Tim Starling
7b4d4d3480 Applying the text changes to the file as in r69589, to complete the rename from InstallerDBType to DatabaseInstaller. 2010-07-20 10:06:41 +00:00
Tim Starling
1412988513 Continued cleanup of r69589: adding DatabaseInstaller.php, copied from InstallerDBType.php@69588. 2010-07-20 10:03:27 +00:00
Tim Starling
0e76787fb6 Cleanup for r69589 etc., deleting the file so I can copy it again. 2010-07-20 10:01:34 +00:00