summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-05-02 22:23:47 +0200
committerMichael Hamann <michael@content-space.de>2011-05-02 22:23:47 +0200
commitd041f8dbb022a5e66928f6ee2d591ad6fe176984 (patch)
tree841a7f88df89ca72a43661a48561e2483c92c703 /inc/indexer.php
parent2e1018bc8c867d51647ed2934c8129d39a1cf4e1 (diff)
downloadrpg-d041f8dbb022a5e66928f6ee2d591ad6fe176984.tar.gz
rpg-d041f8dbb022a5e66928f6ee2d591ad6fe176984.tar.bz2
Add a force option to idx_addPage()
Diffstat (limited to 'inc/indexer.php')
-rw-r--r--inc/indexer.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index 03008cd71..107845e24 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -1166,13 +1166,14 @@ function & idx_get_stopwords() {
*
* @param string $page name of the page to index
* @param boolean $verbose print status messages
+ * @param boolean $force force reindexing even when the index is up to date
* @return boolean the function completed successfully
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
-function idx_addPage($page, $verbose=false) {
+function idx_addPage($page, $verbose=false, $force=false) {
// check if indexing needed
$idxtag = metaFN($page,'.indexed');
- if(@file_exists($idxtag)){
+ if(!$force && @file_exists($idxtag)){
if(trim(io_readFile($idxtag)) == idx_get_version()){
$last = @filemtime($idxtag);
if($last > @filemtime(wikiFN($page))){