Commit graph

25 commits

Author SHA1 Message Date
addshore
165041b4e4 Add @since tags to WikiRevision
Change-Id: I02005184d2cb3fa50aa0a51221b40e7c621219d2
2017-03-25 00:53:09 +00:00
addshore
417bd2905c Deprecate WikiRevision::$user
This was introduced in 436a028086
but was not used there.
It also currently looks unused.

We could go ahead and just remove this now, as anything that wants
to set the $user when the property is removed would still succeed.
But lets adhere to the deprecation policy here.

Change-Id: Id47323bb1ff480a16b46107825ed5f2f861ad976
2017-03-21 23:10:40 +00:00
addshore
213acd8202 Deprecate WikiRevision::$importer
This was introduced in 9b3128eb2b
but was not used there.
It also currently looks unused, even when grepping for possible
magic usages of 'importer' and "importer".

We could go ahead and just remove this now, as anything that wants
to set the $importer when the property is removed would still succeed.
But lets adhere to the deprecation policy here.

Change-Id: I5ac16dd87a95be6a3cdd4b16988d37d1d6104749
2017-03-21 23:10:19 +00:00
addshore
fd30abb59a Deprecate WikiRevision::$fileIsTemp and fix $isTemp
Cleanup from 43d5d3b682

This commit introduces both $fileIsTemp $isTemp
It would appear that the intent was to have one property here
and it looks like both of these are meant to do the same thing.

It also looks as if both public properties are actually unused
(only used by the getter and setters)

As isTemp will now sometimes return true line 766 $autoDeleteSource
will be true in new cases.
As a result $tmpFile->autocollect(); will be called in more cases

Change-Id: I8014172fb9fd7a0e4a89d0872bafdf6c50f92646
2017-03-21 23:09:34 +00:00
addshore
11ed7a4255 Mark WikiRevision methods as public
Change-Id: If252103d4850d9c9f0607a225b7d345736658cc7
2017-03-15 14:53:19 +00:00
James D. Forrester
9635dda73a includes: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
2017-02-21 18:13:24 +00:00
Yuriy Shnitkovskiy
85a52faa37 Removed deprecated usages of Interwiki methods in core
Change-Id: Ibd25968660466c44189ccb01df1d8bec6e1b207c
2017-01-10 12:19:31 +02:00
Subin Siby
1f8b491dd2 Disable statistics update on import with maintenance/importDump.php
Disable updating statistics in importDump.php to quickly finish imports from command line.

Bug: T144600
Change-Id: Ib827c068fb20cc03aab47e3106d489f18be1dac6
2017-01-03 20:26:09 +05:30
rlot
0480391371 Added $wgHTTPImportTimeout setting
Bug: T17000
Change-Id: Ic97ae4faec173c32af38df4554831dca7068226b
2017-01-03 07:34:58 +01:00
Subin Siby
2c4a6cc7e0 Remove incorrect deprecated notice from function WikiRevision::getText()
WikiRevision::getText() was wrongly marked deprecated in 1.21.
This has been fixed.

Bug: T152282
Bug: T61113
Change-Id: I3f0e0f7fe38bd4e2001efbe17cdba6bcc90b036f
2016-12-27 13:25:47 +05:30
addshore
b12086b618 Get ConfigFactory & MainConfig from MediaWikiServices
Change-Id: Iafdd7e00747060572463ffb05aae4543f3a06163
2016-11-23 00:12:38 +00:00
daniel
4aa4e7d796 Deprecfate WikiRevision::getText
Bug: T146162
Change-Id: I60249d687ac74baca146ed28d57c9a8ebcd79fba
2016-09-20 18:35:26 +02:00
Aaron Schulz
16266edff3 Change "slave" => "replica DB" in /includes
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
2016-09-05 21:01:01 +00:00
Aaron Schulz
a4d737f229 Remove web-request usages of deadlockLoop()
Add comment discouraging use of the method. There are no problems
with deadlocks/timeouts in these code paths according to WMF logs.

Change-Id: I5b21cc423df584efa881361063000e01932cc2ea
2016-07-26 18:44:41 -07:00
Brad Jorsch
b6fce440b7 Apply $wgMaxArticleSize more exactly
$wgMaxArticleSize is defined as "maximum article size in kilobytes",
however the way it was being used in WikiImporter and EditPage was
actually allowing 1023 bytes more than the limit. Other code using the
variable was limiting it to the specified value.

Change-Id: I85e4d2146643c5ac65f27cf464a51b28d68440b0
2016-06-27 11:45:13 -04:00
Aaron Schulz
3261508d4d Cleanups to WikiRevision
* Check for blank $source variable more properly.
* Avoid use of ugly File::DELETE_SOURCE flag.
* Remove now-unused $flags parameter to uploadOld().

Change-Id: I6bc610cfead0036700b4f9a82e13f2bd9ab10f32
2016-03-23 17:27:23 +00:00
Reedy
b5656b6953 Many more function case mismatches
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
2016-03-19 00:20:58 +00:00
Reedy
1834ee3d8e Fix numerous class/function casing
Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715
2016-03-18 23:14:49 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
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
2016-02-17 01:33:00 -08:00
Andrew H
c812fa3cb3 Add maintenance script importTextFiles.php
importTextFiles.php can be used to import pages from text files
containing wikitext.

Also, added $userObj to WikiRevision so that it can accept a User
object instead of just a username.

This is a GCI task.

Change-Id: I20eaf2005bdd3d041f55d8c0b108f001c064d638
2016-01-08 00:57:11 +00:00
jenkins-bot
ab0a02f640 Merge "Restore changes to WikiRevision that were lost in cdeba4cfc7c" 2016-01-06 17:42:28 +00:00
This, that and the other
2cc10db042 Import: Try to stop revisions getting created with rev_page = 0
It seems that when two simultaneous imports of the same page are started,
we get into the situation where $pageId is 0 (or at least something that
is transformed to 0 when inserted into the DB).

I can't reproduce this locally, so I can't tell you *why* this is
happening. But what is important is to stop it from happening.

Bug: T18674
Change-Id: I79406a1ef8e5db9a31f029438f8132ef590216fe
2016-01-03 21:56:02 +00:00
This, that and the other
ec1b05892b Restore changes to WikiRevision that were lost in cdeba4cfc7
The commit cdeba4cfc7 unintentionally "reverted" part of commits
0623aeb922 and b14d581dab.

Change-Id: I19334bd6b871ab0555c6db873a67e935011aaaa4
2016-01-04 00:55:35 +11:00
georggi
37df726394 Import: Handle uploads with sha1 starting with 0 properly
Bug: T65010
Change-Id: Ia3f2d0b02a0f60df88f9466b66f1c7f5dc870c10
2016-01-03 14:00:35 +02:00
Krzysztof Zbudniewek
cdeba4cfc7 Split classes in Import.php into separate files
Bug: T122532
Change-Id: Ic4463ab8d3a7b2779f43efb92cb790dbc1d88064
2015-12-29 00:42:33 +01:00