[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Removes ProofreadPagePage and ProofreadIndexPage

2017-11-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392194 )

Change subject: Removes ProofreadPagePage and ProofreadIndexPage
..


Removes ProofreadPagePage and ProofreadIndexPage

Change-Id: Ib77a4a0aae7c92fc38e4f97d9caa55d659768d2d
---
M ProofreadPage.body.php
M extension.json
M includes/FileProvider.php
M includes/Pagination/FilePagination.php
M includes/Pagination/PagePagination.php
M includes/Pagination/Pagination.php
M includes/Pagination/PaginationFactory.php
M includes/Parser/PagelistTagParser.php
M includes/Parser/PagesTagParser.php
M includes/index/DatabaseIndexContentLookup.php
M includes/index/IndexContentLookup.php
D includes/index/ProofreadIndexPage.php
M includes/page/DatabaseIndexForPageLookup.php
M includes/page/EditPagePage.php
M includes/page/IndexForPageLookup.php
M includes/page/PageContentBuilder.php
M includes/page/PageDisplayHandler.php
M includes/page/PageEditAction.php
M includes/page/PageSubmitAction.php
M includes/page/PageViewAction.php
D includes/page/ProofreadPagePage.php
M tests/phpunit/FileProviderTest.php
M tests/phpunit/Pagination/FilePaginationTest.php
M tests/phpunit/Pagination/PagePaginationTest.php
M tests/phpunit/Pagination/PaginationFactoryTest.php
M tests/phpunit/ProofreadPageTestCase.php
M tests/phpunit/index/IndexContentLookupMock.php
D tests/phpunit/index/ProofreadIndexPageTest.php
M tests/phpunit/page/DatabaseIndexForPageLookupTest.php
M tests/phpunit/page/IndexForPageLookupMock.php
M tests/phpunit/page/PageContentBuilderTest.php
M tests/phpunit/page/PageDisplayHandlerTest.php
D tests/phpunit/page/ProofreadPagePageTest.php
33 files changed, 322 insertions(+), 589 deletions(-)

Approvals:
  jenkins-bot: Verified
  Tpt: Looks good to me, approved



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index c088bc1..8e7a3b6 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -123,13 +123,13 @@
 * @param Title $title
 */
public static function loadIndex( $title ) {
-   $title->prpIndexPage = null;
+   $title->prpIndexTitle = null;
$result = ProofreadIndexDbConnector::getRowsFromTitle( $title );
 
foreach ( $result as $x ) {
$refTitle = Title::makeTitle( $x->page_namespace, 
$x->page_title );
if ( $refTitle !== null && $refTitle->inNamespace( 
self::getIndexNamespaceId() ) ) {
-   $title->prpIndexPage = 
ProofreadIndexPage::newFromTitle( $refTitle );
+   $title->prpIndexTitle = $refTitle;
return;
}
}
@@ -149,7 +149,7 @@
self::getIndexNamespaceId(), 
$image->getTitle()->getText()
);
if ( $indexTitle !== null ) {
-   $title->prpIndexPage = 
ProofreadIndexPage::newFromTitle( $indexTitle );
+   $title->prpIndexTitle = $indexTitle;
}
}
}
@@ -295,8 +295,8 @@
 */
private static function updateIndexOfPage( Title $title, $deleted = 
false ) {
self::loadIndex( $title );
-   if ( $title->prpIndexPage !== null ) {
-   $indexTitle = $title->prpIndexPage->getTitle();
+   if ( $title->prpIndexTitle !== null ) {
+   $indexTitle = $title->prpIndexTitle;
$indexTitle->invalidateCache();
$index = WikiPage::factory( $indexTitle );
if ( $index ) {
@@ -325,22 +325,22 @@
}
 
/* check if there is an index */
-   if ( !isset( $title->prpIndexPage ) ) {
+   if ( !isset( $title->prpIndexTitle ) ) {
self::loadIndex( $title );
}
-   if ( $title->prpIndexPage === null ) {
+   if ( $title->prpIndexTitle === null ) {
return true;
}
 
/**
 * invalidate the cache of the index page
 */
-   $title->prpIndexPage->getTitle()->invalidateCache();
+   $title->prpIndexTitle->invalidateCache();
 
/**
 * update pr_index iteratively
 */
-   $indexId = $title->prpIndexPage->getTitle()->getArticleID();
+   $indexId = $title->prpIndexTitle->getArticleID();
$indexData = 
ProofreadIndexDbConnector::getIndexDataFromIndexPageId( $indexId );
if ( $indexData ) {
ProofreadIndexDbConnector::replaceIndexById( 
$indexData, $indexId, $article );
@@ -421,9 +421,9 @@
 
if ( $nt->inNamespace( self::getPageNamespaceId() ) ) {
   

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Removes ProofreadPagePage and ProofreadIndexPage

2017-11-18 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392194 )

Change subject: Removes ProofreadPagePage and ProofreadIndexPage
..

Removes ProofreadPagePage and ProofreadIndexPage

Change-Id: Ib77a4a0aae7c92fc38e4f97d9caa55d659768d2d
---
M ProofreadPage.body.php
M includes/FileProvider.php
M includes/Pagination/FilePagination.php
M includes/Pagination/PagePagination.php
M includes/Pagination/Pagination.php
M includes/Pagination/PaginationFactory.php
M includes/Parser/PagelistTagParser.php
M includes/Parser/PagesTagParser.php
M includes/index/DatabaseIndexContentLookup.php
M includes/index/IndexContentLookup.php
D includes/index/ProofreadIndexPage.php
M includes/page/DatabaseIndexForPageLookup.php
M includes/page/EditPagePage.php
M includes/page/IndexForPageLookup.php
M includes/page/PageContentBuilder.php
M includes/page/PageDisplayHandler.php
M includes/page/PageEditAction.php
M includes/page/PageSubmitAction.php
M includes/page/PageViewAction.php
D includes/page/ProofreadPagePage.php
M tests/phpunit/FileProviderTest.php
M tests/phpunit/Pagination/FilePaginationTest.php
M tests/phpunit/Pagination/PagePaginationTest.php
M tests/phpunit/Pagination/PaginationFactoryTest.php
M tests/phpunit/ProofreadPageTestCase.php
M tests/phpunit/index/IndexContentLookupMock.php
D tests/phpunit/index/ProofreadIndexPageTest.php
M tests/phpunit/page/DatabaseIndexForPageLookupTest.php
M tests/phpunit/page/IndexForPageLookupMock.php
M tests/phpunit/page/PageContentBuilderTest.php
M tests/phpunit/page/PageDisplayHandlerTest.php
D tests/phpunit/page/ProofreadPagePageTest.php
32 files changed, 322 insertions(+), 587 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/94/392194/1

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index c088bc1..8e7a3b6 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -123,13 +123,13 @@
 * @param Title $title
 */
public static function loadIndex( $title ) {
-   $title->prpIndexPage = null;
+   $title->prpIndexTitle = null;
$result = ProofreadIndexDbConnector::getRowsFromTitle( $title );
 
foreach ( $result as $x ) {
$refTitle = Title::makeTitle( $x->page_namespace, 
$x->page_title );
if ( $refTitle !== null && $refTitle->inNamespace( 
self::getIndexNamespaceId() ) ) {
-   $title->prpIndexPage = 
ProofreadIndexPage::newFromTitle( $refTitle );
+   $title->prpIndexTitle = $refTitle;
return;
}
}
@@ -149,7 +149,7 @@
self::getIndexNamespaceId(), 
$image->getTitle()->getText()
);
if ( $indexTitle !== null ) {
-   $title->prpIndexPage = 
ProofreadIndexPage::newFromTitle( $indexTitle );
+   $title->prpIndexTitle = $indexTitle;
}
}
}
@@ -295,8 +295,8 @@
 */
private static function updateIndexOfPage( Title $title, $deleted = 
false ) {
self::loadIndex( $title );
-   if ( $title->prpIndexPage !== null ) {
-   $indexTitle = $title->prpIndexPage->getTitle();
+   if ( $title->prpIndexTitle !== null ) {
+   $indexTitle = $title->prpIndexTitle;
$indexTitle->invalidateCache();
$index = WikiPage::factory( $indexTitle );
if ( $index ) {
@@ -325,22 +325,22 @@
}
 
/* check if there is an index */
-   if ( !isset( $title->prpIndexPage ) ) {
+   if ( !isset( $title->prpIndexTitle ) ) {
self::loadIndex( $title );
}
-   if ( $title->prpIndexPage === null ) {
+   if ( $title->prpIndexTitle === null ) {
return true;
}
 
/**
 * invalidate the cache of the index page
 */
-   $title->prpIndexPage->getTitle()->invalidateCache();
+   $title->prpIndexTitle->invalidateCache();
 
/**
 * update pr_index iteratively
 */
-   $indexId = $title->prpIndexPage->getTitle()->getArticleID();
+   $indexId = $title->prpIndexTitle->getArticleID();
$indexData = 
ProofreadIndexDbConnector::getIndexDataFromIndexPageId( $indexId );
if ( $indexData ) {
ProofreadIndexDbConnector::replaceIndexById( 
$indexData, $indexId, $article );
@@ -421,9 +421,9 @@
 
if ( $nt->inNamespace( self::getPageNamespaceId() ) ) {