jenkins-bot has submitted this change and it was merged.
Change subject: Renamed EP classes to avoid confusion with core classes
......................................................................
Renamed EP classes to avoid confusion with core classes
Change-Id: I466e1da315112db26385bc5b7304fa78aca81c4c
---
M EducationProgram.hooks.php
M EducationProgram.php
M includes/RevisionDiff.php
M includes/actions/RemoveArticleAction.php
M includes/actions/RestoreAction.php
M includes/actions/UndeleteAction.php
M includes/actions/UndoAction.php
M includes/actions/ViewAction.php
M includes/pagers/ArticlePager.php
M includes/pagers/ArticleTable.php
M includes/pagers/CoursePager.php
R includes/pagers/EPPager.php
M includes/pagers/OAPager.php
M includes/pagers/OrgPager.php
M includes/pagers/RevisionPager.php
M includes/pagers/StudentActivityPager.php
M includes/pagers/StudentPager.php
R includes/rows/EPArticle.php
R includes/rows/EPRevision.php
M includes/rows/Org.php
M includes/rows/RevisionedObject.php
M includes/specials/SpecialArticles.php
M includes/tables/Revisions.php
M tests/phpunit/rows/ArticleTest.php
24 files changed, 79 insertions(+), 79 deletions(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php
index ae0909e..031b8fc 100644
--- a/EducationProgram.hooks.php
+++ b/EducationProgram.hooks.php
@@ -169,7 +169,7 @@
* @since 0.1
*
* @param Title $title
- * @param Article|null $article
+ * @param EPArticle|null $article
*
* @return bool
*/
@@ -415,7 +415,7 @@
*
* @since 0.1
*
- * @param Article $article
+ * @param EPArticle $article
* @param Revision $rev
* @param integer $baseID
* @param User $user
diff --git a/EducationProgram.php b/EducationProgram.php
index f3becd2..54ee1bb 100644
--- a/EducationProgram.php
+++ b/EducationProgram.php
@@ -90,9 +90,9 @@
$wgAutoloadClasses['EducationProgram\ArticleTable']
= $dir . '/includes/pagers/ArticleTable.php';
$wgAutoloadClasses['EducationProgram\CAPager']
= $dir . '/includes/pagers/CAPager.php';
$wgAutoloadClasses['EducationProgram\CoursePager']
= $dir . '/includes/pagers/CoursePager.php';
+$wgAutoloadClasses['EducationProgram\EPPager']
= $dir . '/includes/pagers/EPPager.php';
$wgAutoloadClasses['EducationProgram\OAPager']
= $dir . '/includes/pagers/OAPager.php';
$wgAutoloadClasses['EducationProgram\OrgPager']
= $dir . '/includes/pagers/OrgPager.php';
-$wgAutoloadClasses['EducationProgram\Pager']
= $dir . '/includes/pagers/Pager.php';
$wgAutoloadClasses['EducationProgram\RevisionPager']
= $dir . '/includes/pagers/RevisionPager.php';
$wgAutoloadClasses['EducationProgram\StudentPager']
= $dir . '/includes/pagers/StudentPager.php';
$wgAutoloadClasses['EducationProgram\StudentActivityPager'] = $dir
. '/includes/pagers/StudentActivityPager.php';
@@ -103,15 +103,15 @@
$wgAutoloadClasses['EducationProgram\OrgPage']
= $dir . '/includes/pages/OrgPage.php';
// includes/rows (deriving from ORMRow)
-$wgAutoloadClasses['EducationProgram\Article']
= $dir . '/includes/rows/Article.php';
$wgAutoloadClasses['EducationProgram\CA']
= $dir . '/includes/rows/CA.php';
$wgAutoloadClasses['EducationProgram\Course']
= $dir . '/includes/rows/Course.php';
+$wgAutoloadClasses['EducationProgram\EPArticle']
= $dir . '/includes/rows/EPArticle.php';
+$wgAutoloadClasses['EducationProgram\EPRevision']
= $dir . '/includes/rows/EPRevision.php';
$wgAutoloadClasses['EducationProgram\Event']
= $dir . '/includes/rows/Event.php';
$wgAutoloadClasses['EducationProgram\Instructor']
= $dir . '/includes/rows/Instructor.php';
$wgAutoloadClasses['EducationProgram\OA']
= $dir . '/includes/rows/OA.php';
$wgAutoloadClasses['EducationProgram\Org']
= $dir . '/includes/rows/Org.php';
$wgAutoloadClasses['EducationProgram\PageObject']
= $dir . '/includes/rows/PageObject.php';
-$wgAutoloadClasses['EducationProgram\Revision']
= $dir . '/includes/rows/Revision.php';
$wgAutoloadClasses['EducationProgram\RevisionedObject']
= $dir . '/includes/rows/RevisionedObject.php';
$wgAutoloadClasses['EducationProgram\Student']
= $dir . '/includes/rows/Student.php';
diff --git a/includes/RevisionDiff.php b/includes/RevisionDiff.php
index ee55b0a..e4abcbe 100644
--- a/includes/RevisionDiff.php
+++ b/includes/RevisionDiff.php
@@ -18,7 +18,7 @@
protected $isValid = true;
- public static function newFromRestoreRevision( RevisionedObject
$sourceObject, Revision $revision, array $fields = null ) {
+ public static function newFromRestoreRevision( RevisionedObject
$sourceObject, EPRevision $revision, array $fields = null ) {
$changedFields = array();
$targetObject = $revision->getObject();
@@ -46,7 +46,7 @@
return new self( $changedFields );
}
- public static function newFromUndoRevision( RevisionedObject
$currentObject, Revision $revision, array $fields = null ) {
+ public static function newFromUndoRevision( RevisionedObject
$currentObject, EPRevision $revision, array $fields = null ) {
$changedFields = array();
$targetObject = $revision->getPreviousRevision()->getObject();
diff --git a/includes/actions/RemoveArticleAction.php
b/includes/actions/RemoveArticleAction.php
index bd988e4..d0811eb 100644
--- a/includes/actions/RemoveArticleAction.php
+++ b/includes/actions/RemoveArticleAction.php
@@ -31,7 +31,7 @@
if ( $user->matchEditToken( $req->getText( 'token' ),
'remarticle' . $req->getInt( 'article-id' ) ) ) {
/**
- * @var Article $article
+ * @var EPArticle $article
*/
$article = Articles::singleton()->selectRow(
null,
diff --git a/includes/actions/RestoreAction.php
b/includes/actions/RestoreAction.php
index 6c55bbc..aeea8ae 100644
--- a/includes/actions/RestoreAction.php
+++ b/includes/actions/RestoreAction.php
@@ -108,11 +108,11 @@
* @since 0.1
*
* @param PageObject $object
- * @param Revision $revision
+ * @param EPRevision $revision
*
* @return boolean Success indicator
*/
- protected function doRestore( PageObject $object, Revision $revision ) {
+ protected function doRestore( PageObject $object, EPRevision $revision
) {
$success = $object->restoreToRevision( $revision );
if ( $success ) {
@@ -133,9 +133,9 @@
* @since 0.1
*
* @param PageObject $object
- * @param Revision $revision
+ * @param EPRevision $revision
*/
- protected function displayForm( PageObject $object, Revision $revision
) {
+ protected function displayForm( PageObject $object, EPRevision
$revision ) {
$out = $this->getOutput();
$out->addModules( 'ep.formpage' );
diff --git a/includes/actions/UndeleteAction.php
b/includes/actions/UndeleteAction.php
index 8c52edf..63cb4e7 100644
--- a/includes/actions/UndeleteAction.php
+++ b/includes/actions/UndeleteAction.php
@@ -100,11 +100,11 @@
*
* @since 0.1
*
- * @param Revision $revision
+ * @param EPRevision $revision
*
* @return boolean Success indicator
*/
- protected function doUndelete( Revision $revision ) {
+ protected function doUndelete( EPRevision $revision ) {
$revAction = new RevisionAction();
$revAction->setUser( $this->getUser() );
@@ -118,9 +118,9 @@
*
* @since 0.1
*
- * @param Revision $revision
+ * @param EPRevision $revision
*/
- protected function displayForm( Revision $revision ) {
+ protected function displayForm( EPRevision $revision ) {
$out = $this->getOutput();
$out->addModules( 'ep.formpage' );
diff --git a/includes/actions/UndoAction.php b/includes/actions/UndoAction.php
index cab0978..b6a69a2 100644
--- a/includes/actions/UndoAction.php
+++ b/includes/actions/UndoAction.php
@@ -108,11 +108,11 @@
* @since 0.1
*
* @param PageObject $object
- * @param Revision $revision
+ * @param EPRevision $revision
*
* @return boolean Success indicator
*/
- protected function doUndo( PageObject $object, Revision $revision ) {
+ protected function doUndo( PageObject $object, EPRevision $revision ) {
$success = $object->undoRevision( $revision );
if ( $success ) {
@@ -133,9 +133,9 @@
* @since 0.1
*
* @param PageObject $object
- * @param Revision $revision
+ * @param EPRevision $revision
*/
- protected function displayForm( PageObject $object, Revision $revision
) {
+ protected function displayForm( PageObject $object, EPRevision
$revision ) {
$out = $this->getOutput();
$out->addModules( 'ep.formpage' );
diff --git a/includes/actions/ViewAction.php b/includes/actions/ViewAction.php
index 1858bbe..fee9e77 100644
--- a/includes/actions/ViewAction.php
+++ b/includes/actions/ViewAction.php
@@ -142,9 +142,9 @@
*
* @since 0.1
*
- * @param Revision $rev
+ * @param EPRevision $rev
*/
- protected function displayRevisionNotice( Revision $rev ) {
+ protected function displayRevisionNotice( EPRevision $rev ) {
$lang = $this->getLanguage();
$td = $lang->timeanddate( $rev->getField( 'time' ), true );
diff --git a/includes/pagers/ArticlePager.php b/includes/pagers/ArticlePager.php
index 3b5961f..bbee5bf 100644
--- a/includes/pagers/ArticlePager.php
+++ b/includes/pagers/ArticlePager.php
@@ -15,7 +15,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class ArticlePager extends Pager {
+class ArticlePager extends EPPager {
/**
* Course ids pointing to their corresponding course titles.
@@ -40,7 +40,7 @@
}
/**
- * @see Pager::getFields()
+ * @see EPPager::getFields()
*/
public function getFields() {
return array(
@@ -116,7 +116,7 @@
}
/**
- * @see Pager::hasActionsColumn()
+ * @see EP::hasActionsColumn()
*/
protected function hasActionsColumn() {
return false;
diff --git a/includes/pagers/ArticleTable.php b/includes/pagers/ArticleTable.php
index 4481a69..f4082fb 100644
--- a/includes/pagers/ArticleTable.php
+++ b/includes/pagers/ArticleTable.php
@@ -13,7 +13,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class ArticleTable extends Pager {
+class ArticleTable extends EPPager {
/**
* The doBatchLookups method gets all articles relevant to the users
that will be displayed
@@ -129,7 +129,7 @@
$articles = $this->articles[$student->getField( 'user_id' )];
$user = $this->getUser();
- $rowCount = array_reduce( $articles, function( /* integer */
$sum, Article $article ) use ( $user ) {
+ $rowCount = array_reduce( $articles, function( /* integer */
$sum, EPArticle $article ) use ( $user ) {
return $sum + max( count( $article->getField(
'reviewers' ) ), 1 );
}, 0 );
@@ -168,7 +168,7 @@
$isFirst = true;
/**
- * @var Article $article
+ * @var EPArticle $article
*/
foreach ( $articles as $article ) {
if ( !$isFirst ) {
@@ -295,12 +295,12 @@
*
* @since 0.1
*
- * @param Article $article
+ * @param EPArticle $article
* @param integer $rowSpan
*
* @return string
*/
- protected function getArticleCell( Article $article, $rowSpan ) {
+ protected function getArticleCell( EPArticle $article, $rowSpan ) {
$html = Linker::link(
$article->getTitle(),
htmlspecialchars( $article->getTitle()->getFullText() )
@@ -352,12 +352,12 @@
*
* @since 0.1
*
- * @param Article $article
+ * @param EPArticle $article
* @param integer $userId User id of the reviewer
*
* @return string
*/
- protected function getReviewerCell( Article $article, $userId ) {
+ protected function getReviewerCell( EPArticle $article, $userId ) {
$user = User::newFromId( $userId );
$name = !Settings::get( 'useStudentRealNames' ) ||
$user->getRealName() === '' ? $user->getName() : $user->getRealName();
@@ -463,15 +463,15 @@
}
/**
- * Returns the HTML for the reviewer adittion control.
+ * Returns the HTML for the reviewer addition control.
*
* @since 0.1
*
- * @param Article $article
+ * @param EPArticle $article
*
* @return string
*/
- protected function getReviewerAdittionControl( Article $article ) {
+ protected function getReviewerAdittionControl( EPArticle $article ) {
$html = Html::element(
'button',
array(
@@ -502,14 +502,14 @@
}
/**
- * @see Pager::hasActionsColumn()
+ * @see EPPager::hasActionsColumn()
*/
protected function hasActionsColumn() {
return false;
}
/**
- * @see Pager::getFieldNames()
+ * @see EPPager::getFieldNames()
*/
public function getFieldNames() {
$fields = parent::getFieldNames();
@@ -543,7 +543,7 @@
$articles = Articles::singleton()->select( null, $conditions );
/**
- * @var Article $article
+ * @var EPArticle $article
*/
foreach ( $articles as $article ) {
$this->articles[$article->getField( 'user_id' )][] =
$article;
diff --git a/includes/pagers/CoursePager.php b/includes/pagers/CoursePager.php
index 4d1a1fe..10a0927 100644
--- a/includes/pagers/CoursePager.php
+++ b/includes/pagers/CoursePager.php
@@ -13,7 +13,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class CoursePager extends Pager {
+class CoursePager extends EPPager {
/**
* When in read only mode, the pager should not show any course editing
controls.
*
@@ -193,7 +193,7 @@
}
/**
- * @see Pager::getFilterOptions()
+ * @see EPPager::getFilterOptions()
*/
protected function getFilterOptions() {
$options = array();
@@ -235,7 +235,7 @@
}
/**
- * @see Pager::getControlLinks()
+ * @see EPPager::getControlLinks()
*/
protected function getControlLinks( \IORMRow $item ) {
$links = parent::getControlLinks( $item );
@@ -261,7 +261,7 @@
}
/**
- * @see Pager::getMultipleItemActions()
+ * @see EPPager::getMultipleItemActions()
*/
protected function getMultipleItemActions() {
$actions = parent::getMultipleItemActions();
@@ -281,7 +281,7 @@
}
/**
- * @see Pager::getConditions()
+ * @see EPPager::getConditions()
*/
protected function getConditions() {
$conds = parent::getConditions();
@@ -312,7 +312,7 @@
}
/**
- * @see Pager::hasActionsColumn()
+ * @see EPPager::hasActionsColumn()
*/
protected function hasActionsColumn() {
return !$this->readOnlyMode;
diff --git a/includes/pagers/Pager.php b/includes/pagers/EPPager.php
similarity index 99%
rename from includes/pagers/Pager.php
rename to includes/pagers/EPPager.php
index 9d3985c..f84329b 100644
--- a/includes/pagers/Pager.php
+++ b/includes/pagers/EPPager.php
@@ -14,7 +14,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-abstract class Pager extends \TablePager {
+abstract class EPPager extends \TablePager {
/**
* Query conditions, full field names (inc prefix).
* @since 0.1
diff --git a/includes/pagers/OAPager.php b/includes/pagers/OAPager.php
index 4da0366..edc21d9 100644
--- a/includes/pagers/OAPager.php
+++ b/includes/pagers/OAPager.php
@@ -13,10 +13,10 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class OAPager extends Pager {
+class OAPager extends EPPager {
/**
- * @see Pager::$currentObject
+ * @see EPPager::$currentObject
* @since 0.1
* @var RoleObject
*/
@@ -45,7 +45,7 @@
}
/**
- * @see Pager::getFields()
+ * @see EPPager::getFields()
*/
public function getFields() {
return array(
@@ -137,14 +137,14 @@
}
/**
- * @see Pager::hasActionsColumn()
+ * @see EPPager::hasActionsColumn()
*/
protected function hasActionsColumn() {
return false;
}
/**
- * @see Pager::getFieldNames()
+ * @see EPPager::getFieldNames()
*/
public function getFieldNames() {
$fields = parent::getFieldNames();
diff --git a/includes/pagers/OrgPager.php b/includes/pagers/OrgPager.php
index da41c22..1c64816 100644
--- a/includes/pagers/OrgPager.php
+++ b/includes/pagers/OrgPager.php
@@ -13,7 +13,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class OrgPager extends Pager {
+class OrgPager extends EPPager {
/**
* Returns the HTML for a pager with institutions.
@@ -146,7 +146,7 @@
}
/**
- * @see Pager::getFilterOptions()
+ * @see EPPager::getFilterOptions()
*/
protected function getFilterOptions() {
return array(
@@ -168,7 +168,7 @@
}
/**
- * @see Pager::getControlLinks()
+ * @see EPPager::getControlLinks()
*/
protected function getControlLinks( IORMRow $item ) {
$links = parent::getControlLinks( $item );
@@ -194,7 +194,7 @@
}
/**
- * @see Pager::getMultipleItemActions()
+ * @see EPPager::getMultipleItemActions()
*/
protected function getMultipleItemActions() {
$actions = parent::getMultipleItemActions();
diff --git a/includes/pagers/RevisionPager.php
b/includes/pagers/RevisionPager.php
index c841ba5..17c128a 100644
--- a/includes/pagers/RevisionPager.php
+++ b/includes/pagers/RevisionPager.php
@@ -74,7 +74,7 @@
*/
function formatRow( $row ) {
/**
- * @var Revision $revision
+ * @var EPRevision $revision
*/
$revision = Revisions::singleton()->newRowFromDBResult( $row );
$object = $revision->getObject();
diff --git a/includes/pagers/StudentActivityPager.php
b/includes/pagers/StudentActivityPager.php
index 45a11f1..d9b00d3 100644
--- a/includes/pagers/StudentActivityPager.php
+++ b/includes/pagers/StudentActivityPager.php
@@ -13,7 +13,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class StudentActivityPager extends Pager {
+class StudentActivityPager extends EPPager {
/**
* List of user ids mapped to user names and real names, set in
doBatchLookups.
* The real names will just hold the user name when no real name is set.
@@ -152,7 +152,7 @@
}
/**
- * @see Pager::hasActionsColumn()
+ * @see EPPager::hasActionsColumn()
*/
protected function hasActionsColumn() {
return false;
diff --git a/includes/pagers/StudentPager.php b/includes/pagers/StudentPager.php
index 3ad8b5c..f0c835e 100644
--- a/includes/pagers/StudentPager.php
+++ b/includes/pagers/StudentPager.php
@@ -13,7 +13,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class StudentPager extends Pager {
+class StudentPager extends EPPager {
/**
* List of user ids mapped to user names and real names, set in
doBatchLookups.
@@ -132,7 +132,7 @@
}
/**
- * @see Pager::hasActionsColumn()
+ * @see EPPager::hasActionsColumn()
*/
protected function hasActionsColumn() {
return false;
diff --git a/includes/rows/Article.php b/includes/rows/EPArticle.php
similarity index 99%
rename from includes/rows/Article.php
rename to includes/rows/EPArticle.php
index 3c6ca92..9166c01 100644
--- a/includes/rows/Article.php
+++ b/includes/rows/EPArticle.php
@@ -14,7 +14,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class Article extends \ORMRow {
+class EPArticle extends \ORMRow {
/**
* Cached user object for this article.
diff --git a/includes/rows/Revision.php b/includes/rows/EPRevision.php
similarity index 97%
rename from includes/rows/Revision.php
rename to includes/rows/EPRevision.php
index 1706f0e..3d69c36 100644
--- a/includes/rows/Revision.php
+++ b/includes/rows/EPRevision.php
@@ -13,7 +13,7 @@
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
-class Revision extends \ORMRow {
+class EPRevision extends \ORMRow {
/**
* Cached user object for this revision.
@@ -101,7 +101,7 @@
*
* @since 0.1
*
- * @return Revision|bool false
+ * @return EPRevision|bool false
*/
public function getPreviousRevision() {
return $this->getObject()->getLatestRevision( array(
diff --git a/includes/rows/Org.php b/includes/rows/Org.php
index eafac1a..91dba6d 100644
--- a/includes/rows/Org.php
+++ b/includes/rows/Org.php
@@ -117,7 +117,7 @@
foreach ( $this->getField( 'courses' ) as $courseId ) {
/**
- * @var Revision $courseRevision
+ * @var EPRevision $courseRevision
*/
$courseRevision =
Revisions::singleton()->getLatestRevision( array(
'object_id' => $courseId,
diff --git a/includes/rows/RevisionedObject.php
b/includes/rows/RevisionedObject.php
index 5c12f8a..e8f5169 100644
--- a/includes/rows/RevisionedObject.php
+++ b/includes/rows/RevisionedObject.php
@@ -250,7 +250,7 @@
*
* @param integer $id
*
- * @return Revision|bool false
+ * @return EPRevision|bool false
*/
public function getRevisionById( $id ) {
$objects = $this->getRevisions(
@@ -307,7 +307,7 @@
* @param array $conditions
* @param array $options
*
- * @return Revision|bool false
+ * @return EPRevision|bool false
*/
public function getLatestRevision( array $conditions = array(), array
$options = array() ) {
$options['ORDER BY'] =
Revisions::singleton()->getPrefixedField( 'id' ) . ' DESC';
@@ -348,12 +348,12 @@
*
* @since 0.1
*
- * @param Revision $revison
+ * @param EPRevision $revison
* @param array|null $fields
*
* @return boolean Success indicator
*/
- public function restoreToRevision( Revision $revison, array $fields =
null ) {
+ public function restoreToRevision( EPRevision $revison, array $fields =
null ) {
$diff = $this->getRestoreDiff( $revison, $fields );
$this->applyDiff( $diff );
return $diff->isValid();
@@ -364,12 +364,12 @@
*
* @since 0.1
*
- * @param Revision $revison
+ * @param EPRevision $revison
* @param array|null $fields
*
* @return RevisionDiff
*/
- public function getRestoreDiff( Revision $revison, array $fields = null
) {
+ public function getRestoreDiff( EPRevision $revison, array $fields =
null ) {
$fields = is_null( $fields ) ?
$this->table->getRevertibleFields() : $fields;
return RevisionDiff::newFromRestoreRevision( $this, $revison,
$fields );
}
@@ -385,12 +385,12 @@
*
* @since 0.1
*
- * @param Revision $revison
+ * @param EPRevision $revison
* @param array|null $fields
*
* @return boolean Success indicator
*/
- public function undoRevision( Revision $revison, array $fields = null )
{
+ public function undoRevision( EPRevision $revison, array $fields = null
) {
$diff = $this->getUndoDiff( $revison, $fields );
$this->applyDiff( $diff );
return $diff->isValid();
@@ -412,12 +412,12 @@
*
* @since 0.1
*
- * @param Revision $revison
+ * @param EPRevision $revison
* @param array|null $fields
*
* @return RevisionDiff
*/
- public function getUndoDiff( Revision $revison, array $fields = null ) {
+ public function getUndoDiff( EPRevision $revison, array $fields = null
) {
$fields = is_null( $fields ) ?
$this->table->getRevertibleFields() : $fields;
return RevisionDiff::newFromUndoRevision( $this, $revison,
$fields );
}
diff --git a/includes/specials/SpecialArticles.php
b/includes/specials/SpecialArticles.php
index 6d8174d..d108810 100644
--- a/includes/specials/SpecialArticles.php
+++ b/includes/specials/SpecialArticles.php
@@ -45,7 +45,7 @@
* @return string
*/
public function getPagerHTML() {
- return Article::getPagerHTML( $this->getContext() );
+ return EPArticle::getPagerHTML( $this->getContext() );
}
/**
diff --git a/includes/tables/Revisions.php b/includes/tables/Revisions.php
index dc5e419..0e298cc 100644
--- a/includes/tables/Revisions.php
+++ b/includes/tables/Revisions.php
@@ -72,7 +72,7 @@
* @param RevisionedObject $object
* @param RevisionAction $revAction
*
- * @return Revision
+ * @return EPRevision
*/
public function newFromObject( RevisionedObject $object, RevisionAction
$revAction ) {
$fields = array_merge( $object->getRevisionIdentifiers(), array(
@@ -91,7 +91,7 @@
$fields['object_identifier'] = $identifier;
}
- return new Revision( $this, $fields );
+ return new EPRevision( $this, $fields );
}
/**
@@ -101,7 +101,7 @@
*
* @param array $conds
*
- * @return Revision|bool false
+ * @return EPRevision|bool false
*/
public function getLatestRevision( array $conds ) {
return $this->selectRow(
diff --git a/tests/phpunit/rows/ArticleTest.php
b/tests/phpunit/rows/ArticleTest.php
index b76bf10..3509e4b 100644
--- a/tests/phpunit/rows/ArticleTest.php
+++ b/tests/phpunit/rows/ArticleTest.php
@@ -1,7 +1,7 @@
<?php
namespace EducationProgram\Test;
-use EducationProgram\Article;
+use EducationProgram\EPArticle;
/**
* Tests for the EPArticle class.
@@ -34,7 +34,7 @@
class ArticleTest extends \MediaWikiTestCase {
public function testGetPagerHTML() {
- $html = Article::getPagerHTML( \RequestContext::getMain() );
+ $html = EPArticle::getPagerHTML( \RequestContext::getMain() );
$this->assertInternalType( 'string', $html );
}
--
To view, visit https://gerrit.wikimedia.org/r/45673
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I466e1da315112db26385bc5b7304fa78aca81c4c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Ragesoss <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits