Bound the cache size of numberofWatchingusers()
[lhc/web/wiklou.git] / includes / Import.php
index d86a640..e6b5dc2 100644 (file)
@@ -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 );
@@ -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 );