Commit graph

126 commits

Author SHA1 Message Date
Aaron Schulz
761448fe40 Merge "Export::dumpFrom() doesn't return any values, and hence neither do any of the methods calling it (return $this->dumpFrom)" 2012-04-09 17:37:06 +00:00
Reedy
6b1ca85051 Export::dumpFrom() doesn't return any values, and hence neither do any of the methods calling it (return $this->dumpFrom)
Remove return statements and extra from upstream callers

Change-Id: Ibad983128ef601e9fab5538d9ec02963e024b0a6
2012-04-07 17:34:51 +01:00
Reedy
f080092e1a Make $procOpenResource protected as it's used on line 1011 in the Dump7ZipOutput subclass
Change-Id: If6a3a52b44d8a8c57f850bda515bdb307ce596d8
2012-04-07 17:26:06 +01:00
Christian Aistleitner
2c879b3818 Unbuffered queries result freeing & error handling
Puts result set ownership back into producer, and tries to restore the
database buffering upon exceptions during dumps

Change-Id: Ie3e2b5b39cc6cef25a0021694e7a53a92b1dff5b
2012-04-03 20:37:41 +02:00
Christian Aistleitner
5b31b92146 Allow closing dump output multiple times
Change-Id: Iab0645fb348f7256ab5cedf95b8a4424458ff4fc
2012-04-02 01:52:37 +02:00
Christian Aistleitner
0923acea72 Avoid doubling dump output
Change-Id: Ied8b8730cf1cd4a77346fbcae9013c9b6493dc8f
2012-03-30 22:28:29 +02:00
Christian Aistleitner
66c5335d29 Closing dump buffers on stream end
Change-Id: I7bef095f2f9189fb20064da4fd09ed4caa7a90e5
2012-03-26 11:26:48 +02:00
Aaron Schulz
35208039c4 Put the sha1 tag in <revision> and not wrongly in <page>
Change 1: while at it, also don't show the SHA1 if rev_deleted is set

Change-Id: I0d94338915e754bdee878d1e6570e2efc481b2b2
2012-03-23 13:29:05 -07:00
Sam Reed
c8eb4467f1 Fix user related direct member variable access 2012-02-16 00:54:34 +00:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Diederik van Liere
22746a5807 Add the new SHA1 revision field to the XML export, add SHA1 field to export-0.6.xsd and fix namespace element from string to integer. 2012-01-23 19:48:20 +00:00
Brion Vibber
707dfa9235 Revert r108764: doesn't appear to do what it says in the description, and no explanation why it's being done (presumably would just break searches again?) 2012-01-12 22:17:54 +00:00
Diederik van Liere
8bc7a18392 This commit restores getPrefixedText() to the Title in the XML. This means it does not break anything, the only change is that there is a new separate element that contains the namespace.
This commit is a follow up to:
r102575: Commit to fix bug 30513.
2012-01-12 21:34:55 +00:00
Niklas Laxström
6f91eb677a Followup r103945 - @since and whitespace 2011-12-24 14:40:59 +00:00
Sam Reed
c8102513e5 * (bug 32414) Empty page get a empty bytes attribute in Export/Dump
Pushing the values through intval seems enough, null -> 0


reedy@fenari:/home/wikipedia/common$ mwscript eval.php dewiki
> $var = null;

> var_dump( intval( $var ) );
int(0)

> var_dump($var );
NULL
2011-12-11 19:01:11 +00:00
Sam Reed
a9702c53af Fix use of undefined $file
Reduce code duplication in Dump7ZipOutput
2011-12-11 18:51:44 +00:00
Brion Vibber
53f5c13995 Followup r103945: fix regression in XML export namespace formatting for namespaces with spaces in them (eg 'User talk')
The changes in r103945 for bug 32376, bug 31697 accidentally let underscore-forms through for the namespace portion, when we're supposed to have the space form. Causes problems with search indexing.
2011-11-24 01:26:52 +00:00
Brion Vibber
8115df20ab * (bug 32376) XML export tweak to use canonical user namespaces instead of gendered ones for now
The gendered namespaces aren't listed in the <siteinfo> namespaces list, and just adding them as-is may break reader implementations.
Using the canonical form should have little effect on most activity while keeping things working.

Should resolve Lucene search problems (bug 31697) related to the Lucene search indexer not understanding the gendered namespace names.
After fix and reindex, the canonical forms should get returned and automatically transformed back into appropriate gendered forms in the search view.

[per IRC discussion check-up with Ariel about this bug and the patches on bug 30513 which cover related namespacey issues]
2011-11-22 19:33:53 +00:00
Ariel Glenn
d23fe7bcc3 followup to r103448, tighten up code 2011-11-18 09:08:29 +00:00
Ariel Glenn
81cc6c7b4c if user id is 0 and username is actually an IP, write it as <ip>, not <username> 2011-11-17 09:20:51 +00:00
Platonides
ba7c210f12 Fixup for r102875 parse error.
The post-commit hook is *again* not working...
2011-11-13 19:58:24 +00:00
Diederik van Liere
5589f55de8 This patch fixes rev. 102575. 2011-11-13 01:50:24 +00:00
Diederik van Liere
eadfd5a581 Commit to fix bug 30513. 2011-11-09 21:15:48 +00:00
Chad Horohoe
8b947409d9 Address fixme on r101606, should also call from $this 2011-11-03 00:41:12 +00:00
Ariel Glenn
06171d19bd clean up duplicated code, for fixme in r97178 2011-11-02 11:08:06 +00:00
Ariel Glenn
c8aa188e07 corrections for fixme in r96486 2011-11-02 09:55:43 +00:00
Ariel Glenn
669e5b9318 export specified range of revisions (as stubs) 2011-11-02 07:58:43 +00:00
Ariel Glenn
2a14ecd921 remove cruft that didn't all get cleaned up before commit in r95260, addressing fixme. 2011-09-22 07:03:25 +00:00
Sam Reed
27ec1d6377 Comment out unreachable code
Remove unreachable return false;
2011-09-21 16:34:23 +00:00
Ariel Glenn
443933fef5 throw exception if rename of output file fails 2011-09-15 17:18:13 +00:00
Ariel Glenn
be36f6e1fe getFilename renamed to getFilenames since it can return a list 2011-09-09 07:28:11 +00:00
Ariel Glenn
aed738967f get rid of duplication, remove unused function rename(), add documentation as per comments on r95260 2011-09-07 20:21:52 +00:00
Roan Kattouw
e1978da7a3 Fix parse error in r96275 2011-09-06 22:17:01 +00:00
Roan Kattouw
165a42ad11 Stylize Export.php 2011-09-05 11:23:49 +00:00
Roan Kattouw
6e336d3799 Whitespace fixes for r95272, r95604 2011-09-05 11:22:57 +00:00
Roan Kattouw
e9658c4b9e Fixes for r95260:
* Use protected instead of var
* Move documentation of closeRenameAndReopen() to parent class. Add a TODO for the other undocumented methods introduced in r95260
* Use the correct method name in the exceptions by using __METHOD__; messages were copypasted from one method to the other without changing anything. Also fix a typo ("argumnts")
* Minor coding style bit, will commit more style fixes in a minute
2011-09-05 11:16:09 +00:00
Ariel Glenn
0dcd589b6b define and use closeAndRename() after last write of xml dump file; convert from popen (child inherits all open descriptors and there is no workaround) to proc_open (CLOEXEC set on all descriptors), needed so close and rename doesn't hang forever if a child (prefetcher) is forked 2011-08-27 18:31:03 +00:00
Ariel Glenn
431bce6c78 replace WfDie() 2011-08-27 15:50:17 +00:00
Ariel Glenn
da81194225 add functions that support close and rename of output files as they are being written, used to write out checkpoint files at regular intervals during XML dump production 2011-08-22 22:01:32 +00:00
Roan Kattouw
16e540e5c3 * Introduce File::getCanonicalUrl()
* Make File::getFullUrl() use PROTO_RELATIVE for consistency with other methods named getFullUrl() and to prevent cache pollution
* Use canonical URLs in Export.php
2011-08-19 15:27:49 +00:00
Sam Reed
b0d659bb21 Uncommited documentation from my working copy 2011-06-25 16:15:44 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Bryan Tong Minh
89601ad230 Follow-up r87176 use wfLocalFile instead of wfFindFile 2011-05-15 10:43:51 +00:00
Happy-melon
fd34d0354b * Implement MW_VERSION constant in Defines.php and use it in preference to $wgVersion. Defines.php will have been loaded anywhere that DefaultSettings.php has been loaded.
* Move the declaration of $wgFeedClasses from Defines.php to WebStart.php
2011-05-07 14:53:08 +00:00
Bryan Tong Minh
9b3128eb2b Add support for importing/exporting files. This can be done by embedding the image as base64 in the XML stream or by copying the images directory manually and pointing the importer to the base images directory.
Currently only backend code available and a few member variables need to be modified to enable the functionality.

Export.php: 
* Add <rel> and <sha1base36> elememnts to the XML output
* Add optional <archivename> and <contents> elements to the XML output. <contents> contains an encoding attribute, which is currently only set to base64.
Import.php:
* Add Import::$mImageBasePath which should point to the images/ directory to import from
* Add methods to WikiRevision (terrible name btw) to set the rel, hash, archivename and filesrc.
* Cleanup and made WikiRevision::importUpload working. It's still quite a mess though
OldLocalFiel.php:
* Fix a few timestamp related things from r85635
2011-04-12 19:25:56 +00:00
Happy-melon
38475c650b Clean up some direct $db->query($sql) calls. Remove limit/offset parameters from Article::getContributors() as they weren't being used anywhere and probably didn't work properly anyway. 2011-04-12 12:09:11 +00:00
Bryan Tong Minh
743f844031 Revert r85644. Multipart sucks because it is hard to parse and because you need to seek into the stream. I'll follow up with a solution that allows embeding data in the stream. 2011-04-09 14:43:12 +00:00
Bryan Tong Minh
40a0a0431e Second part of bug bug 22881: Allow exporting files along with the XML as mimepart/related file. The patch attached to that bug was unfortunately not up to coding standards, so I rewrote this part myself. 2011-04-07 21:44:44 +00:00
Bryan Tong Minh
922814b177 Stylize Export.php 2011-04-07 21:04:16 +00:00
Platonides
49074e8a56 Yet more additions of wfProfileOut() 2011-02-10 16:39:53 +00:00