Commit 03096c5e249e5b78cd6ccfff6f084a2191a86a74

Authored by bshuttle
1 parent 977cbbf9

fix for KTS-1201: notifications do not appear on dashboard.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5754 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/dashboard/Notification.inc.php
... ... @@ -108,7 +108,7 @@ class KTNotification extends KTEntity {
108 108 function render() {
109 109 $notificationRegistry =& KTNotificationRegistry::getSingleton();
110 110 $handler = $notificationRegistry->getHandler($this->sType);
111   -
  111 +
112 112 if (is_null($handler)) { return null; }
113 113  
114 114 return $handler->handleNotification($this);
... ... @@ -134,9 +134,6 @@ class KTNotification extends KTEntity {
134 134  
135 135 /** register the base handlers. */
136 136  
137   -
138   -$notificationRegistry =& KTNotificationRegistry::getSingleton();
139   -
140 137 // abstract base-class for notification handler.
141 138 class KTNotificationHandler extends KTStandardDispatcher {
142 139  
... ... @@ -358,8 +355,6 @@ class KTSubscriptionNotification extends KTNotificationHandler {
358 355  
359 356 }
360 357  
361   -$notificationRegistry->registerNotificationHandler("ktcore/subscriptions","KTSubscriptionNotification");
362   -
363 358 class KTWorkflowNotification extends KTNotificationHandler {
364 359  
365 360 function & clearNotificationsForDocument($oDocument) {
... ... @@ -430,6 +425,4 @@ class KTWorkflowNotification extends KTNotificationHandler {
430 425 }
431 426 }
432 427  
433   -$notificationRegistry->registerNotificationHandler("ktcore/workflow","KTWorkflowNotification");
434   -
435 428 ?>
... ...
plugins/ktcore/KTCorePlugin.php
... ... @@ -69,6 +69,8 @@ class KTCorePlugin extends KTPlugin {
69 69 // $this->registerAction('folderaction', 'KTDocumentAssistAction', 'ktcore.actions.folder.assist', 'KTAssist.php');
70 70  
71 71 $this->registerNotificationHandler('KTAssistNotification', 'ktcore/assist', 'KTAssist.php');
  72 + $this->registerNotificationHandler("KTSubscriptionNotification", "ktcore/subscriptions", KT_LIB_DIR . '/dashboard/Notification.inc.php');
  73 + $this->registerNotificationHandler("KTWorkflowNotification", "ktcore/workflow", KT_LIB_DIR . '/dashboard/Notification.inc.php');
72 74  
73 75  
74 76 // Permissions
... ...