X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FPageArchive.php;h=a314f3a9eaf879458ca9d4270f716712d739109b;hb=6420c79320bc099cb4ff77232beabd72040146d0;hp=dfc7c02f058d557a7d35e8e9a74bcd6f17acee01;hpb=7cd7c534f7c86fff63bbd372dc081816df7d65ca;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index dfc7c02f05..a314f3a9ea 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -19,9 +19,8 @@ */ use MediaWiki\MediaWikiServices; -use MediaWiki\Storage\RevisionRecord; -use MediaWiki\Storage\RevisionStore; -use MediaWiki\Storage\SqlBlobStore; +use MediaWiki\Revision\RevisionRecord; +use MediaWiki\Revision\RevisionStore; use Wikimedia\Assert\Assert; use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; @@ -69,23 +68,6 @@ class PageArchive { return true; } - /** - * List all deleted pages recorded in the archive table. Returns result - * wrapper with (ar_namespace, ar_title, count) fields, ordered by page - * namespace/title. - * - * @deprecated since 1.32. - * - * @return IResultWrapper - */ - public static function listAllPages() { - wfDeprecated( __METHOD__, '1.32' ); - - $dbr = wfGetDB( DB_REPLICA ); - - return self::listPages( $dbr, '' ); - } - /** * List deleted pages recorded in the archive matching the * given term, using search engine archive. @@ -370,59 +352,6 @@ class PageArchive { return $rec; } - /** - * Get the text from an archive row containing ar_text_id. - * - * @deprecated since 1.32. In the MCR schema, ar_text_id no longer exists. - * Calling code should switch to getArchiveRevision(). - * - * @todo remove in 1.33 - * - * @param object $row Database row - * @return string - */ - public function getTextFromRow( $row ) { - wfDeprecated( __METHOD__, '1.32' ); - - if ( empty( $row->ar_text_id ) ) { - throw new InvalidArgumentException( '$row->ar_text_id must be set and not empty!' ); - } - - $address = SqlBlobStore::makeAddressFromTextId( $row->ar_text_id ); - $blobStore = MediaWikiServices::getInstance()->getBlobStore(); - - return $blobStore->getBlob( $address ); - } - - /** - * Fetch (and decompress if necessary) the stored text of the most - * recently edited deleted revision of the page. - * - * If there are no archived revisions for the page, returns NULL. - * - * @note this bypasses any audience checks. - * - * @deprecated since 1.32. For compatibility with the MCR schema, - * calling code should switch to getLastRevisionId() and getArchiveRevision(). - * - * @todo remove in 1.33 - * - * @return string|null - */ - public function getLastRevisionText() { - wfDeprecated( __METHOD__, '1.32' ); - - $revId = $this->getLastRevisionId(); - - if ( $revId ) { - $rev = $this->getArchivedRevision( $revId ); - $content = $rev->getContent( RevisionRecord::RAW ); - return $content->serialize(); - } - - return null; - } - /** * Returns the ID of the latest deleted revision. *