Index: trunk/extensions/Awesomeness/Awesomeness.php |
— | — | @@ -44,23 +44,21 @@ |
45 | 45 | * Based on Svips patch at http://bug-attachment.wikimedia.org/attachment.cgi?id=7351 |
46 | 46 | */ |
47 | 47 | if ( array_key_exists( 'QUERY_STRING', $_SERVER ) ) { |
| 48 | + header( 'Content-Type: text/plain' ); |
48 | 49 | |
49 | | - switch ( strtolower( $_SERVER['QUERY_STRING'] ) ) |
50 | | - { |
| 50 | + switch ( strtolower( $_SERVER['QUERY_STRING'] ) ) { |
51 | 51 | case 'o_o': |
52 | | - header( 'Content-Type: text/plain' ); |
53 | | - die( $_SERVER['QUERY_STRING'] == 'O_o' ? 'o_O' : 'O_o' ); |
54 | | - |
| 52 | + $O_o = ( $_SERVER['QUERY_STRING'] == 'O_o' ) ? 'o_O' : 'O_o'; |
| 53 | + break; |
55 | 54 | case 'o_0': |
56 | | - header( 'Content-Type: text/plain' ); |
57 | | - die( '0_o' ); |
58 | | - |
| 55 | + $O_o = '0_o'; |
| 56 | + break; |
59 | 57 | case '0_o': |
60 | | - header( 'Content-Type: text/plain' ); |
61 | | - die( 'o_0' ); |
62 | | - |
| 58 | + $O_o = 'o_0'; |
| 59 | + break; |
63 | 60 | case 'isthiswikiawesome': |
64 | | - header( 'Content-Type: text/plain' ); |
65 | | - die( 'hell yeah!' ); |
| 61 | + $O_o = 'Hell yeah!'; |
66 | 62 | } |
| 63 | + |
| 64 | + die( $O_o ); |
67 | 65 | } |
\ No newline at end of file |