Commit graph

110 commits

Author SHA1 Message Date
jenkins-bot
25eb07c8f0 Merge "installer: Don't allow setting $wgDBmysql5" 2018-06-01 21:35:50 +00:00
Kunal Mehta
c9339ba552 installer: Don't allow setting $wgDBmysql5
It was possible to pass --dbmysql5 to the command line installer to
enable this experimental option. This removes that ability, and removes
setting of $wgDBmysql5 in the generated LocalSettings.php, so new
installs will fallback to the default of false.

Bug: T196185
Change-Id: Id5ff69f493d14cf7b16157f729fbe4f4b4e2e8c8
2018-06-01 11:57:52 -07:00
Kunal Mehta
d5cde75416 installer: Hide binary/utf-8 charset option from users
This is still used internally for the preUpgrade() checks that see if
the user has an existing table using the utf8 charset, but hide it from
users so they don't accidentally pick utf8.

Bug: T196092
Change-Id: Iaace2e5bf9df7563e1d233496366c95b3f1faf16
2018-05-31 11:29:19 -07:00
Seb35
0ff2b7a776 Remove support for PHP extension 'mysql' (not mysqli!)
This PHP extension was deprecated in PHP 5.5 and removed in PHP 7.0.
The newer MySQL driver 'mysqli' is the default driver since MediaWiki
1.22 and 'mysql' was deprecated in MediaWiki 1.30.

Bug: T120333
Change-Id: Icff7a63ab47ae1483de87ba6486945974699362b
2018-01-17 10:48:47 -08:00
Kunal Mehta
574ae4929e Check minimum database server version when running update.php
If MediaWiki has increased the minimum database server version that is
required, check it when running update.php to ensure it is still
compatible. Previously this was only checked during the installer.

Bug: T162044
Change-Id: I47092c9557f4706a4dcb3a23150647e68af4317f
2017-10-02 22:23:32 -07:00
Umherirrender
f739a8f368 Improve some parameter docs
Add missing @return and @param to function docs and fixed some @param

Change-Id: I810727961057cfdcc274428b239af5975c57468d
2017-09-10 20:32:31 +02:00
Kunal Mehta
0cb2a09b6d Always put type information before variable name for @var tags
Like other tags, @var should have the type information before the
variable name.

<https://docs.phpdoc.org/references/phpdoc/tags/var.html>

Change-Id: I9eca6957b1990fa8cc687103dc02ee38af5f9086
2017-09-04 11:06:51 -07:00
Reedy
0bb667d50d Bump minimum required MySQL Version to 5.5.8
Bug: T161232
Change-Id: I5f7d08ad7e58ce89c9fd766f0ac45fa996bf6a44
2017-07-15 15:58:33 +00:00
jenkins-bot
c1f430f17b Merge "Revert "Revert "Fix the web updater""" 2017-05-24 22:31:42 +00:00
Paladox
a0a471568f Revert "Revert "Fix the web updater""
This reverts commit a7b9cc4946.

Change-Id: I91d4b821df126703f83377dd8aff3a79b629f720
2017-05-24 22:20:55 +00:00
jenkins-bot
e94c89e7e3 Merge "Revert "Fix the web updater"" 2017-05-24 21:56:37 +00:00
Paladox
a7b9cc4946 Revert "Fix the web updater"
May be causing beta to break, if that's true then we are going to revert 6519c42d24

This reverts commit 5d56bcb925.

Change-Id: I5e9df08dc1583266bb11b52d5d68bf393e4c0fff
2017-05-24 21:43:30 +00:00
jenkins-bot
3760c512a1 Merge "installer: Replace bad calls to getText() on DBQueryError exceptions" 2017-05-24 11:34:20 +00:00
mainframe98
a3d2a265c9 installer: Replace bad calls to getText() on DBQueryError exceptions
The called method does not exist. Replaced with getMessage(),
similar to PostgresInstaller.php.

Bug: T165319
Change-Id: I900ec8c18307ce6f9e8c9f4cda79b1e33ed66dff
2017-05-24 11:25:02 +00:00
Paladox
5d56bcb925 Fix the web updater
It kept failing with Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ESCAPE '`'' at line 1 (localhost)

Bug: T165805
Change-Id: I2671415fc34b1e6226104c88ca21fafc860bb7fb
2017-05-19 20:46:06 +00:00
Aaron Schulz
dd359741cc Move DB errors to Rdbms namespace
Change-Id: I463bd86123501abc68fdb78b4cda6110f7af2549
2017-04-15 10:47:41 -07:00
Aaron Schulz
d735dc562d Move Database and subclasses to Rdbms namespace
Change-Id: I52bef87512f9ddd155d1f4cc0052f6b7a0db5b42
2017-04-12 10:43:57 -07:00
Bartosz Dziewoński
eb1e4bf240 MysqlInstaller: Restore missing function
Copied from rSVN45497.

I'm not sure how to reproduce the circumstances in which this code gets
called, so I didn't test it. But what we did before was clearly wrong.

Bug: T154670
Change-Id: Id9b0282e7e65543999c9737950f5073ba2e81962
2017-01-11 18:34:32 +00:00
Aaron Schulz
30f4b3c103 Replace DatabaseBase => Database in more places
Change-Id: If37a7909056bf2c31a8228cbc84f0fbbf5f1c517
2016-09-28 15:53:02 -07:00
Aaron Schulz
5bbac35ed1 Replace DatabaseBase:: with Database:: and update type hints
Change-Id: I3919b04eb2de4fa0bf8a02239fb5bbf17d347511
2016-09-27 04:20:03 +00:00
Alexia E. Smith
45ebd3f0e6 Make the call match the function definition.
Change-Id: I381fbc9b6ddbf27f4f7a79dc19eec0547e0fddbb
2016-05-25 14:52:46 -05:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Ori Livneh
268da96291 Remove redundant 'type' attributes from style and script tags
Already stripped by Html::element before actual output, but
remove them from the attribute arrays as well.

Change-Id: I8699ca7bf40df07e9d4c370f6863003c095ced0e
2015-12-09 20:07:13 +00:00
Brion Vibber
183bd8309a Don't break installation when the local db root user has no password
Reverts broken patch 0cf4e92d; it seems to have been intended to
validate the *to be created* db username/pass, but instead it
validates the *installation username/pass*. This made it impossible
to install if your db user had no password, as on many default dev
installations.

Bug: T85281
Change-Id: I0caaf8b9a244d6f4dad0cba32c566ea557f77fcc
2015-07-17 08:42:37 -05:00
Brian Wolff
5d9b67e09e Allow edit summaries to be up to 767 bytes long
This is just the db part. The changes to UI validation code will
come in a dependent patch later.

This changes the max size of various *_comment, *_description
and *_reason fields to be 767 bytes. This size is chosen to
be consistent with the largest we can get away with while
still having covering indexes.

It also unifies the various data types of these fields to
varbinary. (Note, this was previously done and reverted in
r80547, but I don't think the reason for revert applies to
the edit summary fields)

MyISAM has a much smaller max index size, and this wouldn't
work with that storage engine. However, none of these fields
are used in default indexes (only in WMF indexes), so this
should not be an issue for anyone using MyISAM. Postgress
and sqlite already supported the larger edit summary size.

Note: This patch increases min mysql version to 5.0.3.

Bug: T6715
Change-Id: I8558e80a18e4591f07f2c3e80f792ea4435c4e71
2015-03-11 13:36:38 +00:00
umherirrender
583764482a DatabaseInstaller::getGlobalDefaults: Return all needed globals
Since Id364306d883e0d494b948854e05f3f79ba7dd6d2 the text boxes on the
gui installer were not preloaded with the default values from
DefaultSettings.php.

Changed this by return all needed globals (defined by getGlobalNames)
from DatabaseInstaller::getGlobalDefaults(). This injects the as default
value in function getVar and than gets used, when no value is set.

Bug: T71281
Change-Id: I8217b25e903e40ec82be3d700381ff7aea3b481f
2015-02-22 00:17:14 +00:00
umherirrender
2b021dc48a Fixed spacing
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif

Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
2014-07-19 23:12:10 +02:00
umherirrender
f5f1e38b9a Fixed some @params documentation (includes/[db|installer])
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
2014-04-19 13:55:27 +02:00
pubudu538
0cf4e92dec Error Msg for missing db username & password when installing
Added configurations for Mysql and Postgresql installers
to display an error message if user doesnt input a username to the
database username

Bug: 43528
Bug: 59663
Change-Id: Ib6b05d2d7e8ebb4438d3b0051c33d367f41a9957
2014-04-07 22:17:18 +05:30
Siebrand Mazeland
abd4247019 Remove unused local variables, update formatting and documentation
Change-Id: Ib17f5f05d6cc48ac448df0ea8515d570713df9b5
2013-11-25 14:42:34 +01:00
Siebrand Mazeland
bb0044f638 Address PHP CodeSniffer errors and warnings
One class of errors left unaddressed: Class name "WebInstaller_Language"
is not in camel caps format. I think this can be changed, too, but I
wasn't able to quickly find out where class names are being created.

Change-Id: I920b0231db1b70b68c6c8907257c288a0e112668
2013-10-23 12:42:07 +00:00
Tim Starling
98aca05888 Fix mysqli support
Exception was thrown if $dbType=mysql, regardless of whether a driver
was available. Also, the installer support was broken if the mysql
driver was missing.

Change-Id: I29df3fc9b3bf5743c1365f757e0cf899d5b96ae9
2013-10-17 03:11:53 +00:00
Siebrand Mazeland
626addab9e Update formatting
With some manual corrections.

Change-Id: Icd947288c32fdb90a0f35388963ef5a17ffa58e7
2013-10-09 09:35:18 +00:00
Karun Dambiec
2ab7c9ec3b MysqlInstaller: use default character set of utf8
Bug: 14931
Change-Id: Ied512a75d17b401206b6439f289fe36c01536cec
2013-09-23 21:14:34 -04:00
Jakub Vrana
3f039132f9 Pass correct number of parameters to Database constructor from installer
DatabaseBase::__construct() accepts 6 parameters, installer passes 7.

Change-Id: I96d84f645f8f3899d7a99756b441957f1b234de9
2013-05-03 10:34:47 -07:00
umherirrender
6f79eef473 Fixed spacing around parenthesis in includes
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397
2013-04-28 15:50:07 +00:00
ebernhardson
f250335f19 MyISAM warning when InnoDB is not available
Bug: 34430
Change-Id: I68e79a8efe7cd625c12b5993074de9c3479e760b
2013-04-25 15:13:36 -07:00
umherirrender
ee31d37821 Fixed spacing in context/installer/media/templates/upload folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I9761be9fa47adc3554852a97b19792b4648466ad
2013-04-21 06:22:06 +00:00
umherirrender
6c278b6d7e fix some spacing
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
  calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays

Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
2013-03-25 22:22:46 +00:00
shirayuki
e7ac47fe50 Add comments for grep (includes/installer/)
Change-Id: Idb44b343267978ae214b2cfe9a05947b220629d7
2013-03-21 08:11:05 +09:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
umherirrender
48cd72819e fix some spacing
Change-Id: Ia9650be8b791fd2f0ccbc099436918a9d12d9968
2013-02-04 20:04:26 +00:00
Victor Vasiliev
676bea0ec6 (bug 43751) Allow '+' in MySQL database names.
Change-Id: I0196af1989a09d941bfcc8e52c6c9f97ea5abe95
2013-01-25 22:42:16 +00:00
Alex Monk
2fabea7eea Use wfMessage instead of deprecated wfMsg*
Or $this->msg in special pages.

Change-Id: I774a89d646615053c8424050e42ad95601f92543
2012-08-18 14:11:05 +02:00
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
Alexandre Emsenhuber
61a88f8c18 Pass __METHOD__ to DatabaseBase::begin(), DatabaseBase::commit() and DatabaseBase::rollback() 2012-02-26 17:19:11 +00:00
Sam Reed
c47f83a4d4 More __METHOD__ in our madness 2012-02-24 18:45:24 +00:00
Mark A. Hershberger
0d43066e18 Fix Bug 29102 - Upgrade fails "Unknown character set: 'mysql4'
Fix suggested by Tremault and tested by maanto.  Confirmed by me.
2012-01-04 15:52:48 +00:00
Sam Reed
d5e52d1a43 Add a TODO with regards to existing mysql4 schemas.. 2011-12-15 14:56:09 +00:00