https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111505
Revision: 111505 Author: jeroendedauw Date: 2012-02-14 23:06:01 +0000 (Tue, 14 Feb 2012) Log Message: ----------- some fixes and killed compat code Modified Paths: -------------- trunk/extensions/EducationProgram/includes/EPOrg.php trunk/extensions/EducationProgram/includes/EPRevision.php trunk/extensions/EducationProgram/includes/EPRevisionPager.php Modified: trunk/extensions/EducationProgram/includes/EPOrg.php =================================================================== --- trunk/extensions/EducationProgram/includes/EPOrg.php 2012-02-14 22:55:22 UTC (rev 111504) +++ trunk/extensions/EducationProgram/includes/EPOrg.php 2012-02-14 23:06:01 UTC (rev 111505) @@ -129,7 +129,7 @@ 'form', array( 'method' => 'post', - 'action' => self::getTitleFor( 'NAME_PLACEHOLDER' )->getLocalURL( array( 'action' => 'edit' ) ), + 'action' => EPOrgs::singleton()->getTitleFor( 'NAME_PLACEHOLDER' )->getLocalURL( array( 'action' => 'edit' ) ), ) ) ); Modified: trunk/extensions/EducationProgram/includes/EPRevision.php =================================================================== --- trunk/extensions/EducationProgram/includes/EPRevision.php 2012-02-14 22:55:22 UTC (rev 111504) +++ trunk/extensions/EducationProgram/includes/EPRevision.php 2012-02-14 23:06:01 UTC (rev 111505) @@ -21,7 +21,6 @@ */ protected $user = false; - /** * @see parent::__construct * @@ -75,8 +74,8 @@ * @return EPRevisionedObject */ public function getObject() { - $class = $this->getField( 'type' ); - return $class::newFromArray( $this->getField( 'data' ), true ); + $class = $this->getField( 'type' ) . 's'; // TODO: refactor made this suck a lot + return $class::singleton()->newFromArray( $this->getField( 'data' ), true ); } /** Modified: trunk/extensions/EducationProgram/includes/EPRevisionPager.php =================================================================== --- trunk/extensions/EducationProgram/includes/EPRevisionPager.php 2012-02-14 22:55:22 UTC (rev 111504) +++ trunk/extensions/EducationProgram/includes/EPRevisionPager.php 2012-02-14 23:06:01 UTC (rev 111505) @@ -42,66 +42,6 @@ } /** - * Get the OutputPage being used for this instance. - * IndexPager extends ContextSource as of 1.19. - * - * @since 0.1 - * - * @return OutputPage - */ - public function getOutput() { - return $this->context->getOutput(); - } - - /** - * Get the Language being used for this instance. - * IndexPager extends ContextSource as of 1.19. - * - * @since 0.1 - * - * @return Language - */ - public function getLanguage() { - return $this->context->getLanguage(); - } - - /** - * Get the User being used for this instance. - * IndexPager extends ContextSource as of 1.19. - * - * @since 0.1 - * - * @return User - */ - public function getUser() { - return $this->context->getUser(); - } - - /** - * Get the WebRequest being used for this instance. - * IndexPager extends ContextSource as of 1.19. - * - * @since 0.1 - * - * @return WebRequest - */ - public function getRequest() { - return $this->context->getRequest(); - } - - /** - * Get the Title being used for this instance. - * IndexPager extends ContextSource as of 1.19. - * - * @since 0.1 - * - * @return Title - */ - public function getTitle() { - return $this->context->getTitle(); - } - - /** * @see parent::getStartBody * @since 0.1 */ @@ -119,7 +59,7 @@ * @return String */ function formatRow( $row ) { - $revision = EPRevision::newFromDBResult( $row ); + $revision = EPRevisions::singleton()->newFromDBResult( $row ); $object = $revision->getObject(); $html = ''; @@ -179,9 +119,9 @@ */ function getQueryInfo() { return array( - 'tables' => EPRevision::getDBTable(), - 'fields' => EPRevision::getPrefixedFields( EPRevision::getFieldNames() ), - 'conds' => EPRevision::getPrefixedValues( $this->conds ) + 'tables' => EPRevisions::singleton()->getDBTable(), + 'fields' => EPRevisions::singleton()->getPrefixedFields( EPRevisions::singleton()->getFieldNames() ), + 'conds' => EPRevisions::singleton()->getPrefixedValues( $this->conds ) ); } @@ -198,8 +138,7 @@ * @return string|Array */ function getIndexField() { - return EPRevision::getPrefixedField( 'id' ); + return EPRevisions::singleton()->getPrefixedField( 'id' ); } - } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs