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 "EditPage: In the list of "templates used", highlight redirect templates"
[lhc/web/wiklou.git]
/
includes
/
content
/
JsonContentHandler.php
diff --git
a/includes/content/JsonContentHandler.php
b/includes/content/JsonContentHandler.php
index
b149f52
..
edb21f6
100644
(file)
--- a/
includes/content/JsonContentHandler.php
+++ b/
includes/content/JsonContentHandler.php
@@
-30,13
+30,18
@@
class JsonContentHandler extends CodeContentHandler {
public function __construct( $modelId = CONTENT_MODEL_JSON ) {
class JsonContentHandler extends CodeContentHandler {
public function __construct( $modelId = CONTENT_MODEL_JSON ) {
- parent::__construct( $modelId,
array( CONTENT_FORMAT_JSON )
);
+ parent::__construct( $modelId,
[ CONTENT_FORMAT_JSON ]
);
}
/**
* @return string
*/
protected function getContentClass() {
}
/**
* @return string
*/
protected function getContentClass() {
- return 'JsonContent';
+ return JsonContent::class;
+ }
+
+ public function makeEmptyContent() {
+ $class = $this->getContentClass();
+ return new $class( '{}' );
}
}
}
}