dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "OOUI theme support"
[lhc/web/wiklou.git]
/
includes
/
exception
/
HttpError.php
diff --git
a/includes/exception/HttpError.php
b/includes/exception/HttpError.php
index
b81c573
..
d3ee9b9
100644
(file)
--- a/
includes/exception/HttpError.php
+++ b/
includes/exception/HttpError.php
@@
-35,7
+35,7
@@
class HttpError extends MWException {
*
* @param int $httpCode HTTP status code to send to the client
* @param string|Message $content Content of the message
*
* @param int $httpCode HTTP status code to send to the client
* @param string|Message $content Content of the message
- * @param string|Message $header Content of the header (\<title\> and \<h1\>)
+ * @param string|Message
|null
$header Content of the header (\<title\> and \<h1\>)
*/
public function __construct( $httpCode, $content, $header = null ) {
parent::__construct( $content );
*/
public function __construct( $httpCode, $content, $header = null ) {
parent::__construct( $content );
@@
-113,21
+113,21
@@
class HttpError extends MWException {
*/
public function getHTML() {
if ( $this->header === null ) {
*/
public function getHTML() {
if ( $this->header === null ) {
- $
header = HttpStatus::getMessage( $this->httpCode
);
+ $
titleHtml = htmlspecialchars( HttpStatus::getMessage( $this->httpCode )
);
} elseif ( $this->header instanceof Message ) {
} elseif ( $this->header instanceof Message ) {
- $
header
= $this->header->escaped();
+ $
titleHtml
= $this->header->escaped();
} else {
} else {
- $
header
= htmlspecialchars( $this->header );
+ $
titleHtml
= htmlspecialchars( $this->header );
}
if ( $this->content instanceof Message ) {
}
if ( $this->content instanceof Message ) {
- $content = $this->content->escaped();
+ $content
Html
= $this->content->escaped();
} else {
} else {
- $content = htmlspecialchars( $this->content );
+ $content
Html
= htmlspecialchars( $this->content );
}
return "<!DOCTYPE html>\n" .
}
return "<!DOCTYPE html>\n" .
- "<html><head><title>$
header
</title></head>\n" .
- "<body><h1>$
header</h1><p>$content
</p></body></html>\n";
+ "<html><head><title>$
titleHtml
</title></head>\n" .
+ "<body><h1>$
titleHtml</h1><p>$contentHtml
</p></body></html>\n";
}
}
}
}