aboutsummaryrefslogtreecommitdiffstats
path: root/includes/site
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor LoadBalancer cleanupsAaron Schulz2016-10-061-6/+0
| | | | | | | | * Close the master connection in safeWaitForMasterPos() if created. * Remove unnecessary reuseConnection() calls. * Add DOMAIN_ANY constant for readability. Change-Id: I9e64a7405e0eedc50e7b93d05d65cf00d5544a77
* Rename DB_SLAVE constant to DB_REPLICAAaron Schulz2016-09-051-1/+1
| | | | | | | | | This is more consistent with LoadBalancer, modern, and inclusive of master/master mysql, NDB cluster, and MariaDB galera cluster. The old constant is an alias now. Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
* Canonicalise '@deprecated since' doc commentsBartosz Dziewoński2016-08-021-2/+2
| | | | Change-Id: I440041512feb47a998efb45e76e3fd00e0655752
* Mock Http in MediaWikiPageNameNormalizerTest and add more test casesMarius Hoch2016-06-241-1/+17
| | | | | Bug: T138570 Change-Id: Ia156ba61afb90c9a3b1a2e1e0bf967056bd87fc8
* Revert "Map dummy language codes in sites"Aude2016-06-092-40/+5
| | | | | | | | | | | This is causing duplicate English Wikipedia interwiki links. The second link is supposed to be for Simple English, but instead is linked to English Wikipedia. This reverts commit 1c1c74adef8a2f5597472e8c049010ff4d42ff64. Bug: T137404 Change-Id: Ibc1c53ec1b8e643b47ad52f38a8496acfb399d65
* Map dummy language codes in sitesAdrian Heine2016-06-072-5/+40
| | | | | | | | | | | | | | | | The script that populates the sites table assumes that the subdomain is the content language code. This is not true for all wikis. This patch introduces a mapping to fix this issue on the fly, based on $wgDummyLanguageCodes. This is driven by the need to avoid "bad" language codes when creating wikidata items from the client, when "linking" two pages on different wikis. When we do this, we use the language code from the sites table for the labels of the new item. We would like to forbid "dummy" languages in labels and descriptions, for consistency. Change-Id: I6452761e14d9902bb069e32d0f499bc39e680453
* Revert "Allow reset of global services."Catrope2016-04-111-2/+0
| | | | | | | | Completely breaks login. This reverts commit 8e7a0a0912bb98a4a12375b354e23f03262bf213. Change-Id: Ide7ab5632e987e81374c21173df6ab3998649df7
* Allow reset of global services.daniel2016-04-111-0/+2
| | | | | | | | | | | | This change provides a mechanism to reset global service instances in an orderly manner. There are three use cases for this: * the installation process * forking processes * integration tests (which must of the existing phpunit tests are) Depends-On: I5d638ad415fc3840186a0beaa09ac02ea688539b Change-Id: Ie98bf5af59208f186dba59a9e971c72ea0b63e69
* Merge "Introduce top level service locator."jenkins-bot2016-04-032-25/+39
|\
| * Introduce top level service locator.daniel2016-04-022-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The service locator, MediaWikiServices, is intended to facilitate "manual" dependency injection in static entry points. See also the Dependency Injection RFC T384 and Service Locator RFC T124792 for details. The following key points were implemented according the discussion surrounding these RFCs: * a configurable DI container that allows extensions to add and replace services. * no auto-wiring, since it's prone to add confusion in large and complex applications. * no 3rd party framework, since they typically do too much. The following services in MediaWiki core are made accessible via the service locator mechanism to showcase the bootstrapping mechanism: * ConfigFactory and MainConfig * SiteLookup and SiteStore However, the implementation of these services was not yet converted to using proper DI throughout the code. Bug: T124792 Change-Id: I3c25c0ac17300d3dd13e1cf5100558a605eee15f
* | Remove MediaWikiSite::newFromGlobalId (deprecated since 1.21)Florian2016-04-011-14/+0
|/ | | | | | | Isn't used anymore anywhere. Bug: T122754 Change-Id: I95b20c005721837dcbf9ab979674ac09c460cdd0
* Always use 'bool' instead of 'boolean' in Doxygen tagsRicordisamoa2016-03-241-2/+2
| | | | | | Just like commit f86a5590aae7fbe6d9b8a3d129c7a04a11a27579 Change-Id: Ic9d08bca6524d6bb4baf5170c081ad0f3d738e28
* Convert all array() syntax to []Kunal Mehta2016-02-179-56/+56
| | | | | | | | | | 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
* Factor page name normalization out of MediaWikiSiteMarius Hoch2016-01-042-136/+206
| | | | | | | | | Into a new MediaWikiPageNameNormalizer. The code has been copied over almost 1:1, I only left the phpunit test special handling in MediaWiki site. Change-Id: I008cadd29a2aa1f21098339b895c35a100959b04
* build: Update mediawiki/mediawiki-codesniffer to 0.5.1Paladox2016-01-021-3/+2
| | | | | | | | | Two rules are ignored for now to allow us to upgrade: * MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures * Generic.ControlStructures.InlineControlStructure.NotAllowed Also ignore the .git folder. Change-Id: I1b149c72b27be54e22e369999ad0c41c2d1fc2b4
* Remove deprecated SiteObject and SiteArray classesaude2015-11-042-12/+0
| | | | | | | SiteObject and SiteArray were deprecated in 1.21 and can't find any use of them anywhere else in gerrit. Change-Id: Iff3ba8a60ac9566998cce828c4034066fdefe804
* Site: fix copy-n-paste phpdocBryan Davis2015-10-071-2/+2
| | | | Change-Id: I5e735089b3dacea94044fa96f821fc47940f7029
* Remove ORM use from DBSiteStoreBrad Jorsch2015-10-062-145/+80
| | | | | | | | | | | | | This loses something of the genericity of the former DBSiteStore (i.e. it's now tied to MediaWiki's database and sites table, and subclasses and users can't easily override that), but nothing in core or extensions in Gerrit was using that genericity so it's probably no big loss. Further, T113034 (an RFC to actually use this 'site' stuff for its original purpose) proposes getting rid of SiteStore anyway. Bug: T114538 Change-Id: I7e7ca257451e6307a7e5bb11fd393283d0d19e77
* Fix issues identified by SpaceBeforeSingleLineComment sniffVivek Ghaisas2015-09-263-5/+5
| | | | Change-Id: I048ccb1fa260e4b7152ca5f09b053defdd72d8f9
* Some bugzilla.wikimedia.org -> phabricator.wikimedia.org changesumherirrender2015-09-241-2/+2
| | | | | | | | Changed some old bugzilla links to new phabricator links in comments, test data and error message. This reduces the need for redirects from old bugzilla to new phabricator from our source code. Change-Id: Id98278e26ce31656295a23f3cadb536859c4caa5
* Enforce an alphabetic default order for SiteList entriesThiemo Mättig2015-08-061-1/+5
| | | | | Bug: T106054 Change-Id: I8bf22d99b8304d7a6f40e384e8de00a4aca9313d
* Added CachingSiteStore APC commentsAaron Schulz2015-07-251-1/+5
| | | | Change-Id: I9ed8fe42cb40beb80dc789099ca09b7a077c07bd
* Use CACHE_ACCEL for SiteLists if on HHVMMarius Hoch2015-07-191-1/+1
| | | | | Bug: T58602 Change-Id: I3eeedddeb79cfbee734cfe49fe86d32bf826040a
* Change case of class names to match declarationsKevin Israel2015-04-291-10/+10
| | | | | | | | | | | Found by running a script that uses PHP's tokenizer extension to extract class declarations and uses, then compare them: * AllMessagesTablePager * SVGReader * XML Change-Id: I960aa05b2127722ecc5ae8b165549f9e1077d3c1
* Use wikimedia/utfnormal library, add backwards-compatability layerKunal Mehta2015-03-241-1/+1
| | | | | | | | This drops support for the custom utf8 normal PHP extension in favor of the intl extension. Bug: T90825 Change-Id: Ifbaeb2ef684217cf6187ccc4fb4d303f89608300
* Merge "Split SiteLookup interface from SiteStore"jenkins-bot2015-03-198-430/+616
|\
| * Split SiteLookup interface from SiteStoreaude2015-03-188-430/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SiteLookup interface is added, and SiteStore extends it. (any SiteStore type hints can be changed to use SiteLookup if all they need is lookup functionality) * Memcached based SiteStore code is split from the database SiteStore, and SiteSQLStore is deprecated. If no caching is desired when using a SiteStore, then use a SiteDBStore instance, instead of passing $source parameter in SiteStore::getSite and SiteStore::getSites. * SiteListFileCache renamed to FileBasedSiteLookup and implements SiteLookup. Bug: T77990 Change-Id: I36b599884c211580ea6806a8a190c65c4f9087cf
* | Fix phpcs errors and warnings in includes/siteKunal Mehta2015-03-151-3/+9
|/ | | | Change-Id: Id6ae5659af6062b92bb964f1f0951e61408725ec
* Profile all external HTTP requests from MWChad Horohoe2015-03-031-1/+1
| | | | Change-Id: Ie980b080da2ef21ec7d9fc32f1accc55710de140
* Introduce HashSiteStore, mainly for use in testsaude2015-02-271-0/+117
| | | | | | | | | | | | HashSiteStore comes from Wikibase (see I783bd95), where it was called MockSiteStore. This enables some phpunit tests, related to Site objects, to no longer depend on a database, memcached or other external storage. This makes tests faster and more simple. Bug: T90874 Change-Id: I048d37bd2aaa5f17c9fe16b2855df8bf9fe7bc8c
* Maintenance script for exporting site definitionsdaniel2015-02-201-0/+114
| | | | | Bug: T87178 Change-Id: I40fd6aaa8f47bad3d595d5c190036bf04d13c12a
* Maintenance script for importing site info.daniel2015-02-181-0/+257
| | | | | | Bug: T87176 Bug: T87183 Change-Id: I3936417bc79e08cf3d04270158a6e483b5515246
* Remove obvious function-level profilingChad Horohoe2015-01-071-17/+0
| | | | | | | | | | | Xhprof generates this data now. Custom profiling of various sub-function units are kept. Calls to profiler represented about 3% of page execution time on Special:BlankPage (1.5% in/out); after this change it's down to about 0.98% of page execution time. Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
* Add documentation for SiteListFileCacheaude2014-12-191-3/+13
| | | | Change-Id: I6c5b7fdfbbd6a4e6d67bd0f4aff539ce4d97cfda
* Fixed spacingumherirrender2014-12-052-3/+3
| | | | | | | | | | - Added/removed spaces around parenthesis - Added newline in empty blocks - Added space after switch/foreach/function - Use tabs at begin of line - Add newline at end of file Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d
* Merge "Inject cache as constructor param of SiteSQLStore"jenkins-bot2014-11-281-9/+18
|\
| * Inject cache as constructor param of SiteSQLStoreaude2014-11-221-9/+18
| | | | | | | | Change-Id: If1d08d4f3451b72d7d4d1c443cf2c82842ffd20f
* | Implement SiteListFileCache and rebuild scriptaude2014-11-272-0/+239
|/ | | | | | | | | | | | Provides file-based cache of the SitesStore data, using a static json file dump of the data from the SiteSQLStore. Includes a maintenance script to rebuild the sites cache. Bug: 56602 Bug: 45532 Change-Id: Iaee4c1f9fb5d54efe01975f733ebd5c339ac106f
* Remove deprecated (since 1.21) Sites classaude2014-11-201-49/+0
| | | | | | | this is an 'alias' for SiteSQLStore and is unused afaik in Wikibase and elsewhere. Change-Id: Ibee3e2a89399b97fa4de48e52c3d527714cd0731
* Fixed spacingumherirrender2014-09-291-1/+1
| | | | | | | | | | - 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
* Replaced more trx DIY with startAtomic()Aaron Schulz2014-09-161-10/+2
| | | | Change-Id: I76662aa438ed8aa294f8ec5973c9a51fd8b7cdbf
* Made SiteSQLStore use startAtomic() instead of DIYAaron Schulz2014-09-161-8/+2
| | | | Change-Id: I3f47675646d772b4718086e2715e243da3a16bab
* Cleanup some docs (includes/[s-z])umherirrender2014-07-241-1/+1
| | | | | | | | | | - 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: Ie419638e909a47aa72a274043604247830ee1a81
* Add since to @deprecated in includes/siteumherirrender2014-07-213-6/+6
| | | | | Follow-Up: I08ffa6a97093abbe85169f664b97498c5f39bf8e Change-Id: I6c3e607a4f095ca0dcd2f240c0c483b90c16c13d
* Fixed spacingumherirrender2014-07-201-1/+1
| | | | | | | | | | - use tab as indent instead of spaces - Added space after closures "function" - Added spaces around string_concat - Added newline inside empty blocks - Removed four spaces after comma Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
* Pass phpcs-strict on includes/site/Siebrand Mazeland2014-05-094-27/+35
| | | | Change-Id: Ibc3f29e21dd5bcfd5ea641a58f8d3f641948741d
* Merge "Add 'since <version>' to @deprecated annotations"jenkins-bot2014-04-221-1/+1
|\
| * Add 'since <version>' to @deprecated annotationsBartosz Dziewoński2014-04-151-1/+1
| | | | | | | | Change-Id: Ief96d55aa95f657a38a62ae3dde1ef7a415ff675
* | Fixed some @params documentation (includes/*)umherirrender2014-04-195-31/+32
|/ | | | | | | | | 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: Iced714bca004756b461b66067a49a925a7e3b877
* Fix [missing] variables in @param docsumherirrender2014-04-061-1/+1
| | | | | | | Two places found without variable, one without $ and one only missed a space before $ Change-Id: Iacd7c386d57223f3a112b59cd11383ef5c0ac2f1