function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo = '' ) { // Add a result entry $r = array(); ApiQueryBase::addTitleInfo($r, $title); $r['revisions'] = intval($successCount); $this->mResultArr[] = $r; # call the parent to do the logging # avoid bug in 1.15.4 Special:Import (new file page text without the file uploaded) # PHP Fatal error: Call to a member function insertOn() on a non-object in E:\www\psychologos\includes\specials\SpecialImport.php on line 334 // do not create informational null revisions // because they are placed on top of real user made revisions, // making the binary search algorithm used to compare local and remote revs to fail // TODO: change the binary search algorithm to two/three level hashes if ( WikiSyncSetup::$report_null_revisions && $title->getArticleId() !== 0 ) { parent::reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ); } }
/** * @param Title $title * @param Title $origTitle * @param int $revisionCount * @param int $successCount * @param array $pageInfo * @return void */ function reportPage($title, $origTitle, $revisionCount, $successCount, $pageInfo) { // Add a result entry $r = array(); if ($title === null) { # Invalid or non-importable title $r['title'] = $pageInfo['title']; $r['invalid'] = true; } else { ApiQueryBase::addTitleInfo($r, $title); $r['revisions'] = intval($successCount); } $this->mResultArr[] = $r; // Piggyback on the parent to do the logging parent::reportPage($title, $origTitle, $revisionCount, $successCount, $pageInfo); }
/** * @param $title Title * @param $origTitle Title * @param $revisionCount int * @param $successCount int * @param $pageInfo * @return void */ function reportPage($title, $origTitle, $revisionCount, $successCount, $pageInfo) { // Add a result entry $r = array(); ApiQueryBase::addTitleInfo($r, $title); $r['revisions'] = intval($successCount); $this->mResultArr[] = $r; // Piggyback on the parent to do the logging parent::reportPage($title, $origTitle, $revisionCount, $successCount, $pageInfo); }