From: Ævar Arnfjörð Bjarmason Date: Thu, 10 Nov 2005 10:30:25 +0000 (+0000) Subject: * Rewrote magnus's spaghetti-hook, see http://mail.wikimedia.org/pipermail/wikitech... X-Git-Tag: 1.6.0~1197 X-Git-Url: http://git.cyclocoop.org/geomaker.php?a=commitdiff_plain;h=d60e6c6fad21357361116d86d60da92463b505c7;p=lhc%2Fweb%2Fwiklou.git * Rewrote magnus's spaghetti-hook, see mail.wikimedia.org/pipermail/wikitech-l/2005-November/032426.html --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 4cd9884bc8..1b5f4a0f01 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -154,10 +154,10 @@ class EditPage { */ function edit() { global $wgOut, $wgUser, $wgRequest, $wgTitle; - $l = strlen ( $wgOut->mBodytext ) ; - wfRunHooks( 'AlternateEdit', array( &$this ) ) ; - if ( $l != strlen ( $wgOut->mBodytext ) ) return ; # Something's changed the text, my work here is done - + + if ( ! wfRunHooks( 'AlternateEdit', array( &$this ) ) ) + return; + $fname = 'EditPage::edit'; wfProfileIn( $fname ); wfDebug( "$fname: enter\n" );