jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/335988 )
Change subject: Replace Linker::link() with LinkRenderer in special pages ...................................................................... Replace Linker::link() with LinkRenderer in special pages Bug: T149346 Change-Id: Ica15ce994da2039fcbb8c09cc6f88e2bf1a48469 --- M includes/specials/SpecialDisenroll.php M includes/specials/SpecialEnroll.php M includes/specials/SpecialManageCourses.php M includes/specials/SpecialMyCourses.php 4 files changed, 18 insertions(+), 18 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialDisenroll.php b/includes/specials/SpecialDisenroll.php index 6e21950..2dfbe2f 100644 --- a/includes/specials/SpecialDisenroll.php +++ b/includes/specials/SpecialDisenroll.php @@ -2,7 +2,6 @@ namespace EducationProgram; -use Linker; use Html; use SpecialPage; use Xml; @@ -98,9 +97,9 @@ * @since 0.1 */ protected function showLoginLink() { - $this->getOutput()->addHTML( Linker::linkKnown( + $this->getOutput()->addHTML( $this->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'Userlogin' ), - $this->msg( 'ep-enroll-login-and-enroll' )->escaped(), + $this->msg( 'ep-enroll-login-and-enroll' )->text(), [], [ 'returnto' => $this->getPageTitle( $this->subPage )->getFullText() diff --git a/includes/specials/SpecialEnroll.php b/includes/specials/SpecialEnroll.php index e5fb156..c35e71e 100644 --- a/includes/specials/SpecialEnroll.php +++ b/includes/specials/SpecialEnroll.php @@ -4,7 +4,6 @@ use UserBlockedError; use Html; -use Linker; use Xml; use SpecialPage; @@ -207,9 +206,10 @@ $subPage .= '/' . $this->token; } - $out->addHTML( Linker::linkKnown( + $linkRenderer = $this->getLinkRenderer(); + $out->addHTML( $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'Userlogin' ), - $this->msg( 'ep-enroll-login-and-enroll' )->escaped(), + $this->msg( 'ep-enroll-login-and-enroll' )->text(), [], [ 'returnto' => $this->getPageTitle( $subPage )->getFullText() @@ -218,9 +218,9 @@ $out->addHTML( '</li><li>' ); - $out->addHTML( Linker::linkKnown( + $out->addHTML( $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'Userlogin' ), - $this->msg( 'ep-enroll-signup-and-enroll' )->escaped(), + $this->msg( 'ep-enroll-signup-and-enroll' )->text(), [], [ 'returnto' => $this->getPageTitle( $subPage )->getFullText(), diff --git a/includes/specials/SpecialManageCourses.php b/includes/specials/SpecialManageCourses.php index 0b415be..7d94996 100644 --- a/includes/specials/SpecialManageCourses.php +++ b/includes/specials/SpecialManageCourses.php @@ -52,9 +52,9 @@ } } } else { - $this->getOutput()->addHTML( \Linker::linkKnown( + $this->getOutput()->addHTML( $this->getLinkRenderer()->makeKnownLink( \SpecialPage::getTitleFor( 'Userlogin' ), - $this->msg( 'ep-mycourses-login-first' )->escaped(), + $this->msg( 'ep-mycourses-login-first' )->text(), [], [ 'returnto' => $this->getPageTitle( $this->subPage )->getFullText() diff --git a/includes/specials/SpecialMyCourses.php b/includes/specials/SpecialMyCourses.php index fe5093e..dc83f4c 100644 --- a/includes/specials/SpecialMyCourses.php +++ b/includes/specials/SpecialMyCourses.php @@ -2,14 +2,15 @@ namespace EducationProgram; -use EducationProgram\Events\Timeline; +use Html; +use HtmlArmor; use IContextSource; -use Linker; use EducationProgram\Events\EventQuery; use EducationProgram\Events\EventStore; +use EducationProgram\Events\Timeline; /** - * Page listing the recent actibvity of the users classmates. + * Page listing the recent activity of the users classmates. * It works both as a timeline and a dashboard. * * @since 0.1 @@ -62,9 +63,9 @@ $this->displayTimelines(); } } else { - $this->getOutput()->addHTML( Linker::linkKnown( + $this->getOutput()->addHTML( $this->getLinkRenderer()->makeKnownLink( \SpecialPage::getTitleFor( 'Userlogin' ), - $this->msg( 'ep-dashboard-login-first' )->escaped(), + $this->msg( 'ep-dashboard-login-first' )->text(), [], [ 'returnto' => $this->getPageTitle( $this->subPage )->getFullText() ] ) ); @@ -197,13 +198,13 @@ $events = $eventStore->query( $query ); - $html = Linker::link( + $html = $this->getLinkRenderer()->makeLink( $course->getTitle(), - \Html::element( + new HtmlArmor( Html::element( 'h2', [ 'class' => 'ep-course-title' ], $course->getField( 'name' ) - ) + ) ) ); if ( $events === [] ) { -- To view, visit https://gerrit.wikimedia.org/r/335988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica15ce994da2039fcbb8c09cc6f88e2bf1a48469 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Matěj Suchánek <matejsuchane...@gmail.com> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits