Index: trunk/extensions/CodeReview/SpecialCode.php |
— | — | @@ -47,9 +47,12 @@ |
48 | 48 | $view = new CodeRevisionStatusView( $params[0], $params[2] ); |
49 | 49 | break; |
50 | 50 | } else { |
51 | | - throw new MWException( "Unexpected number of parameters" ); |
| 51 | + # Nonsense param, back out |
| 52 | + $view = new CodeRevisionListView( $params[0] ); |
| 53 | + break; |
52 | 54 | } |
53 | 55 | case 4: |
| 56 | + default: |
54 | 57 | if( $params[2] == 'reply' ) { |
55 | 58 | $view = new CodeRevisionView( $params[0], $params[1], $params[3] ); |
56 | 59 | break; |
— | — | @@ -60,8 +63,7 @@ |
61 | 64 | $view = new CodeRevisionStatusSetter( $params[0], $params[1] ); |
62 | 65 | break; |
63 | 66 | } |
64 | | - default: |
65 | | - throw new MWException( "Unexpected number of parameters" ); |
| 67 | + throw new MWException( "Invalid action specified" ); |
66 | 68 | } |
67 | 69 | } |
68 | 70 | $view->execute(); |