X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision%2FMainSlotRoleHandler.php;h=013910346db6e67b9f528cd6d572c38c7567333d;hb=ff320d9e49f1e67c2b3dad42503b9f16ce089250;hp=f3e5a8570d201be5318fe4686f49cf1ea51263dc;hpb=d1a497a9f4c2a5c50914e19aee1e97f849cef6ca;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision/MainSlotRoleHandler.php b/includes/Revision/MainSlotRoleHandler.php index f3e5a8570d..013910346d 100644 --- 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 ); - 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?