Index: trunk/extensions/EducationProgram/actions/EPRestoreAction.php |
— | — | @@ -72,13 +72,19 @@ |
73 | 73 | |
74 | 74 | if ( !is_null( $success ) ) { |
75 | 75 | if ( $success ) { |
76 | | - $query = array( 'restored' => '1' ); // TODO: handle |
| 76 | + $this->getRequest()->setSessionData( |
| 77 | + 'epsuccess', |
| 78 | + $this->msg( $this->prefixMsg( 'restored' ), $this->getTitle()->getText() )->text() |
| 79 | + ); |
77 | 80 | } |
78 | 81 | else { |
79 | | - $query = array( 'restorefailed' => '1' ); // TODO: handle |
| 82 | + $this->getRequest()->setSessionData( |
| 83 | + 'epfail', |
| 84 | + $this->msg( $this->prefixMsg( 'restore-failed' ), $this->getTitle()->getText() )->text() |
| 85 | + ); |
80 | 86 | } |
81 | 87 | |
82 | | - $this->getOutput()->redirect( $object->getTitle()->getLocalURL( $query ) ); |
| 88 | + $this->getOutput()->redirect( $object->getTitle()->getLocalURL() ); |
83 | 89 | } |
84 | 90 | } |
85 | 91 | |
Index: trunk/extensions/EducationProgram/actions/EPUndeleteAction.php |
— | — | @@ -54,8 +54,11 @@ |
55 | 55 | ) ); |
56 | 56 | |
57 | 57 | if ( $revision === false ) { |
58 | | - $query = array( 'undeletefailed' => 'norevs' ); // TODO: handle |
59 | | - $this->getOutput()->redirect( $this->getTitle()->getLocalURL( $query ) ); |
| 58 | + $this->getRequest()->setSessionData( |
| 59 | + 'epfail', |
| 60 | + $this->msg( $this->prefixMsg( 'failed-norevs' ), $this->getTitle()->getText() )->text() |
| 61 | + ); |
| 62 | + $this->getOutput()->redirect( $this->getTitle()->getLocalURL() ); |
60 | 63 | } |
61 | 64 | else { |
62 | 65 | $req = $this->getRequest(); |
— | — | @@ -64,13 +67,19 @@ |
65 | 68 | $success = $this->doUndelete( $revision ); |
66 | 69 | |
67 | 70 | if ( $success ) { |
68 | | - $query = array( 'undeleted' => '1' ); // TODO: handle |
| 71 | + $this->getRequest()->setSessionData( |
| 72 | + 'epsuccess', |
| 73 | + $this->msg( $this->prefixMsg( 'undeleted' ), $this->getTitle()->getText() )->text() |
| 74 | + ); |
69 | 75 | } |
70 | 76 | else { |
71 | | - $query = array( 'undeletefailed' => 'fail' ); // TODO: handle |
| 77 | + $this->getRequest()->setSessionData( |
| 78 | + 'epfail', |
| 79 | + $this->msg( $this->prefixMsg( 'undelete-failed' ), $this->getTitle()->getText() )->text() |
| 80 | + ); |
72 | 81 | } |
73 | 82 | |
74 | | - $this->getOutput()->redirect( $this->getTitle()->getLocalURL( $query ) ); |
| 83 | + $this->getOutput()->redirect( $this->getTitle()->getLocalURL() ); |
75 | 84 | } |
76 | 85 | else { |
77 | 86 | $this->displayForm( $revision ); |
— | — | @@ -78,8 +87,11 @@ |
79 | 88 | } |
80 | 89 | } |
81 | 90 | else { |
82 | | - $query = array( 'undeletefailed' => 'exists' ); // TODO: handle |
83 | | - $this->getOutput()->redirect( $this->getTitle()->getLocalURL( $query ) ); |
| 91 | + $this->getRequest()->setSessionData( |
| 92 | + 'epfail', |
| 93 | + $this->msg( $this->prefixMsg( 'failed-exists' ), $this->getTitle()->getText() )->text() |
| 94 | + ); |
| 95 | + $this->getOutput()->redirect( $this->getTitle()->getLocalURL() ); |
84 | 96 | } |
85 | 97 | |
86 | 98 | return ''; |
Index: trunk/extensions/EducationProgram/actions/EPUndoAction.php |
— | — | @@ -72,13 +72,19 @@ |
73 | 73 | |
74 | 74 | if ( !is_null( $success ) ) { |
75 | 75 | if ( $success ) { |
76 | | - $query = array( 'undid' => '1' ); // TODO: handle |
| 76 | + $this->getRequest()->setSessionData( |
| 77 | + 'epsuccess', |
| 78 | + $this->msg( $this->prefixMsg( 'undid' ), $this->getTitle()->getText() )->text() |
| 79 | + ); |
77 | 80 | } |
78 | 81 | else { |
79 | | - $query = array( 'undofailed' => '1' ); // TODO: handle |
| 82 | + $this->getRequest()->setSessionData( |
| 83 | + 'epfail', |
| 84 | + $this->msg( $this->prefixMsg( 'undo-failed' ), $this->getTitle()->getText() )->text() |
| 85 | + ); |
80 | 86 | } |
81 | 87 | |
82 | | - $this->getOutput()->redirect( $object->getTitle()->getLocalURL( $query ) ); |
| 88 | + $this->getOutput()->redirect( $object->getTitle()->getLocalURL() ); |
83 | 89 | } |
84 | 90 | } |
85 | 91 | |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -501,8 +501,8 @@ |
502 | 502 | 'orgpage-delete-cancel-button' => 'Cancel', |
503 | 503 | 'orgpage-delete-delete-button' => 'Delete institution', |
504 | 504 | 'orgpage-delete-none' => 'There is no institution titled "$1". Existing institutions can be found in [[Special:Courses|the institution list]].', |
505 | | - 'coursepage-delete-deleted' => 'Successfully deleted institution $1 and its associated courses.', |
506 | | - 'coursepage-delete-delete-failed' => 'Failed to deleted institution [[Institution:$1|$1]].', |
| 505 | + 'orgpage-delete-deleted' => 'Successfully deleted institution $1 and its associated courses.', |
| 506 | + 'orgpage-delete-delete-failed' => 'Failed to deleted institution [[Institution:$1|$1]].', |
507 | 507 | |
508 | 508 | // Institution restoration |
509 | 509 | 'orgpage-eprestore-title' => 'Restore institution "$1"', |
— | — | @@ -511,6 +511,8 @@ |
512 | 512 | 'orgpage-eprestore-restore-button' => 'Restore revision', |
513 | 513 | 'orgpage-eprestore-cancel-button' => 'Cancel', |
514 | 514 | 'orgpage-eprestore-summary-value' => 'Restore institution to the revision made on $1 by $2', |
| 515 | + 'orgpage-eprestore-restored' => 'Successfully restored institution $1.', |
| 516 | + 'orgpage-eprestore-restore-failed' => 'Failed to restore institution $1.', |
515 | 517 | |
516 | 518 | // Course restoration |
517 | 519 | 'coursepage-eprestore-title' => 'Restore course "$1"', |
— | — | @@ -519,6 +521,8 @@ |
520 | 522 | 'coursepage-eprestore-restore-button' => 'Restore revision', |
521 | 523 | 'coursepage-eprestore-cancel-button' => 'Cancel', |
522 | 524 | 'coursepage-eprestore-summary-value' => 'Restore course to the revision made on $1 by $2', |
| 525 | + 'coursepage-eprestore-restored' => 'Successfully restored course $1.', |
| 526 | + 'coursepage-eprestore-restore-failed' => 'Failed to restore course $1.', |
523 | 527 | |
524 | 528 | // Institution undo revision |
525 | 529 | 'orgpage-epundo-title' => 'Undo revision of institution "$1"', |
— | — | @@ -527,6 +531,8 @@ |
528 | 532 | 'orgpage-epundo-undo-button' => 'Undo revision', |
529 | 533 | 'orgpage-epundo-cancel-button' => 'Cancel', |
530 | 534 | 'orgpage-epundo-summary-value' => 'Undo revision made on $1 by $2', |
| 535 | + 'orgpage-epundo-undid' => 'Successfully undid revision of institution $1.', |
| 536 | + 'orgpage-epundo-undo-failed' => 'Failed to undo revision of institution $1.', |
531 | 537 | |
532 | 538 | // Course undo revision |
533 | 539 | 'coursepage-epundo-title' => 'Undo revision of course "$1"', |
— | — | @@ -535,6 +541,8 @@ |
536 | 542 | 'coursepage-epundo-undo-button' => 'Undo revision', |
537 | 543 | 'coursepage-epundo-cancel-button' => 'Cancel', |
538 | 544 | 'coursepage-epundo-summary-value' => 'Undo revision made on $1 by $2', |
| 545 | + 'coursepage-epundo-undid' => 'Successfully undid revision of course $1.', |
| 546 | + 'coursepage-epundo-undo-failed' => 'Failed to undo revision of course $1.', |
539 | 547 | |
540 | 548 | // Course undeletion |
541 | 549 | 'coursepage-epundelete-title' => 'Undelete course "$1"', |
— | — | @@ -542,6 +550,10 @@ |
543 | 551 | 'coursepage-epundelete-summary' => 'Reason for undeletion:', |
544 | 552 | 'coursepage-epundelete-undelete-button' => 'Undelete course', |
545 | 553 | 'coursepage-epundelete-cancel-button' => 'Cancel', |
| 554 | + 'coursepage-epundelete-undid' => 'Successfully undeleted course $1.', |
| 555 | + 'coursepage-epundelete-undo-failed' => 'Failed to undelete course $1.', |
| 556 | + 'coursepage-epundelete-failed-norevs' => 'Failed to undelete course $1. It has no revisions to undelete.', |
| 557 | + 'coursepage-epundelete-failed-exists' => 'Failed to undelete course $1. It already exists.', |
546 | 558 | |
547 | 559 | // Institution undeletion |
548 | 560 | 'orgpage-epundelete-title' => 'Undelete institution "$1"', |
— | — | @@ -549,6 +561,10 @@ |
550 | 562 | 'orgpage-epundelete-summary' => 'Reason for undeletion:', |
551 | 563 | 'orgpage-epundelete-undelete-button' => 'Undelete institution', |
552 | 564 | 'orgpage-epundelete-cancel-button' => 'Cancel', |
| 565 | + 'orgpage-epundelete-undid' => 'Successfully undeleted institution $1.', |
| 566 | + 'orgpage-epundelete-undo-failed' => 'Failed to undelete institution $1.', |
| 567 | + 'orgpage-epundelete-failed-norevs' => 'Failed to undelete institution $1. It has no revisions to undelete.', |
| 568 | + 'orgpage-epundelete-failed-exists' => 'Failed to undelete institution $1. It already exists.', |
553 | 569 | |
554 | 570 | // Special:Ambassador |
555 | 571 | 'ep-ambassador-does-not-exist' => 'There is no ambassador with name "$1". See [[Special:Ambassadors|here]] for a list of ambassadors.', |