r111569 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111568‎ | r111569 | r111570 >
Date:19:49, 15 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix issue with deletion
Modified paths:
  • /trunk/extensions/EducationProgram/api/ApiDeleteEducation.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPCoursePager.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPOrgPager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/includes/EPOrgPager.php
@@ -150,7 +150,7 @@
151151 );
152152
153153 $links[] = $this->getDeletionLink(
154 - ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() ),
 154+ ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) ),
155155 $item->getId(),
156156 $item->getIdentifier()
157157 );
@@ -169,7 +169,7 @@
170170 if ( $this->getUser()->isAllowed( 'ep-org' ) ) {
171171 $actions[wfMsg( 'ep-pager-delete-selected' )] = array(
172172 'class' => 'ep-pager-delete-selected',
173 - 'data-type' => ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() )
 173+ 'data-type' => ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) )
174174 );
175175 }
176176
Index: trunk/extensions/EducationProgram/includes/EPCoursePager.php
@@ -201,7 +201,7 @@
202202 );
203203
204204 $links[] = $this->getDeletionLink(
205 - ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() ),
 205+ ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) ),
206206 $item->getId(),
207207 $item->getIdentifier()
208208 );
@@ -220,7 +220,7 @@
221221 if ( !$this->readOnlyMode && $this->getUser()->isAllowed( 'ep-course' ) ) {
222222 $actions[wfMsg( 'ep-pager-delete-selected' )] = array(
223223 'class' => 'ep-pager-delete-selected',
224 - 'data-type' => ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() )
 224+ 'data-type' => ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) )
225225 );
226226 }
227227
Index: trunk/extensions/EducationProgram/api/ApiDeleteEducation.php
@@ -22,8 +22,8 @@
2323 * @var array
2424 */
2525 protected static $typeMap = array(
26 - 'org' => 'EPOrg',
27 - 'course' => 'EPCourse',
 26+ 'org' => 'EPOrgs',
 27+ 'course' => 'EPCourses',
2828 );
2929
3030 /**
@@ -70,7 +70,7 @@
7171 $revAction->setUser( $this->getUser() );
7272 $revAction->setComment( $params['comment'] );
7373
74 - $class::deleteAndLog( $revAction, array( 'id' => $params['ids'] ) );
 74+ $class::singleton()->deleteAndLog( $revAction, array( 'id' => $params['ids'] ) );
7575 }
7676
7777 $this->getResult()->addValue(

Status & tagging log