Magic links, etc.
[lhc/web/wiklou.git] / maintenance / importUseModWiki.php
index 37b4f10..c0a4b24 100644 (file)
@@ -1,22 +1,25 @@
 <?php
 
-/*
-       Import data from a UseModWiki into a PediaWiki wiki
-       2003-02-09 Brion VIBBER <brion@pobox.com>
-       Based loosely on Magnus's code from 2001-2002
-
-         Updated limited version to get something working temporarily
-         2003-10-09
-         Be sure to run the link & index rebuilding scripts!
-         
-         Some more munging for charsets etc
-         2003-11-28
-
-  */
-
-/* Set these correctly! */
+/**
+ * Import data from a UseModWiki into a PediaWiki wiki
+ * 2003-02-09 Brion VIBBER <brion@pobox.com>
+ * Based loosely on Magnus's code from 2001-2002
+ *
+ * Updated limited version to get something working temporarily
+ * 2003-10-09
+ * Be sure to run the link & index rebuilding scripts!
+ *
+ * Some more munging for charsets etc
+ * 2003-11-28
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** Set these correctly! */
 $wgImportEncoding = "CP1252"; /* We convert all to UTF-8 */
-$wgRootDirectory = "/home/usemod/wiki-fi/lib-http/db/wiki";
+$wgRootDirectory = "/home/usemod/wiki-ia/lib-http/db/wiki";
 
 /* globals */
 $wgFieldSeparator = "\xb3"; # Some wikis may use different char
@@ -220,6 +223,7 @@ function importPage( $title )
        $comment = wfStrencode( recodeText( $page->summary ) );
        $minor = ($page->minor ? 1 : 0);
        list( $userid, $username ) = checkUserCache( $page->username, $page->host );
+       $username = wfStrencode( recodeText( $username ) );
        $timestamp = wfUnix2Timestamp( $page->ts );
        $redirect = ( preg_match( '/^#REDIRECT/', $page->text ) ? 1 : 0 );
        $random = mt_rand() / mt_getrandmax();