From: Framawiki Date: Tue, 12 Dec 2017 18:21:02 +0000 (+0100) Subject: ContentHandler: simplify tag tests X-Git-Tag: 1.31.0-rc.0~1189^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=41dcd3f25f9a092472f44f1a513ea45a259ff038;p=lhc%2Fweb%2Fwiklou.git ContentHandler: simplify tag tests Follows up 62713be990. Change-Id: Id1f7e6ae470b461e26ef8b7346f715873ccea4c9 --- diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 50cc9b55ff..edfc81cc95 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -799,13 +799,13 @@ abstract class ContentHandler { } // New page created - if ( $flags & EDIT_NEW && $newContent && $newContent->getSize() > 0 ) { - return 'newpage'; - } - - // New blank page - if ( $flags & EDIT_NEW && $newContent && $newContent->getSize() === 0 ) { - return 'newblank'; + if ( $flags & EDIT_NEW && $newContent ) { + if ( $newContent->getSize() === 0 ) { + // New blank page + return 'newblank'; + } else { + return 'newpage'; + } } // Removing more than 90% of the page