summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-01-23 20:23:26 +0100
committerMichael Hamann <michael@content-space.de>2011-01-23 20:23:26 +0100
commit8605afb1b4e2a6a9e11e21a7bf0775bbb0d5af03 (patch)
tree8cdfbd3a9a4b35db5b5eb664a8a3a85c590e91d3 /inc/indexer.php
parent320f489ae6a653f52f9d489b84b9bdd26f4241ac (diff)
downloadrpg-8605afb1b4e2a6a9e11e21a7bf0775bbb0d5af03.tar.gz
rpg-8605afb1b4e2a6a9e11e21a7bf0775bbb0d5af03.tar.bz2
Add INDEXER_VERSION_GET event so plugins can add their version
This allows plugins to add their own version strings like plugin_tag=1 so pages can be reindexed when plugins update their index content.
Diffstat (limited to 'inc/indexer.php')
-rw-r--r--inc/indexer.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index 8859ada33..91d6842e4 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -51,13 +51,18 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')');
* The indexer is only compatible with data written by the same version.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ * @author Michael Hamann <michael@content-space.de>
*/
function idx_get_version(){
global $conf;
if($conf['external_tokenizer'])
- return INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']);
+ $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']);
else
- return INDEXER_VERSION;
+ $version = INDEXER_VERSION;
+
+ $data = array($version);
+ trigger_event('INDEXER_VERSION_GET', $data, null, false);
+ return implode('+', $data);
}
/**