Index: trunk/phase3/includes/Exception.php |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | * $wgOut to output the exception. |
228 | 228 | */ |
229 | 229 | function htmlHeader() { |
230 | | - global $wgLogo, $wgOutputEncoding; |
| 230 | + global $wgLogo, $wgOutputEncoding, $wgLang; |
231 | 231 | |
232 | 232 | if ( !headers_sent() ) { |
233 | 233 | header( 'HTTP/1.0 500 Internal Server Error' ); |
— | — | @@ -236,23 +236,29 @@ |
237 | 237 | header( 'Pragma: nocache' ); |
238 | 238 | } |
239 | 239 | |
240 | | - $logo = htmlspecialchars( $wgLogo, ENT_QUOTES ); |
241 | | - $title = htmlspecialchars( $this->getPageTitle() ); |
| 240 | + $title = Html::element( 'title', null, $this->getPageTitle() ); |
242 | 241 | |
243 | | - return "<html> |
244 | | - <head> |
245 | | - <title>$title</title> |
246 | | - </head> |
247 | | - <body> |
248 | | - <h1><img src='$logo' style='float:left;margin-right:1em' alt=''/>$title</h1> |
249 | | - "; |
| 242 | + $left = $wgLang->alignStart(); |
| 243 | + $right = $wgLang->alignEnd(); |
| 244 | + $header = Html::element( 'img', array( |
| 245 | + 'src' => $wgLogo, |
| 246 | + 'style' => "float: $left; margin-$right: 1em;", |
| 247 | + 'alt' => '' ), $this->getPageTitle() ); |
| 248 | + |
| 249 | + $attribs = array( 'dir' => $wgLang->getDir(), 'lang' => $wgLang->getCode() ); |
| 250 | + |
| 251 | + return |
| 252 | + Html::htmlHeader( $attribs ) . |
| 253 | + Html::rawElement( 'head', null, $title ) . "\n". |
| 254 | + Html::openElement( 'body' ) . "\n" . |
| 255 | + Html::rawElement( 'h1', null, $header ) . "\n"; |
250 | 256 | } |
251 | 257 | |
252 | 258 | /** |
253 | 259 | * print the end of the html page if not using $wgOut. |
254 | 260 | */ |
255 | 261 | function htmlFooter() { |
256 | | - return "</body></html>"; |
| 262 | + return Html::closeElement( 'body' ) . Html::closeElement( 'html' ); |
257 | 263 | } |
258 | 264 | |
259 | 265 | /** |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -65,6 +65,7 @@ |
66 | 66 | pages to be queried via the API and Special:ProtectedPages, and allowing |
67 | 67 | disabling upload protection by removing it from $wgRestrictionTypes. |
68 | 68 | * If an edit summary exceeds 250 bytes and is truncated, add an ellipse |
| 69 | +* (bug 26638) Database error pages display correctly in RTL languages |
69 | 70 | |
70 | 71 | === API changes in 1.18 === |
71 | 72 | * (bug 26339) Throw warning when truncating an overlarge API result |