WikiPage: Remove premature Content::isValid check
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 2 Dec 2014 00:35:47 +0000 (00:35 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 2 Dec 2014 00:35:47 +0000 (00:35 +0000)
commit3d920f00be3f6eb6fa8785b730f53d57a665cbdf
treedffc46bf4b8b9132696bde6c900c5aa03c6b976c
parent3987d5b40a08eeaa10067bc2b20e97958eaa44fd
WikiPage: Remove premature Content::isValid check

Content classes that implement the isValid method are causing
an "Internal error" to appear when saving from EditPage because
WikiPage throws an exception that isn't handled anywhere.

Turns out that ContentHandler already has infrastructure for
this in place in Content::prepareSave (which returns a Status
object with a relevant message informing the user), and WikiPage
is actually calling this already right after this.

Content::prepareSave defaults to using Content::isValid, so this
code is simply obsolete and premature as it calls an internal
method directly without handling it accordingly.

Change-Id: I69f18d9e101c2261b0ff7bd1b0459ea7fdd7ae9f
includes/page/WikiPage.php