# 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;
$dbw->deadlockLoop( array( &$revision, 'importOldRevision' ) );
}
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
class WikiRevision {
var $title = NULL;
var $timestamp = "20010115000000";
}
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 );
}
}
}
}
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
class WikiImporter {
var $mSource = NULL;
var $mError = "";
}
# Insert the row
- $oldIgnore = $dbw->setIgnoreErrors( true );
+ $oldIgnore = $dbw->ignoreErrors( true );
$success = $dbw->insert( 'old',
array(
'old_namespace' => intval( $this->title->getNamespace() ),
'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' => ''