From 24522b715d2c455bfbfae46c8f64b3da649b5cae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 18 Jul 2009 07:47:22 +0000 Subject: [PATCH] * Whitespace * Post to $wgScript.. we do not need crawlers here * E_NOTICE with unchecked use of explode results --- includes/specials/SpecialAllmessages.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index 06474b4839..fbf9e83275 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -47,11 +47,13 @@ class SpecialAllmessages extends SpecialPage { } function buildForm() { - $url = $this->getTitle()->escapeLocalURL(); + global $wgScript; + + $action = htmlspecialchars( $wgScript ); $languages = Language::getLanguageNames( false ); ksort( $languages ); - $out = "
\n" . + $out = "
\n" . Xml::hidden( 'title', $this->getTitle() ) . Xml::element( 'legend', null, wfMsg( 'allmessages' ) ) . "\n" . "
" . @@ -198,7 +200,7 @@ class AllmessagesTablePager extends TablePager { if( $s->page_namespace == NS_MEDIAWIKI ){ if( $this->foreign ){ $title = explode( '/', $s->page_title ); - if( $this->langcode == $title[1] && array_key_exists( $title[0], $this->messages ) ){ + if( count($title) === 2 && $this->langcode == $title[1] && array_key_exists( $title[0], $this->messages ) ){ $this->messages["{$title[0]}"]['customised'] = 1; } } else if( array_key_exists( $s->page_title , $this->messages ) ){ @@ -230,7 +232,7 @@ class AllmessagesTablePager extends TablePager { ( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) && (( $this->prefix && preg_match( $this->prefix, $key ) ) || $this->prefix === false ) ){ - $mResult->result[] = array( + $mResult->result[] = array( 'am_title' => $key, 'am_actual' => $value['actual'], 'am_default' => $value['default'], -- 2.20.1