From: Brion Vibber Date: Sat, 21 Aug 2004 09:32:34 +0000 (+0000) Subject: Don't load DifferenceEngine.php when not needed. This saves 200-300kb of ram. X-Git-Tag: 1.5.0alpha1~2278 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=d64197636f6ee2a16a6014d8bff972e4971a4f96;p=lhc%2Fweb%2Fwiklou.git Don't load DifferenceEngine.php when not needed. This saves 200-300kb of ram. --- diff --git a/includes/Article.php b/includes/Article.php index 7a2f02f8f9..fb2b94e5e6 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -661,6 +661,7 @@ class Article { # diff page instead of the article. if ( !is_null( $diff ) ) { + require_once( 'DifferenceEngine.php' ); $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); $de = new DifferenceEngine( intval($oldid), intval($diff), intval($rcid) ); $de->showDiffPage(); diff --git a/includes/EditPage.php b/includes/EditPage.php index 955dd7d110..0018b5a907 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -459,6 +459,7 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . edittime}\" name=\"wpEdittime\" />\n" ); if ( $isConflict ) { + require_once( "DifferenceEngine.php" ); $wgOut->addHTML( "

" . wfMsg( "yourdiff" ) . "

\n" ); DifferenceEngine::showDiff( $this->textbox2, $this->textbox1, wfMsg( "yourtext" ), wfMsg( "storedversion" ) ); diff --git a/includes/Setup.php b/includes/Setup.php index 280cbbd525..ee26068403 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -56,7 +56,6 @@ require_once( 'MagicWord.php' ); require_once( 'memcached-client.php' ); require_once( 'Block.php' ); require_once( 'SearchEngine.php' ); -require_once( 'DifferenceEngine.php' ); require_once( 'MessageCache.php' ); require_once( 'BlockCache.php' ); require_once( 'Parser.php' );