From d60e6c6fad21357361116d86d60da92463b505c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 10 Nov 2005 10:30:25 +0000 Subject: [PATCH] * Rewrote magnus's spaghetti-hook, see http://mail.wikimedia.org/pipermail/wikitech-l/2005-November/032426.html --- includes/EditPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" ); -- 2.20.1