diff --git a/lib/subscriptions/subscriptions.inc.php b/lib/subscriptions/subscriptions.inc.php
index e61fe36..9d3f790 100644
--- a/lib/subscriptions/subscriptions.inc.php
+++ b/lib/subscriptions/subscriptions.inc.php
@@ -5,7 +5,7 @@
* KnowledgeTree Community Edition
* Document Management Made Simple
* Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc.
- *
+ *
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
@@ -580,6 +580,7 @@ class SubscriptionContent {
$restoreArchivedDocumentText = _kt('The document "').$info['object_name']._kt('" has been restored by an administrator');
$downloadDocumentText = _kt('The document "').$info['object_name']._kt('"');
$documentAlertText = _kt('An alert on the document "').$info['object_name']._kt('" has been added or modified');
+ $discussDocumentText = _kt('A discussion on the document "').$info['object_name']._kt('" has been updated');
if($info['location_name'] !== NULL && !$bulk_action){
$addFolderText .= _kt(' to "').$info['location_name']._kt('"');
@@ -701,6 +702,14 @@ class SubscriptionContent {
$links .= ' | '._kt('Clear Alert').'';
$url = $rootUrl.'/notify.php?id='.$info['notify_id'].'¬ify_action=viewall';
$links .= ' | '._kt('View all alerts on this document').'';
+ break;
+ case 'DiscussDocument':
+ $text = $discussDocumentText;
+ $url = $rootUrl.'/notify.php?id='.$info['notify_id'];
+ $links = ''._kt('View Document').'';
+ $url = $rootUrl.'/notify.php?id='.$info['notify_id'].'¬ify_action=clear';
+ $links .= ' | '._kt('Clear Alert').'';
+ break;
}
if($info['actor_name'] !== NULL && $info['event_type'] != 'RestoredArchivedDocument'){
diff --git a/plugins/ktstandard/KTSubscriptions.php b/plugins/ktstandard/KTSubscriptions.php
index eb69b9f..f99dca5 100644
--- a/plugins/ktstandard/KTSubscriptions.php
+++ b/plugins/ktstandard/KTSubscriptions.php
@@ -5,7 +5,7 @@
* KnowledgeTree Community Edition
* Document Management Made Simple
* Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc.
- *
+ *
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
@@ -65,6 +65,7 @@ class KTSubscriptionPlugin extends KTPlugin {
'ktstandard.subscription.documentsubscription');
$this->registerAction('documentsubscriptionaction', 'KTDocumentUnsubscriptionAction',
'ktstandard.subscription.documentunsubscription');
+
$this->registerTrigger('checkout', 'postValidate', 'KTCheckoutSubscriptionTrigger',
'ktstandard.triggers.subscription.checkout');
$this->registerTrigger('edit', 'postValidate', 'KTEditSubscriptionTrigger',
@@ -76,7 +77,8 @@ class KTSubscriptionPlugin extends KTPlugin {
$this->registerTrigger('archive', 'postValidate', 'KTArchiveSubscriptionTrigger',
'ktstandard.triggers.subscription.archive');
$this->registerTrigger('discussion', 'postValidate', 'KTDiscussionSubscriptionTrigger',
- 'ktstandard.triggers.subscription.archive');
+ 'ktstandard.triggers.subscription.discussion');
+
$this->registerAction('foldersubscriptionaction', 'KTFolderSubscriptionAction',
'ktstandard.subscription.foldersubscription');
$this->registerAction('foldersubscriptionaction', 'KTFolderUnsubscriptionAction',
diff --git a/search2/indexing/indexerCore.inc.php b/search2/indexing/indexerCore.inc.php
index 967bdc2..4db8bbb 100644
--- a/search2/indexing/indexerCore.inc.php
+++ b/search2/indexing/indexerCore.inc.php
@@ -643,6 +643,11 @@ abstract class Indexer
$default->log->debug("index: Queuing indexing of $document_id");
+ // If we're indexing a discussion, re-processing is not needed.
+ if($what === 'D'){
+ return true;
+ }
+
// Appending the process queue to the index for convenience
// Don't want to complicate matters by creating too many new classes and files
Indexer::unqueueDocFromProcessing($document_id);