Index: trunk/extensions/EducationProgram/includes/EPOrgPager.php |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | ); |
152 | 152 | |
153 | 153 | $links[] = $this->getDeletionLink( |
154 | | - ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() ), |
| 154 | + ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) ), |
155 | 155 | $item->getId(), |
156 | 156 | $item->getIdentifier() |
157 | 157 | ); |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | if ( $this->getUser()->isAllowed( 'ep-org' ) ) { |
171 | 171 | $actions[wfMsg( 'ep-pager-delete-selected' )] = array( |
172 | 172 | 'class' => 'ep-pager-delete-selected', |
173 | | - 'data-type' => ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() ) |
| 173 | + 'data-type' => ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) ) |
174 | 174 | ); |
175 | 175 | } |
176 | 176 | |
Index: trunk/extensions/EducationProgram/includes/EPCoursePager.php |
— | — | @@ -201,7 +201,7 @@ |
202 | 202 | ); |
203 | 203 | |
204 | 204 | $links[] = $this->getDeletionLink( |
205 | | - ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() ), |
| 205 | + ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) ), |
206 | 206 | $item->getId(), |
207 | 207 | $item->getIdentifier() |
208 | 208 | ); |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | if ( !$this->readOnlyMode && $this->getUser()->isAllowed( 'ep-course' ) ) { |
222 | 222 | $actions[wfMsg( 'ep-pager-delete-selected' )] = array( |
223 | 223 | 'class' => 'ep-pager-delete-selected', |
224 | | - 'data-type' => ApiDeleteEducation::getTypeForClassName( $this->table->getDataObjectClass() ) |
| 224 | + 'data-type' => ApiDeleteEducation::getTypeForClassName( get_class( $this->table ) ) |
225 | 225 | ); |
226 | 226 | } |
227 | 227 | |
Index: trunk/extensions/EducationProgram/api/ApiDeleteEducation.php |
— | — | @@ -22,8 +22,8 @@ |
23 | 23 | * @var array |
24 | 24 | */ |
25 | 25 | protected static $typeMap = array( |
26 | | - 'org' => 'EPOrg', |
27 | | - 'course' => 'EPCourse', |
| 26 | + 'org' => 'EPOrgs', |
| 27 | + 'course' => 'EPCourses', |
28 | 28 | ); |
29 | 29 | |
30 | 30 | /** |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | $revAction->setUser( $this->getUser() ); |
72 | 72 | $revAction->setComment( $params['comment'] ); |
73 | 73 | |
74 | | - $class::deleteAndLog( $revAction, array( 'id' => $params['ids'] ) ); |
| 74 | + $class::singleton()->deleteAndLog( $revAction, array( 'id' => $params['ids'] ) ); |
75 | 75 | } |
76 | 76 | |
77 | 77 | $this->getResult()->addValue( |