| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* Inject global variables in MWLBFactory.php
* Remove incompatible ignoreErrors() override which is only called
from the base classes.
* Remove use of wf* methods.
Change-Id: Idf8202474182cc82fb6ef453e2722e7af17e32aa
|
|
|
|
| |
Change-Id: Iac80f6668be17c0e35908fc8fdacbae0201f2d7f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of these are simply changing annotations to reflect
reality. If a function can return false to indicate failure
the @return should indicate it.
Some are fixing preg_match calls, preg match returns 1, 0 or false,
but the functions all claim to return booleans.
This is far from all the incorrect return types in mediawiki, there
are around 250 detected by phan, but have to start somewhere.
Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
|
|
|
|
| |
Change-Id: Ia3b7f9cb7d40f4ec9f19c924904e8a096880ec6a
|
|
|
|
|
|
|
|
| |
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.
Also update some defect links.
Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I3919b04eb2de4fa0bf8a02239fb5bbf17d347511
|
|/
|
|
| |
Change-Id: Ibfc4c6cbbc08b5917f1a84d86d2d4a0855e371a1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pretty much everything seems to assume that PHP booleans should be
converted to 0/1: MySQL does this implicitly thanks to the lack of
strict mode by default, while PostgreSQL and Sqlite (and Mssql) do it
explicitly.
The addition of MySQL strict mode for unit tests in Ib2873913 exposed
the assumption in the case of MySQL by making some extension unit tests
fail. So let's make casting bool to int the default behavior of
Database::addQuotes().
This also cleans up the phpdoc for Database::addQuotes() to properly
reflect all the supported types that can be passed to it.
Change-Id: I13d0e402fa676bc27c345e8ac12f363ebc627f6a
|
|
|
|
|
|
|
|
|
|
|
| |
These DatabaseBase methods have no callers are were a mistake to
begin with. They only encouraged code forking and incompatibilities
among different backing DB types.
Also removed stray realTimestamps() method that was left over
from prior removals.
Change-Id: I37bef8585151e2782d2c88b5ae1e6752109c6ac7
|
|\ |
|
| |
| |
| |
| |
| |
| | |
That method should be removed since it encourages incompatibility
Change-Id: Id8a0174266bcd988c85943507f1edb3518fe087e
|
|/
|
|
|
|
| |
SearchEngineFactory::getSearchEngineClass() should be used instead
Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f
|
|
|
|
| |
Change-Id: I4b28c15a8589504bdbbe79ba0d3aed1e52dbe65b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Database class was previously just a short-hand for "Database::",
and such calls should still work. The class now resides in /libs/rdbms.
The subclasses now extend DatabaseBase to avoid breaking type hints
that use that (hints use either IDatabase or DatabaseBase).
Also, use CASCADE with DROP TABLE for MySQL as with other DBs.
Keep SQLite excempt due to lack of support.
Added getDomainID() methods to avoid mentioning the word "wiki".
Change-Id: Ibd05d786cb26c21dcc9cb9601f6b2b52056af9ae
|
|
|
|
| |
Change-Id: I4f1269d3a4e26c766f181208942042fdf768e0af
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Idc418ae1088f87d6416e2552976d94f7d1e8f5db
|
|/
|
|
| |
Change-Id: I0724f1acce4f6c43b1f0983fa119e628e7c53ba5
|
|
|
|
| |
Change-Id: Ia0a049cd4294c5a39aa9ed228d4eb5b15736ea1f
|
|
|
|
| |
Change-Id: I94532d09216926d401e94c61acd60fdc6241a2a0
|
|\ |
|
| |
| |
| |
| |
| | |
BUG: T29112
Change-Id: I9a5a4f7983ebd37b7889abb8433e5acc44b8f9ac
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids slave lag and makes query time account easier.
It also avoids table-level autoinc locking and slave drift
with statement-based replication in some setups.
Also refactored the use of $wgCommandLine mode in
DatabaseBase slightly, so that it can be injected.
Change-Id: I2dba6024ecf32c9ee24a3080cce3b02568c1458b
|
|/
|
|
| |
Change-Id: I226ce6bcb5bbf6ed3802042dd2790f85617833e1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The MSSQL schema is now brought in-line with the MySQL schema.
Additionally, various issues that prevented successful installation or
updates via MSSQL were fixed, notably with respect to creating bits of
the database should other bits already exist as well as issues with
previous updater patches not working correctly.
Additional MSSQL bugfixes will come in separate patches, as they are less
related to the schema/install/upgrade process.
Change-Id: If3eea625499d3cb14abba40f528208173067a53a
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| | |
MSSQL allows for more operators than standard LIKE queries. In addition,
an ESCAPE clause must be specified in order to backslash-escapes to work.
Bug: T73207
Change-Id: Idadf9d56cadc48cf47d000598d8a3214c684f9d5
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I searched for /\$(\S+) = (.+?\(.*?\);)\n.*?\$\1\[/, ignored
everything involving isset(), unset() or array assigments, then
skimmed through the remaining results and changed things where they
made sense. These changes were not automated, so please review them.
Change-Id: Ib37b4c66fc57648470f151ad412210b3629c2538
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
This gives static method callers the option
to use methods like Database::factory() instead
of having to use the uglier DatabaseBase::factory().
Change-Id: I61800626b71ad2803a897df060059dbaf8778679
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It has not been necessary to call this method outside the Database classes
since 1.11 (r23756 / 9382bc7a858c).
This is a breaking change and should not be merged before the following
changes to extensions:
* Disambiguator: Ibef942fd
* Maps: Ic90bd0ad
* OAI: Idbbe08d6
* Oversight: I63071e65
* Video: Id71914cd
Change-Id: Idfe7cd6f516f0aca850878282c47e7914accc6d8
|
| |
| |
| |
| |
| | |
Bug: T102805
Change-Id: I7ce4c71dd605f9be79a630602391271bb269b962
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current API for Database::encodeBlob/Database::addQuotes requires
the code that is outputting binary data to have a database handle, so
that it may call Database::encodeBlob to get either a plain string or
a Blob object back. All database implementations other than MySQL
return a Blob object from Database::encodeBlob.
This is a rather inconvenient API, it tightly couples the creation of
binary data with the Database object unnecessarily. If all database
objects accept a Blob via Database::addQuotes then code can simply
wrap its arguments in Blob and know that any database it ends up at
will be properly handled.
This patch changes the default implementation of Database::addQuotes
to recognize a Blob object was passed in, and use Blob::fetch to turn
it back into a string. Database implementations other than MySQL all
handle this Blob object already. The postgresql implementation had
to be adjusted slightly. Now when it sees a Blob object that it did
not create it will encode that appropriately.
Bug: 72367
Change-Id: I12fb4bd339be19137fffba2e47a70741382f6a8c
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead keep only the code that creates blobs for specific columns
and call DatabaseBase:makeList() to handle the rest.
This will allow the fix made in 26235c73376b to work also for MSSQL.
Change-Id: I74ae55a52fcd1dad8b857385396bd8f5d81370ba
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Doc comments state that these methods return ints. In order to ensure
that, values must be cast to int before they are returned.
With respect to selectRowCount(), follows-up 65f81d284386.
Change-Id: I108221ce4ad1b5b103b015fe875de54e04781741
|
| |
| |
| |
| | |
Change-Id: I09d0c13070f966fcf23d2638d8fc1328279a5995
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changed all remaining uses of 'and' (T_LOGICAL_AND) and 'or'
(T_LOGICAL_OR) except those in includes/libs/lessc.inc.php.
In maintenance/generateSitemap.php, also slightly cleaned up
touched code:
* Inlined GenerateSitemap::init_path().
* Removed the redundant `$fspath && !is_dir( $fspath )` check.
* Return a nonzero exit code if wfMkdirParents() fails.
There are still uses of 'xor' (T_LOGICAL_XOR) in the following
files, which I left as-is:
* includes/Export.php
* includes/htmlform/HTMLCheckField.php
* includes/Autopromote.php
* maintenance/importDump.php
* maintenance/backup.inc
Change-Id: I73cb20da989e90b52782e7499f633debd5ad265d
|
|/
|
|
|
|
|
|
|
|
| |
- Added newline at end of file
- Removed double spaces/newlines
- Added space after if/function and parentheses/brackets
- Removed space before comma/cast
- Fixed indent of some lines
Change-Id: I29867ffdffdfb7d2b56997e9393497c7dc12f7d3
|
|
|
|
|
|
|
|
| |
* INSERT IGNORE now works properly
* Only return an inserted id if the INSERT was actually successful
* Fix syntax error when doing LIMIT queries
Bug: 71024
Change-Id: I4dddc5c9c234b17040a28937987406511ec6ea9f
|
|
|
|
| |
Change-Id: I47fa96a976f55a1a93cb75397285edb8c7f4cd8a
|
|
|
|
|
|
|
|
|
|
| |
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I7b65fe04db431342cc58b469dc48f41a50c4e891
|
|
|
|
|
|
|
|
|
|
|
|
| |
installer.
Due to changes made to support Microsoft SQL Server, $wgDBmwschema changed its default from
"mediawiki" to null in DefaultSettings.php, as anything else horribly broke every DBMS that did
not use schemas (such as MySQL and SQLite). This change makes it so that the default value can
be properly overridden again by PostgreSQL and Microsoft SQL Server, and also enables the
--dbschema flag to the CLI installer.
Bug: 64043
Change-Id: Id364306d883e0d494b948854e05f3f79ba7dd6d2
|
|
|
|
|
|
|
| |
When private is set php side on the function, no need to have it in the
param docs.
Change-Id: Ieaeac99c131b7360b1f324244d8be6f9ff854dd2
|
|
|
|
|
|
|
|
| |
- Add in missing schema update for 1.23
- Fix detection of table/field existence
- Fix INSERT IGNORE support for cases where the primary key was being duplicated
Change-Id: Ia15673c869c2cf732ffe96f1608cee884d106ccd
|
|
|
|
|
|
|
|
|
| |
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
|