aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/dumpTextPass.php
Commit message (Collapse)AuthorAgeFilesLines
* add `use MediaWiki\Maintenance\Maintenance` to some maintenance classesNovem Linguae2024-11-121-0/+3
| | | | | | | A–F. Still need to do F–Z. Bug: T353458 Change-Id: Ieb4bad0658b9cddc9403c6a55ef3bd1245aa08ae
* Exclude boilerplate maintenance code from code coverage reportsDreamy Jazz2024-08-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * Maintenance scripts in core have bolierplate code that is added before and after the class to allow directly running the maintenance script. * Running the maintenance script directly has been deprecated since 1.40, so this boilerplate code is only to support a now deprecated method of running maintenance scripts. * This code cannot also be marked as covered, due to PHPUnit not recognising code coverage for files. * Therefore, it is best to ignore this boilerplate code in code coverage reports as it cannot be marked as covered and also is for deprecated code. What: * Wrap the boilerplate code (requiring Maintenance.php and then later defining the maintenance script class and running if the maintenance script was called directly) with @codeCoverageIgnore comments. * Some files use a different boilerplate code, however, these should also be marked as ignored for coverage for the same reason that coverage is not properly reported for files. Bug: T371167 Change-Id: I32f5c6362dfb354149a48ce9c28da9a7fc494f7c
* Update name & email for bvibberBrooke Vibber2024-02-081-1/+1
| | | | | | | | | | | | | Updating name & email addresses for Brooke Vibber. Re-ran updateCredits.php as well so there are some new entries in there as well. There are a couple of files in resources/libs that will have to be changed upstream to keep tests happy, I will do patches later. :D Change-Id: I2f2e75d3fa42e8cf6de19a8fbb615bac28efcd54
* move most of dumpTextPass to an include file so it can be subclassedAriel T. Glenn2019-05-131-993/+1
| | | | | Bug: T164262 Change-Id: I9b3c54503dd9ad193af7765459613a7e73ffbb45
* Replace deprecated function wfEscapeShellArg with Shell::escape()Derick Alangi2019-04-071-2/+3
| | | | Change-Id: I4046d593d1450cfffc489ca2abadba1084a540e4
* fix up new text address handling in page content dumpsAriel T. Glenn2019-03-251-0/+1
| | | | | | | Broken in I979b6c8f0a72bc1f5ecce1d499d3fdfa0f671588 Bug: T174031 Change-Id: Ia31fc7b559f59d53bb503a59abf9110f0e65178c
* Make the XML dump schema version configurable.daniel2019-03-211-21/+15
| | | | | Bug: T174031 Change-Id: I979b6c8f0a72bc1f5ecce1d499d3fdfa0f671588
* Make BackupDumper MCR compatible (main slot only)daniel2019-03-141-23/+56
| | | | | | | | | | | | | | | | | | | | | | This makes BackupDumper compatible with the new mechanism for accessing revision content. This requires some changes to the way database connections are re-used, since RevisionStore/SqlBlobStore needs to be able to run queries against the database while the overall result set is being streamed. This change does not yet add handing for extra slots to BackupDumper. That first needs a spec for how extra slots will be represented in the XML schma (T174031). NOTE: this changes the output of fetchText from using integer text_id values to using content_address values (e.g. "tt:4567" for text row with old_id 4567). It also changes fetchText to accept such addresses as input, for forward-compatibility. XML stub dumps still use the numeric format in the id attribute, pending T199121. Bug: T198706 Change-Id: If4c31b7975b4d901afa8c194c10446c99e27eadf
* Merge "maintenance: Move backup.inc to a regular php class file"jenkins-bot2018-08-221-1/+1
|\
| * maintenance: Move backup.inc to a regular php class fileTimo Tijhof2018-08-021-1/+1
| | | | | | | | | | | | | | | | Move the class to maintenance/includes/, following the precedent set by d7886920762. Bug: T184782 Change-Id: I0ba86e4401e2c97db4cf2ad9f0e78c04b5565ee8
* | Add the 'full' option explicitly to dumpTextPass.php.Ariel T. Glenn2018-08-131-0/+1
| | | | | | | | | | | | | | | | | | Broken since 4abb45939234fe94ce1a78f3ef171a01b2e40511 (2015) but hidden since maintenance scripts would pass through all opts, even those not specifically added. Bug: T201803 Change-Id: Ic55bf3d970d768b796848a77abf7b0eb6616c013
* | Mass conversion of $wgContLang to serviceAryeh Gregor2018-08-111-5/+4
|/ | | | | | | Brought to you by vim macros. Bug: T200246 Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a
* Fix PhanTypeMismatchDeclaredParamUmherirrender2018-07-071-1/+1
| | | | | | Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
* Replace wfGetLBFactoryUmherirrender2018-02-271-1/+3
| | | | | | @deprecated since 1.27 Change-Id: I11a7253cebe525948a55cebee183e6de128fdc39
* Update suppressWarning()/restoreWarning() callsReedy2018-02-101-4/+4
| | | | | Bug: T182273 Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
* Use ::class to resolve class names in maintenance scriptsUmherirrender2018-01-231-1/+1
| | | | | | | This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
* Move BaseDump into includes/export/Chad Horohoe2018-01-081-3/+0
| | | | | | | There's no reason for this to have to live in Maintenance land. It's generally useful and lets us avoid some random require/include calls Change-Id: I60419c7f9fc52313905053bbeb3aa81666c9160c
* make 7zip wrapper usable for dumping text revisions againAriel T. Glenn2017-12-231-0/+1
| | | | Change-Id: Ic9c5ad284b542c15f4ab48b5459f00e188a4301a
* Remove empty lines at begin of function, if, foreach, switchUmherirrender2017-07-011-1/+0
| | | | | | Organize phpcs.xml a bit Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
* Fix TextPassDumperDatabaseTest::testPrefetchPlain postgres failuresAaron Schulz2017-05-261-2/+6
| | | | | | | | | | | | The insertId() method was returning a string, which caused the returnValueMap not to trigger due to int/string mismatches. Also add sanity integer cast to WikiPage::insertOn(). Added a few more type docs. Bug: T75174 Change-Id: Id1090f3e3d0481272a3d13c3af8f2588f06dc912
* Use IDatabase type hints in /maintenanceAaron Schulz2017-04-071-2/+2
| | | | | | Relatedly, move lockTables()/unlockTables() to IMaintainableDatabase Change-Id: Ib53e9fa948deb2f9a70f0ce16c002613d0060bf9
* Move remaining LoadBalancer classes to RdbmsAaron Schulz2017-02-231-2/+2
| | | | | | The old names are left as aliases. Change-Id: I52a327f2463a2ba7437324047b5b00d28cd1d758
* Replace DatabaseBase => Database in more placesAaron Schulz2016-09-281-1/+1
| | | | Change-Id: If37a7909056bf2c31a8228cbc84f0fbbf5f1c517
* 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
* Fix a few incorrect annotationsErik Bernhardson2016-06-301-0/+3
| | | | | | | | Found by applying etsy/phan to the mediawiki codebase, in preparation for getting it running more regularly via CI. Has no effect on how the code runs, simply does a better job of documenting the code. Change-Id: I4c844a51df3ffe4fbb96cac25f3eff2f7a9faca2
* Convert all array() syntax to []Kunal Mehta2016-02-171-22/+22
| | | | | | | | | | 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
* Fix a bunch of call-time pass-by-reference errorsMax Semenik2016-02-101-3/+3
| | | | Change-Id: I3bd8e7c4d2dca465957a353cb7dc2a906699ff6a
* Use addDescription() instead of accessing mDescription directlyMax Semenik2016-01-301-2/+3
| | | | Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
* Refactor dumpBackup.php and dumpTextPass.php to be Maintenance subclassesThis, that and the other2015-12-311-32/+950
| | | | | | | | | | | | | | | | | | | | Use the Maintenance class's new $orderedOptions and support for passing options multiple times. This allows for option "chaining". The BackupDumper and TextPassDumper class now extend Maintenance, but should continue to function as before. The public function processArgs() has been removed and replaced by processOptions(), which takes no parameters. It is unlikely that users of these classes were calling processArgs. Inheritors of these classes that overrode processOption() will now need to override processOptions() and use Maintenance::getOption() and friends. The maintenance/backupTextPass.inc file has been deleted. Users should include maintenance/dumpTextPass.php instead. Bug: T122587 Change-Id: I2473ee119c185d1b2b00ac4b1e70ee8a6cafe4a3
* Allow to set stub read buffer size for TextPassDumperChristian Aistleitner2015-02-201-0/+2
| | | | | | | | | The default buffer size of 512KB seems to unconveniently high for checkpoint tests. To be able to speed up tests in a follow-up commit, we allow callers to set the buffer size to use for reads of the stub. Bug: T70653 Change-Id: Ib63e89fac2abaac8feb542839d4d8e53c917ebe1
* Update formatting in maintenance/ (2/4)Siebrand Mazeland2014-04-231-1/+1
| | | | Change-Id: I2b791d3bff0de464b6bdaaeae0622c065389c31c
* Change URLs to mediawiki.org in comments to HTTPSLadsgroup2014-03-201-1/+1
| | | | | | | These are only documentation fixes http://www.mediawiki.org --> https://www.mediawiki.org Change-Id: I62ad42be1a3aac410cc53e98ce79389ceddd8988
* Fixed spacingumherirrender2013-11-211-1/+0
| | | | | | | | - Removed trailing spaces in comments - Removed multiple empty lines - Removed space after object operator Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
* phpcs: More require/include is not a functionTimo Tijhof2013-05-211-2/+2
| | | | | | | | | | | | | Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81. Also updated usage in text in documentation and the installer LocalSettingsGenerator. Most of them were handled by this regex: - find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$ - replace: $1 $2; Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
* style: normalize end of filesAntoine Musso2013-02-031-2/+0
| | | | | | | | | | | | By PSR2 PHP Standard, the files should ends with exactly one newline. Some of our files have 2 or more and some other were missing a newline. Fix almost all occurences of CodeSniffer sniff: PSR2.Files.EndFileNewline.TooMany I have not fixed the selenium files, I believe we will drop them. Change-Id: I89fca8c1786fee94855b7b77bb0f364001ee84b6
* Use __DIR__ instead of dirname( __FILE__ )jeroendedauw2012-08-271-2/+2
| | | | | | We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :) Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
* Make backupTestPass.inc require_once by itself its dependence on backup.incPlatonides2012-05-061-2/+1
| | | | | | Change path-less requires to full path ones. Change-Id: Ida37a3ec9bb1d5c99f4bbbf6d967cb40d0442e38
* TextPassDumper -> backupTextPass.incChristian Aistleitner2012-04-031-728/+1
| | | | Change-Id: I68e744251ca5d8dc61d08a840751bf5a667d496c
* Code reformattingChristian Aistleitner2012-03-221-48/+48
| | | | Change-Id: I40a108216045aad9496bbbf723de2f42b084d009
* Refactoring dumpTextPass's error handlingChristian Aistleitner2012-03-221-71/+171
| | | | Change-Id: I9c0af860ca97489222b3cec071ed721ce72ad9e5
* Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, ↵Roan Kattouw2012-03-211-173/+71
| | | | | | | | | r113893, r113894, r113952, r114047, r114252, r114256, r114257. This reverts the remaining 'new' revisions in core. All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/114335
* Follow-up to r114256: Removing final assertChristian Aistleitner2012-03-201-2/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/114257
* Follow up to r114252: Removing assertsChristian Aistleitner2012-03-201-5/+6
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/114256
* Refactoring dumpTextPass's error handlingChristian Aistleitner2012-03-201-71/+174
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/114252
* Fixing up undefined types in maintenance documentationSam Reed2012-02-091-0/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111092
* Remove some unused getting of non existent argumentsSam Reed2011-10-181-21/+27
| | | | | | | Documentation Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100130
* add mwscript handling for call of fetchText.php maintenance scriptAriel Glenn2011-09-231-6/+17
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/97895
* handle naming checkpoint file with first/last pageID when the file is emptyAriel Glenn2011-09-231-2/+13
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/97889
* getFilename renamed to getFilenames since it can return a listAriel Glenn2011-09-091-3/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96648
* uniform comment style, fix a few space issues, address couple issues from ↵Ariel Glenn2011-09-081-39/+29
| | | | | | | comments on r95272 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96616