r112367 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112366‎ | r112367 | r112368 >
Date:23:07, 24 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
handle deletion request for non-existing orgs and courses
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/actions/EPDeleteAction.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPRevisionedObject.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/actions/EPDeleteAction.php
@@ -63,8 +63,8 @@
6464 $object = $this->table->get( $this->getTitle()->getText() );
6565
6666 if ( $object === false ) {
67 - // TODO
68 - throw new ErrorPageError( $this->getTitle(), $this->prefixMsg( 'none' ) );
 67+ $this->getOutput()->addWikiMsg( $this->prefixMsg( 'none' ), $this->getTitle()->getText() );
 68+ $this->getOutput()->setSubtitle( '' );
6969 }
7070 else {
7171 $this->displayForm( $object );
Index: trunk/extensions/EducationProgram/includes/EPRevisionedObject.php
@@ -244,4 +244,12 @@
245245 return null;
246246 }
247247
 248+ public function undelete() {
 249+
 250+ }
 251+
 252+ public function revert() {
 253+
 254+ }
 255+
248256 }
\ No newline at end of file
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -469,6 +469,7 @@
470470 'deletecourseaction-title' => 'Delete course "$1"',
471471 'deletecourseaction-cancel-button' => 'Cancel',
472472 'deletecourseaction-delete-button' => 'Delete course',
 473+ 'deletecourseaction-none' => 'There is no course titled "$1". Existing courses can be found in [[Special:Courses|the courses list]].',
473474
474475 // Institution deletion
475476 'deleteorgaction-text' => "You are about to delete institution $1. This will remove all it's courses and their associated students!",
@@ -476,6 +477,7 @@
477478 'deleteorgaction-title' => 'Delete institution "$1"',
478479 'deleteorgaction-cancel-button' => 'Cancel',
479480 'deleteorgaction-delete-button' => 'Delete institution',
 481+ 'deleteorgaction-none' => 'There is no institution titled "$1". Existing institutions can be found in [[Special:Courses|the institution list]].',
480482
481483 // Special:Ambassador
482484 'ep-ambassador-does-not-exist' => 'There is no ambassador with name "$1". See [[Special:Ambassadors|here]] for a list of ambassadors.',

Status & tagging log