r110564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110563‎ | r110564 | r110565 >
Date:13:18, 2 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
kill dead code, rem start and end fields from course pager and fixed redirects
Modified paths:
  • /trunk/extensions/EducationProgram/includes/EPCoursePager.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPPager.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPRevisionPager.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialCourses.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEPPage.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialInstitutions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialInstitutions.php
@@ -39,7 +39,7 @@
4040 EPOrg::displayPager( $this->getContext() );
4141 }
4242 else {
43 - $this->getOutput()->redirect( SpecialPage::getTitleFor( 'Institution', $this->subPage )->getLocalURL() );
 43+ $this->getOutput()->redirect( Title::newFromText( $this->subPage, EP_NS_INSTITUTION )->getLocalURL() );
4444 }
4545 }
4646
Index: trunk/extensions/EducationProgram/specials/SpecialEPPage.php
@@ -112,18 +112,6 @@
113113 }
114114
115115 /**
116 - * Get the Language being used for this instance.
117 - * getLang was deprecated in 1.19, getLanguage was introduced in the same version.
118 - *
119 - * @since 0.1
120 - *
121 - * @return Language
122 - */
123 - public function getLanguage() {
124 - return method_exists( get_parent_class(), 'getLanguage' ) ? parent::getLanguage() : $this->getLang();
125 - }
126 -
127 - /**
128116 * Adds a navigation menu with the provided links.
129117 * Links should be provided in an array with:
130118 * label => Title (object)
Index: trunk/extensions/EducationProgram/specials/SpecialCourses.php
@@ -39,7 +39,7 @@
4040 EPCourse::displayPager( $this->getContext() );
4141 }
4242 else {
43 - $this->getOutput()->redirect( SpecialPage::getTitleFor( 'Course', $this->subPage )->getLocalURL() );
 43+ $this->getOutput()->redirect( Title::newFromText( $this->subPage, EP_NS_COURSE )->getLocalURL() );
4444 }
4545 }
4646
Index: trunk/extensions/EducationProgram/includes/EPRevisionPager.php
@@ -62,7 +62,7 @@
6363 * @return Language
6464 */
6565 public function getLanguage() {
66 - return method_exists( $this->context, 'getLanguage' ) ? $this->context->getLanguage() : $this->context->getLang();
 66+ return $this->context->getLanguage();
6767 }
6868
6969 /**
Index: trunk/extensions/EducationProgram/includes/EPCoursePager.php
@@ -32,8 +32,6 @@
3333 'name',
3434 'org_id',
3535 'term',
36 - 'start',
37 - 'end',
3836 'lang',
3937 'students',
4038 );
@@ -101,8 +99,8 @@
102100 return array(
103101 'name',
104102 'term',
105 - 'start',
106 - 'end',
 103+// 'start',
 104+// 'end',
107105 'lang',
108106 'students',
109107 );
Index: trunk/extensions/EducationProgram/includes/EPPager.php
@@ -87,7 +87,7 @@
8888 * @return Language
8989 */
9090 public function getLanguage() {
91 - return method_exists( $this->context, 'getLanguage' ) ? $this->context->getLanguage() : $this->context->getLang();
 91+ return $this->context->getLanguage();
9292 }
9393
9494 /**

Status & tagging log