Commit 413d5f2935dd83515e0dc36e0de3695f645cc077
1 parent
a1f130d6
added methods to retrieve viewAlert link
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1125 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
14 additions
and
0 deletions
lib/subscriptions/Subscription.inc
| 1 | 1 | <?php |
| 2 | 2 | require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionConstants.inc"); |
| 3 | +require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 4 | +require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); | |
| 3 | 5 | |
| 4 | 6 | /** |
| 5 | 7 | * |
| ... | ... | @@ -151,6 +153,18 @@ class Subscription { |
| 151 | 153 | } |
| 152 | 154 | } |
| 153 | 155 | |
| 156 | + function getAlertLink() { | |
| 157 | + $sViewAlertUrl = "/control.presentation/lookAndFeel/knowledgeTree/subscriptions/viewAlertBL.php"; | |
| 158 | + $sViewAlertParams = "fSubscriptionID=" . $this->iID . "&fSubscriptionType=" . $this->iSubscriptionType; | |
| 159 | + | |
| 160 | + if ($this->iSubscriptionType == SubscriptionConstants::subscriptionType("DocumentSubscription")) { | |
| 161 | + return generateControllerLink("viewAlert", $sViewAlertParams, Document::getDocumentDisplayPath($this->iExternalID)); | |
| 162 | + } else if ($this->iSubscriptionType == SubscriptionConstants::subscriptionType("FolderSubscription")) { | |
| 163 | + return generateControllerLink("viewAlert", $sViewAlertParams, Folder::getFolderDisplayPath($this->iExternalID)); | |
| 164 | + } | |
| 165 | + | |
| 166 | + } | |
| 167 | + | |
| 154 | 168 | /** |
| 155 | 169 | * Create the current document subscription in the database |
| 156 | 170 | * | ... | ... |