summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/indexer.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/indexer.php b/bin/indexer.php
index d5f4c6446..c62f97882 100755
--- a/bin/indexer.php
+++ b/bin/indexer.php
@@ -13,7 +13,7 @@ session_write_close();
// Version tag used to force rebuild on upgrade
// Need to keep in sync with lib/exe/indexer.php
-if(!defined('INDEXER_VERSION')) define('INDEXER_VERSION', 1);
+if(!defined('INDEXER_VERSION')) define('INDEXER_VERSION', 2);
// handle options
$short_opts = 'hcuq';
@@ -68,6 +68,14 @@ function _usage() {
function _update(){
global $conf;
+
+ // upgrade to version 2
+ if (!@file_exists($conf['indexdir'].'/pageword.idx')){
+ _lock();
+ idx_upgradePageWords();
+ _unlock();
+ }
+
$data = array();
_quietecho("Searching pages... ");
search($data,$conf['datadir'],'search_allpages',array());