Index: trunk/extensions/SecurePoll/includes/Entity.php |
— | — | @@ -167,17 +167,13 @@ |
168 | 168 | * a placeholder string is returned. |
169 | 169 | * |
170 | 170 | * @param $name string |
171 | | - * @param $language string Set this to false for the current language. |
172 | 171 | */ |
173 | | - function getMessage( $name, $language = false ) { |
174 | | - if ( $language === false ) { |
175 | | - $language = reset( self::$languages ); |
176 | | - } |
177 | | - if ( empty( $this->messagesLoaded[$language] ) ) { |
178 | | - $this->loadMessages( $language ); |
179 | | - } |
| 172 | + function getMessage( $name ) { |
180 | 173 | $id = $this->getId(); |
181 | 174 | foreach ( self::$languages as $language ) { |
| 175 | + if ( empty( $this->messagesLoaded[$language] ) ) { |
| 176 | + $this->loadMessages( $language ); |
| 177 | + } |
182 | 178 | if ( isset( self::$messageCache[$language][$id][$name] ) ) { |
183 | 179 | return self::$messageCache[$language][$id][$name]; |
184 | 180 | } |