Localisation updates for core messages from Betawiki (2008-06-23 22:55 CEST)
[lhc/web/wiklou.git] / includes / Export.php
index 5605b66..7d0a824 100644 (file)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
+/**
+ * @defgroup Dump Dump
+ */
 
 /**
- *
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage Dump
  */
 class WikiExporter {
        var $list_authors = false ; # Return distinct author list (when not returning full history)
        var $author_list = "" ;
-       
+
        var $dumpUploads = false;
 
        const FULL = 0;
@@ -44,13 +46,13 @@ class WikiExporter {
         * make additional queries to pull source data while the
         * main query is still running.
         *
-        * @param Database $db
-        * @param mixed $history one of WikiExporter::FULL or WikiExporter::CURRENT, or an
-        *                       associative array:
-        *                         offset: non-inclusive offset at which to start the query
-        *                         limit: maximum number of rows to return
-        *                         dir: "asc" or "desc" timestamp order
-        * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM
+        * @param $db Database
+        * @param $history Mixed: one of WikiExporter::FULL or WikiExporter::CURRENT,
+        *                 or an associative array:
+        *                   offset: non-inclusive offset at which to start the query
+        *                   limit: maximum number of rows to return
+        *                   dir: "asc" or "desc" timestamp order
+        * @param $buffer Int: one of WikiExporter::BUFFER or WikiExporter::STREAM
         */
        function __construct( &$db, $history = WikiExporter::CURRENT,
                        $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
@@ -67,7 +69,7 @@ class WikiExporter {
         * various row objects and XML output for filtering. Filters
         * can be chained or used as callbacks.
         *
-        * @param mixed $callback
+        * @param $sink mixed
         */
        function setOutputSink( &$sink ) {
                $this->sink =& $sink;
@@ -95,8 +97,8 @@ class WikiExporter {
        /**
         * Dumps a series of page and revision records for those pages
         * in the database falling within the page_id range given.
-        * @param int $start Inclusive lower limit (this id is included)
-        * @param int $end   Exclusive upper limit (this id is not included)
+        * @param $start Int: inclusive lower limit (this id is included)
+        * @param $end   Int: Exclusive upper limit (this id is not included)
         *                   If 0, no upper limit.
         */
        function pagesByRange( $start, $end ) {
@@ -108,7 +110,7 @@ class WikiExporter {
        }
 
        /**
-        * @param Title $title
+        * @param $title Title
         */
        function pageByTitle( $title ) {
                return $this->dumpFrom(
@@ -143,18 +145,18 @@ class WikiExporter {
                $this->author_list = "<contributors>";
                //rev_deleted
                $nothidden = '(rev_deleted & '.Revision::DELETED_USER.') = 0';
-               
+
                $sql = "SELECT DISTINCT rev_user_text,rev_user FROM {$page},{$revision} WHERE page_id=rev_page AND $nothidden AND " . $cond ;
                $result = $this->db->query( $sql, $fname );
                $resultset = $this->db->resultObject( $result );
                while( $row = $resultset->fetchObject() ) {
-                       $this->author_list .= "<contributor>" . 
-                               "<username>" . 
-                               htmlentities( $row->rev_user_text )  . 
-                               "</username>" . 
-                               "<id>" . 
+                       $this->author_list .= "<contributor>" .
+                               "<username>" .
+                               htmlentities( $row->rev_user_text )  .
+                               "</username>" .
+                               "<id>" .
                                $row->rev_user .
-                               "</id>" . 
+                               "</id>" .
                                "</contributor>";
                }
                wfProfileOut( $fname );
@@ -255,7 +257,7 @@ class WikiExporter {
         * separate database connection not managed by LoadBalancer; some
         * blob storage types will make queries to pull source data.
         *
-        * @param ResultWrapper $resultset
+        * @param $resultset ResultWrapper
         * @access private
         */
        function outputStream( $resultset ) {
@@ -293,7 +295,7 @@ class WikiExporter {
 }
 
 /**
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class XmlDumpWriter {
 
@@ -386,7 +388,7 @@ class XmlDumpWriter {
         * Opens a <page> section on the output stream, with data
         * from the given database row.
         *
-        * @param object $row
+        * @param $row object
         * @return string
         * @access private
         */
@@ -415,7 +417,7 @@ class XmlDumpWriter {
         * Dumps a <revision> section on the output stream, with
         * data filled in from the given database row.
         *
-        * @param object $row
+        * @param $row object
         * @return string
         * @access private
         */
@@ -463,12 +465,12 @@ class XmlDumpWriter {
                wfProfileOut( $fname );
                return $out;
        }
-       
+
        function writeTimestamp( $timestamp ) {
                $ts = wfTimestamp( TS_ISO_8601, $timestamp );
                return "      " . wfElement( 'timestamp', null, $ts ) . "\n";
        }
-       
+
        function writeContributor( $id, $text ) {
                $out = "      <contributor>\n";
                if( $id ) {
@@ -480,7 +482,7 @@ class XmlDumpWriter {
                $out .= "      </contributor>\n";
                return $out;
        }
-       
+
        /**
         * Warning! This data is potentially inconsistent. :(
         */
@@ -498,7 +500,7 @@ class XmlDumpWriter {
                }
                return '';
        }
-       
+
        function writeUpload( $file ) {
                return "    <upload>\n" .
                        $this->writeTimestamp( $file->getTimestamp() ) .
@@ -515,7 +517,7 @@ class XmlDumpWriter {
 
 /**
  * Base class for output stream; prints to stdout or buffer or whereever.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpOutput {
        function writeOpenStream( $string ) {
@@ -549,7 +551,7 @@ class DumpOutput {
 
 /**
  * Stream outputter to send data to a file.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpFileOutput extends DumpOutput {
        var $handle;
@@ -567,7 +569,7 @@ class DumpFileOutput extends DumpOutput {
  * Stream outputter to send data to a file via some filter program.
  * Even if compression is available in a library, using a separate
  * program can allow us to make use of a multi-processor system.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpPipeOutput extends DumpFileOutput {
        function DumpPipeOutput( $command, $file = null ) {
@@ -580,7 +582,7 @@ class DumpPipeOutput extends DumpFileOutput {
 
 /**
  * Sends dump output via the gzip compressor.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpGZipOutput extends DumpPipeOutput {
        function DumpGZipOutput( $file ) {
@@ -590,7 +592,7 @@ class DumpGZipOutput extends DumpPipeOutput {
 
 /**
  * Sends dump output via the bgzip2 compressor.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpBZip2Output extends DumpPipeOutput {
        function DumpBZip2Output( $file ) {
@@ -600,7 +602,7 @@ class DumpBZip2Output extends DumpPipeOutput {
 
 /**
  * Sends dump output via the p7zip compressor.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class Dump7ZipOutput extends DumpPipeOutput {
        function Dump7ZipOutput( $file ) {
@@ -618,7 +620,7 @@ class Dump7ZipOutput extends DumpPipeOutput {
  * Dump output filter class.
  * This just does output filtering and streaming; XML formatting is done
  * higher up, so be careful in what you do.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpFilter {
        function DumpFilter( &$sink ) {
@@ -664,7 +666,7 @@ class DumpFilter {
 
 /**
  * Simple dump output filter to exclude all talk pages.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpNotalkFilter extends DumpFilter {
        function pass( $page ) {
@@ -674,7 +676,7 @@ class DumpNotalkFilter extends DumpFilter {
 
 /**
  * Dump output filter to include or exclude pages in a given set of namespaces.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpNamespaceFilter extends DumpFilter {
        var $invert = false;
@@ -729,7 +731,7 @@ class DumpNamespaceFilter extends DumpFilter {
 
 /**
  * Dump output filter to include only the last revision in each page sequence.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpLatestFilter extends DumpFilter {
        var $page, $pageString, $rev, $revString;
@@ -761,7 +763,7 @@ class DumpLatestFilter extends DumpFilter {
 
 /**
  * Base class for output stream; prints to stdout or buffer or whereever.
- * @addtogroup Dump
+ * @ingroup Dump
  */
 class DumpMultiWriter {
        function DumpMultiWriter( $sinks ) {
@@ -815,5 +817,3 @@ function xmlsafe( $string ) {
        wfProfileOut( $fname );
        return $string;
 }
-
-