Current configuration on the wiki
Find a file
Tim Starling 673d496f2d Have Database::addQuotes() pass through bare integers without quoting
Quotes started being added to integers in r4984 (August 2004). Before
that, is_numeric() was used to determine whether to add quotes, so
quotes were omitted from numeric strings, which is obviously wrong.

The idea here is to use the type of the variable to hint to the database
as to whether quotes are needed. The results are somewhat inconsistent,
since some callers do not convert numeric strings obtained from user
input to integers. That makes it a more conservative change. Callers can
opt out of unquoted integers by casting them to string.

The reason for doing this is that quoting integers turns out to be not
as harmless as originally assumed. We found a case of it confusing the
MariaDB query planner, causing inappropriate indexes to be used.

I also made addQuotes() consistently return a string, instead of
returning an integer for boolean values. This was already the case for
MySQL, but it seems like a good idea everywhere.

Bug: T238378
Change-Id: I70473280f542ee5ecd79e187f580807410fbd548
2019-11-18 11:40:28 +11:00
.phan Remove traling double newlines from text files 2019-10-23 21:17:43 +02:00
.pipeline Exit on error for .pipeline/dev_prereq.sh 2019-11-04 13:13:13 -08:00
cache
docs Fix ApiQuerySiteinfo class name capitalization 2019-11-08 16:58:11 +01:00
extensions
images
includes Have Database::addQuotes() pass through bare integers without quoting 2019-11-18 11:40:28 +11:00
languages Merge "Improve error message for HTML multiselect fields" 2019-11-14 11:52:36 +00:00
maintenance cleanupUsersWithNoId.php: Handle missing fields 2019-11-13 08:40:52 +00:00
mw-config Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
resources Remove unused file mediawiki.special.preferences.styles.css 2019-11-14 21:50:47 +01:00
skins Make skins/README looks like extensions/README file 2019-05-08 15:41:32 +02:00
tests Have Database::addQuotes() pass through bare integers without quoting 2019-11-18 11:40:28 +11:00
.editorconfig
.eslintrc.json build: Update linters and fix errors 2019-10-23 11:22:41 +01:00
.fresnel.yml build: Set Fresnel scenario run count to 7 2019-04-13 00:38:13 +01:00
.gitattributes Define unit and integration test suites 2019-06-28 12:18:18 -04:00
.gitignore Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07:00
.gitreview
.mailmap Update CREDITS ahead of 1.34.0 release via updateCredits 2019-10-15 16:44:52 +00:00
.phpcs.xml Add missing @param and @return to documentation 2019-11-13 17:26:55 +01:00
.stylelintrc.json linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs) 2019-04-12 10:18:45 -07:00
.travis.yml Travis: test on PHP 7.4, allowing failures 2019-10-08 23:50:49 +00:00
api.php HHVM removal: Drop HHVM code path for Exception not Throwable in API code 2019-10-02 17:06:56 -07:00
autoload.php Rewrite cdb.php to use Maintenance 2019-11-11 20:17:40 -08:00
CODE_OF_CONDUCT.md docs: Exclude extra markdown files from Doxygen 2019-09-13 16:35:49 +00:00
composer.json Update wikimedia/assert from v0.2.2 to v0.4.0 2019-11-11 06:17:49 +00:00
composer.local.json-sample
COPYING
CREDITS Update CREDITS ahead of 1.34.0 release via updateCredits 2019-10-15 16:44:52 +00:00
FAQ
Gruntfile.js ParamValidator: Use MessageValue! 2019-11-01 15:49:31 -04:00
HISTORY Fix ApiQuerySiteinfo class name capitalization 2019-11-08 16:58:11 +01:00
img_auth.php Use Mustache template in img_auth.php 2019-10-05 22:57:30 +02:00
index.php Make it so that index.php displays something useful if php not installed 2019-11-01 01:58:41 +00:00
INSTALL Set minimum PHP version to 7.2.9 2019-10-10 20:31:54 +00:00
jsduck.json jquery.color: Merge $.colorUtil back into this module 2019-09-11 05:12:22 +01:00
load.php Avoid using "enqueue" mode for deferred updates in doPostOutputShutdown 2019-09-30 22:59:59 +00:00
opensearch_desc.php Add MW_REST_API and MW_ENTRY_POINT 2019-09-03 11:43:18 +10:00
package-lock.json build: Update linters and fix errors 2019-10-23 11:22:41 +01:00
package.json Remove unnecessary devDependency 2019-10-29 11:13:59 +00:00
phpunit.xml.dist Discover unit tests in "Unit" directory 2019-09-04 15:49:58 +02:00
README Revert "change phabricator URL" 2019-05-27 06:05:45 +00:00
README.mediawiki
RELEASE-NOTES-1.35 Merge "Update wikimedia/assert from v0.2.2 to v0.4.0" 2019-11-12 08:28:49 +00:00
rest.php Add MW_REST_API and MW_ENTRY_POINT 2019-09-03 11:43:18 +10:00
SECURITY
thumb.php Avoid using "enqueue" mode for deferred updates in doPostOutputShutdown 2019-09-30 22:59:59 +00:00
thumb_handler.php Add MW_REST_API and MW_ENTRY_POINT 2019-09-03 11:43:18 +10:00
UPGRADE

== MediaWiki ==

MediaWiki is a free and open-source wiki software package written in PHP. It
serves as the platform for Wikipedia and the other Wikimedia projects, used
by hundreds of millions of people each month. MediaWiki is localised in over
350 languages and its reliability and robust feature set have earned it a large
and vibrant community of third-party users and developers.

MediaWiki is:

* feature-rich and extensible, both on-wiki and with hundreds of extensions;
* scalable and suitable for both small and large sites;
* simple to install, working on most hardware/software combinations; and
* available in your language.

For system requirements, installation, and upgrade details, see the files
RELEASE-NOTES, INSTALL, and UPGRADE.

* Ready to get started?
** https://www.mediawiki.org/wiki/Special:MyLanguage/Download
* Looking for the technical manual?
** https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents
* Seeking help from a person?
** https://www.mediawiki.org/wiki/Special:MyLanguage/Communication
* Looking to file a bug report or a feature request?
** https://bugs.mediawiki.org/
* Interested in helping out?
** https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute

MediaWiki is the result of global collaboration and cooperation. The CREDITS
file lists technical contributors to the project. The COPYING file explains
MediaWiki's copyright and license (GNU General Public License, version 2 or
later). Many thanks to the Wikimedia community for testing and suggestions.