Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -47,11 +47,13 @@ |
48 | 48 | } |
49 | 49 | |
50 | 50 | function buildForm() { |
51 | | - $url = $this->getTitle()->escapeLocalURL(); |
| 51 | + global $wgScript; |
| 52 | + |
| 53 | + $action = htmlspecialchars( $wgScript ); |
52 | 54 | $languages = Language::getLanguageNames( false ); |
53 | 55 | ksort( $languages ); |
54 | 56 | |
55 | | - $out = "<form method=\"get\" action=\"$url\"><fieldset>\n" . |
| 57 | + $out = "<form method=\"get\" action=\"$action\"><fieldset>\n" . |
56 | 58 | Xml::hidden( 'title', $this->getTitle() ) . |
57 | 59 | Xml::element( 'legend', null, wfMsg( 'allmessages' ) ) . "<table><tr>\n" . |
58 | 60 | "<td class=\"mw-label\">" . |
— | — | @@ -198,7 +200,7 @@ |
199 | 201 | if( $s->page_namespace == NS_MEDIAWIKI ){ |
200 | 202 | if( $this->foreign ){ |
201 | 203 | $title = explode( '/', $s->page_title ); |
202 | | - if( $this->langcode == $title[1] && array_key_exists( $title[0], $this->messages ) ){ |
| 204 | + if( count($title) === 2 && $this->langcode == $title[1] && array_key_exists( $title[0], $this->messages ) ){ |
203 | 205 | $this->messages["{$title[0]}"]['customised'] = 1; |
204 | 206 | } |
205 | 207 | } else if( array_key_exists( $s->page_title , $this->messages ) ){ |
— | — | @@ -230,7 +232,7 @@ |
231 | 233 | ( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) && |
232 | 234 | (( $this->prefix && preg_match( $this->prefix, $key ) ) || $this->prefix === false ) |
233 | 235 | ){ |
234 | | - $mResult->result[] = array( |
| 236 | + $mResult->result[] = array( |
235 | 237 | 'am_title' => $key, |
236 | 238 | 'am_actual' => $value['actual'], |
237 | 239 | 'am_default' => $value['default'], |