X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FImport.php;h=e6b5dc256f7520b0da7a9ae277666d9fbf5fad1d;hb=220d30f8f4b803c38cbbe6735052566eea2576b1;hp=6aab1575209baf65eb214ed4413f9b9389f536b7;hpb=2b021dc48a423dd43f7c60046315cfe2113a3fb6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Import.php b/includes/Import.php index 6aab157520..e6b5dc256f 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -395,8 +395,8 @@ class WikiImporter { /** * Retrieves the contents of the named attribute of the current element. - * @param string $attr the name of the attribute - * @return string the value of the attribute or an empty string if it is not set in the current element. + * @param string $attr The name of the attribute + * @return string The value of the attribute or an empty string if it is not set in the current element. */ public function nodeAttribute( $attr ) { return $this->reader->getAttribute( $attr ); @@ -533,7 +533,7 @@ class WikiImporter { private function handleSiteInfo() { // Site info is useful, but not actually used for dump imports. // Includes a quick short-circuit to save performance. - if ( ! $this->mSiteInfoCallback ) { + if ( !$this->mSiteInfoCallback ) { $this->reader->next(); return true; } @@ -1050,30 +1050,6 @@ class UploadSourceAdapter { } } -class XMLReader2 extends XMLReader { - - /** - * @return bool|string - */ - function nodeContents() { - if ( $this->isEmptyElement ) { - return ""; - } - $buffer = ""; - while ( $this->read() ) { - switch ( $this->nodeType ) { - case XmlReader::TEXT: - case XmlReader::SIGNIFICANT_WHITESPACE: - $buffer .= $this->value; - break; - case XmlReader::END_ELEMENT: - return $buffer; - } - } - return $this->close(); - } -} - /** * @todo document (e.g. one-sentence class description). * @ingroup SpecialPage @@ -1503,6 +1479,7 @@ class WikiRevision { $linkCache->clear(); $page = WikiPage::factory( $this->title ); + $page->loadPageData( 'fromdbmaster' ); if ( !$page->exists() ) { # must create the page... $pageId = $page->insertOn( $dbw );