Tell regexp parser to use extra analysis on external link regexp;
[lhc/web/wiklou.git] / includes / SpecialImport.php
index a11e65c..0211a1a 100644 (file)
 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
-function wfSpecialImport( $page = "" ) {
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+
+/**
+ * Constructor
+ */
+function wfSpecialImport( $page = '' ) {
        global $wgOut, $wgLang, $wgRequest, $wgTitle;
        global $wgImportSources;
        
@@ -99,6 +108,11 @@ function wfImportOldRevision( &$revision ) {
        $dbw->deadlockLoop( array( &$revision, 'importOldRevision' ) );
 }
 
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 class WikiRevision {
        var $title = NULL;
        var $timestamp = "20010115000000";
@@ -134,12 +148,12 @@ class WikiRevision {
        }
        
        function fixEncoding( $data ) {
-               global $wgLang, $wgInputEncoding;
+               global $wgContLang, $wgInputEncoding;
                
                if( strcasecmp( $wgInputEncoding, "utf-8" ) == 0 ) {
                        return $data;
                } else {
-                       return $wgLang->iconv( "utf-8", $wgInputEncoding, $data );
+                       return $wgContLang->iconv( "utf-8", $wgInputEncoding, $data );
                }
        }
        
@@ -164,6 +178,11 @@ class WikiRevision {
        }
 }
 
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 class WikiImporter {
        var $mSource = NULL;
        var $mError = "";
@@ -391,7 +410,7 @@ class WikiImporter {
                case "comment":
                        $this->workRevision->setComment( $this->appenddata );
                        break;
-               default;
+               default:
                        $this->debug( "Bad append: {$this->appendfield}" );
                }
                $this->appendfield = "";
@@ -483,7 +502,7 @@ class WikiImporter {
                                'old_comment' => $this->getComment(),
                                'old_user' => intval( $user->getId() ),
                                'old_user_text' => $user->getName(),
-                               'old_timestamp' => $this->timestamp
+                               'old_timestamp' => $this->timestamp,
                                'inverse_timestamp' => wfInvertTimestamp( $this->timestamp ),
                                'old_minor_edit' => 0,
                                'old_flags' => ''