https://www.mediawiki.org/wiki/Special:Code/MediaWiki/110564
Revision: 110564
Author: jeroendedauw
Date: 2012-02-02 13:18:19 +0000 (Thu, 02 Feb 2012)
Log Message:
-----------
kill dead code, rem start and end fields from course pager and fixed redirects
Modified Paths:
--------------
trunk/extensions/EducationProgram/includes/EPCoursePager.php
trunk/extensions/EducationProgram/includes/EPPager.php
trunk/extensions/EducationProgram/includes/EPRevisionPager.php
trunk/extensions/EducationProgram/specials/SpecialCourses.php
trunk/extensions/EducationProgram/specials/SpecialEPPage.php
trunk/extensions/EducationProgram/specials/SpecialInstitutions.php
Modified: trunk/extensions/EducationProgram/includes/EPCoursePager.php
===================================================================
--- trunk/extensions/EducationProgram/includes/EPCoursePager.php
2012-02-02 13:14:59 UTC (rev 110563)
+++ trunk/extensions/EducationProgram/includes/EPCoursePager.php
2012-02-02 13:18:19 UTC (rev 110564)
@@ -32,8 +32,6 @@
'name',
'org_id',
'term',
- 'start',
- 'end',
'lang',
'students',
);
@@ -101,8 +99,8 @@
return array(
'name',
'term',
- 'start',
- 'end',
+// 'start',
+// 'end',
'lang',
'students',
);
Modified: trunk/extensions/EducationProgram/includes/EPPager.php
===================================================================
--- trunk/extensions/EducationProgram/includes/EPPager.php 2012-02-02
13:14:59 UTC (rev 110563)
+++ trunk/extensions/EducationProgram/includes/EPPager.php 2012-02-02
13:18:19 UTC (rev 110564)
@@ -87,7 +87,7 @@
* @return Language
*/
public function getLanguage() {
- return method_exists( $this->context, 'getLanguage' ) ?
$this->context->getLanguage() : $this->context->getLang();
+ return $this->context->getLanguage();
}
/**
Modified: trunk/extensions/EducationProgram/includes/EPRevisionPager.php
===================================================================
--- trunk/extensions/EducationProgram/includes/EPRevisionPager.php
2012-02-02 13:14:59 UTC (rev 110563)
+++ trunk/extensions/EducationProgram/includes/EPRevisionPager.php
2012-02-02 13:18:19 UTC (rev 110564)
@@ -62,7 +62,7 @@
* @return Language
*/
public function getLanguage() {
- return method_exists( $this->context, 'getLanguage' ) ?
$this->context->getLanguage() : $this->context->getLang();
+ return $this->context->getLanguage();
}
/**
Modified: trunk/extensions/EducationProgram/specials/SpecialCourses.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialCourses.php
2012-02-02 13:14:59 UTC (rev 110563)
+++ trunk/extensions/EducationProgram/specials/SpecialCourses.php
2012-02-02 13:18:19 UTC (rev 110564)
@@ -39,7 +39,7 @@
EPCourse::displayPager( $this->getContext() );
}
else {
- $this->getOutput()->redirect( SpecialPage::getTitleFor(
'Course', $this->subPage )->getLocalURL() );
+ $this->getOutput()->redirect( Title::newFromText(
$this->subPage, EP_NS_COURSE )->getLocalURL() );
}
}
Modified: trunk/extensions/EducationProgram/specials/SpecialEPPage.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialEPPage.php
2012-02-02 13:14:59 UTC (rev 110563)
+++ trunk/extensions/EducationProgram/specials/SpecialEPPage.php
2012-02-02 13:18:19 UTC (rev 110564)
@@ -112,18 +112,6 @@
}
/**
- * Get the Language being used for this instance.
- * getLang was deprecated in 1.19, getLanguage was introduced in the
same version.
- *
- * @since 0.1
- *
- * @return Language
- */
- public function getLanguage() {
- return method_exists( get_parent_class(), 'getLanguage' ) ?
parent::getLanguage() : $this->getLang();
- }
-
- /**
* Adds a navigation menu with the provided links.
* Links should be provided in an array with:
* label => Title (object)
Modified: trunk/extensions/EducationProgram/specials/SpecialInstitutions.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialInstitutions.php
2012-02-02 13:14:59 UTC (rev 110563)
+++ trunk/extensions/EducationProgram/specials/SpecialInstitutions.php
2012-02-02 13:18:19 UTC (rev 110564)
@@ -39,7 +39,7 @@
EPOrg::displayPager( $this->getContext() );
}
else {
- $this->getOutput()->redirect( SpecialPage::getTitleFor(
'Institution', $this->subPage )->getLocalURL() );
+ $this->getOutput()->redirect( Title::newFromText(
$this->subPage, EP_NS_INSTITUTION )->getLocalURL() );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs