* Skip additional setting of include_path in commandLine.inc (for non-Wikimedia mode)
[lhc/web/wiklou.git] / maintenance / dumpReplayLog.php
index b448167..a71c5b9 100644 (file)
@@ -1,16 +1,19 @@
 <?php
-
+/**
+ * @addtogroup Maintenance
+ */
 error_reporting(E_ALL);
 
+/** */
 require_once( "commandLine.inc" );
-require_once( 'includes/SpecialExport.php' );
 
+/** */
 function dumpReplayLog( $start ) {
-       $dbw =& wfGetDB( DB_MASTER );
+       $dbw = wfGetDB( DB_MASTER );
        $recentchanges = $dbw->tableName( 'recentchanges' );
        $result =& $dbw->safeQuery( "SELECT * FROM $recentchanges WHERE rc_timestamp >= "
                . $dbw->timestamp( $start ) . ' ORDER BY rc_timestamp');
-       
+
        global $wgInputEncoding;
        echo '<' . '?xml version="1.0" encoding="' . $wgInputEncoding . '" ?' . ">\n";
        echo "<wikilog version='experimental'>\n";
@@ -22,17 +25,18 @@ function dumpReplayLog( $start ) {
        $dbw->freeResult( $result );
 }
 
+/** */
 function dumpReplayEntry( $row ) {
        $title = Title::MakeTitle( $row->rc_namespace, $row->rc_title );
        switch( $row->rc_type ) {
        case RC_EDIT:
        case RC_NEW:
                # Edit
-               $dbr =& wfGetDB( DB_MASTER );
-               
+               $dbr = wfGetDB( DB_MASTER );
+
                $out = "  <edit>\n";
                $out .= "    <title>" . xmlsafe( $title->getPrefixedText() ) . "</title>\n";
-               
+
                # Get previous edit timestamp
                if( $row->rc_last_oldid ) {
                        $s = $dbr->selectRow( 'old',
@@ -42,10 +46,10 @@ function dumpReplayEntry( $row ) {
                } else {
                        $out .= "    <newpage/>\n";
                }
-               
+
                if( $row->rc_this_oldid ) {
-                       $s = $dbr->selectRow( 'old', array( 'old_id as id','old_timestamp as timestamp', 
-                               'old_user as user', 'old_user_text as user_text', 'old_comment as comment', 
+                       $s = $dbr->selectRow( 'old', array( 'old_id as id','old_timestamp as timestamp',
+                               'old_user as user', 'old_user_text as user_text', 'old_comment as comment',
                                'old_text as text', 'old_flags as flags' ),
                                array( 'old_id' => $row->rc_this_oldid ) );
                        $out .= revision2xml( $s, true, false );
@@ -59,7 +63,7 @@ function dumpReplayEntry( $row ) {
                $out .= "  </edit>\n";
                break;
        case RC_LOG:
-               $dbr =& wfGetDB( DB_MASTER );
+               $dbr = wfGetDB( DB_MASTER );
                $s = $dbr->selectRow( 'logging',
                        array( 'log_type', 'log_action', 'log_timestamp', 'log_user',
                                'log_namespace', 'log_title', 'log_comment' ),