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
resources: Collapse all jQuery UI modules into one deprecated mega-module
[lhc/web/wiklou.git]
/
includes
/
Revision
/
MainSlotRoleHandler.php
diff --git
a/includes/Revision/MainSlotRoleHandler.php
b/includes/Revision/MainSlotRoleHandler.php
index
6c6fdd6
..
0139103
100644
(file)
--- a/
includes/Revision/MainSlotRoleHandler.php
+++ b/
includes/Revision/MainSlotRoleHandler.php
@@
-86,10
+86,8
@@
class MainSlotRoleHandler extends SlotRoleHandler {
// Hook can determine default model
$title = Title::newFromLinkTarget( $page );
// Hook can determine default model
$title = Title::newFromLinkTarget( $page );
- if ( !Hooks::run( 'ContentHandlerDefaultModelFor', [ $title, &$model ] ) ) {
- if ( !is_null( $model ) ) {
- return $model;
- }
+ if ( !Hooks::run( 'ContentHandlerDefaultModelFor', [ $title, &$model ] ) && !is_null( $model ) ) {
+ return $model;
}
// Could this page contain code based on the title?
}
// Could this page contain code based on the title?
@@
-120,7
+118,7
@@
class MainSlotRoleHandler extends SlotRoleHandler {
case 'json':
return CONTENT_MODEL_JSON;
default:
case 'json':
return CONTENT_MODEL_JSON;
default:
- return
is_null( $model ) ? CONTENT_MODEL_TEXT : $model
;
+ return
$model ?? CONTENT_MODEL_TEXT
;
}
}
}
}