Pulled some code from insertOneRow() to fix the update() function
and prevent the error warnings in bugzilla 64970 from showing up.
Note that since insertOneRow() and update() contains a lot of
duplicate code, they may be candidates for merging, but that is
outside the scope of this request.
Bug: 64970
Change-Id: I9ff9077d68e77f05f878fc541f87e0a5ce86ecc2
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
Probably the fakeMaster/fakeSlave stuff was originally intended to be
generic, but the existing code in Database.php is making some very
MySQL-specific assumptions. So let's evict it from Database.php (except
for the minimal support functions) and put it in DatabaseMysqlBase where
it makes more sense.
This also takes care of fixing the breakage described in I5d2a1696 by
reverting Id6268193 and the problematic bit of I364e192e (again).
Change-Id: I3dc6ca216bf2c2f07d3090e86f2539292e1fa86b
This gets the web installer working without the mysql or mysqli
PHP extension, which is not needed for other database systems.
* Avoid "lego" construction: put link text directly in the messages,
which because the messages are parsed as wikitext, is easy to do.
* Put URLs in separate, ignored messages to avoid duplication in
Database*::getSoftwareLink().
* Because I had to touch a MySQL-related i18n message, I figured
this would be a good time to address bug 28281 (regarding MySQL
forks and Special:Version).
* Other miscellaneous message changes, such as recommending the
mysqli PHP extension over the old, deprecated mysql extension.
Bug: 28281
Bug: 58167
Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea
Added a MWTimestamp::format method to format a timestamp object in the
given pattern. This avoids date(), which needs the local time
zone corretly set on the server, which is assumed at the moment in
Setup.php
Added MWTimestamp::getInstance for gmdate() and
MWTimestamp::getLocalInstance for date() to create a MWTimestamp object
and use it as inline statement.
Also MWTimestamp::setTimezone and MWTimestamp::getTimzone was added for
timezone handling.
Change-Id: I812aa013be2f4380e0cf10dc465202756fe8347b
* All callers are calling it this way and it breaks
hhvm when declared statically and called dynamically.
Change-Id: I894e615fd828615384aa8457a16a759c8aa416ef
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
* 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
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
Created new method for creating the group by/having and order by sql,
this avoids code duplication in each database with a overridden
makeSelectOptions.
This fix the group by/having/order by for DB2/MSSQL to support array
conditions. Fixed the having for Postgres for array conditions.
Change-Id: I0fbcb3e8e68d995d93be0bf3d0a347788a39194a
DatabaseOracle class has been using mb_check_encoding which might not
always be available. We now rely on the StringUtils::isUtf8() method
implemented by I4cf4dfe2.
Change-Id: I5a9ffa23e3e738e4886d61e85974b0af25058308
* This can allow for autocommit job queue insertion without
breaking existing transactions (which currently happens since
job queue insert does begin/commit).
Change-Id: I021d4a73635168c05bbc1068912c2c6dbdf9cdc4
* Removed unused and obsolete set() and safeQuery() functions.
* Removed unused deprecated constructor functions.
* Removed unused limitResultForUpdate() cruft function.
* Removed unused standardSelectDistinct(), it's better to just follow the standard for all queries.
* Removed other cruft functions unused by core/extensions.
* Made some internal functions protected.
Change-Id: I90be88ea740834a417a17d7751f1be7bac4eae4e