dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d641976
)
Don't include SearchEngine.php when it's not used. Saves about 180k of memory at...
author
Brion Vibber
<brion@users.mediawiki.org>
Sat, 21 Aug 2004 09:51:01 +0000
(09:51 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Sat, 21 Aug 2004 09:51:01 +0000
(09:51 +0000)
includes/SearchUpdate.php
patch
|
blob
|
history
includes/Setup.php
patch
|
blob
|
history
includes/SpecialSearch.php
patch
|
blob
|
history
includes/Title.php
patch
|
blob
|
history
index.php
patch
|
blob
|
history
diff --git
a/includes/SearchUpdate.php
b/includes/SearchUpdate.php
index
9cbbb61
..
fd0a10a
100644
(file)
--- a/
includes/SearchUpdate.php
+++ b/
includes/SearchUpdate.php
@@
-30,6
+30,7
@@
class SearchUpdate {
if( $wgDisableSearchUpdate || !$this->mId ) {
return false;
}
if( $wgDisableSearchUpdate || !$this->mId ) {
return false;
}
+ require_once( 'SearchEngine.php' );
$lc = SearchEngine::legalSearchChars() . "&#;";
$db =& wfGetDB( DB_MASTER );
$searchindex = $db->tableName( 'searchindex' );
$lc = SearchEngine::legalSearchChars() . "&#;";
$db =& wfGetDB( DB_MASTER );
$searchindex = $db->tableName( 'searchindex' );
diff --git
a/includes/Setup.php
b/includes/Setup.php
index
ee26068
..
363f4c2
100644
(file)
--- a/
includes/Setup.php
+++ b/
includes/Setup.php
@@
-55,7
+55,6
@@
require_once( 'Article.php' );
require_once( 'MagicWord.php' );
require_once( 'memcached-client.php' );
require_once( 'Block.php' );
require_once( 'MagicWord.php' );
require_once( 'memcached-client.php' );
require_once( 'Block.php' );
-require_once( 'SearchEngine.php' );
require_once( 'MessageCache.php' );
require_once( 'BlockCache.php' );
require_once( 'Parser.php' );
require_once( 'MessageCache.php' );
require_once( 'BlockCache.php' );
require_once( 'Parser.php' );
diff --git
a/includes/SpecialSearch.php
b/includes/SpecialSearch.php
index
9ce1ca0
..
ad815a1
100644
(file)
--- a/
includes/SpecialSearch.php
+++ b/
includes/SpecialSearch.php
@@
-21,6
+21,7
@@
function wfSpecialSearch( $par ) {
global $wgOutput;
function wfSpecialSearch( $par ) {
global $wgOutput;
+ require_once( 'SearchEngine.php' );
$searchEngine = new SearchEngine( $par );
$searchEngine->showResults();
}
$searchEngine = new SearchEngine( $par );
$searchEngine->showResults();
}
diff --git
a/includes/Title.php
b/includes/Title.php
index
2b4e562
..
198d5f9
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-207,6
+207,7
@@
class Title {
# Takes a namespace index and a text-form main part
/* static */ function indexTitle( $ns, $title ) {
global $wgDBminWordLen, $wgLang;
# Takes a namespace index and a text-form main part
/* static */ function indexTitle( $ns, $title ) {
global $wgDBminWordLen, $wgLang;
+ require_once( 'SearchEngine.php' );
$lc = SearchEngine::legalSearchChars() . '&#;';
$t = $wgLang->stripForSearch( $title );
$lc = SearchEngine::legalSearchChars() . '&#;';
$t = $wgLang->stripForSearch( $title );
diff --git
a/index.php
b/index.php
index
b22c63b
..
ee3e56d
100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-60,7
+60,8
@@
if ( !is_null( $wgTitle ) && !$wgTitle->userCanRead() ) {
exit;
}
exit;
}
-if ( $search = $wgRequest->getText( 'search' ) ) {
+if( $search = $wgRequest->getText( 'search' ) ) {
+ require_once( 'SearchEngine.php' );
$wgTitle = Title::makeTitle( NS_SPECIAL, "Search" );
$searchEngine = new SearchEngine( $search );
if( $wgRequest->getVal( 'fulltext' ) ||
$wgTitle = Title::makeTitle( NS_SPECIAL, "Search" );
$searchEngine = new SearchEngine( $search );
if( $wgRequest->getVal( 'fulltext' ) ||