Commit 47848f7dbd8df29fcf2ce3d61dfb5ab3eb6c70db
1 parent
dccd4486
added attribution string to subscription emails
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2524 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
15 additions
and
12 deletions
lib/alert/AlertContent.inc
| @@ -52,61 +52,63 @@ class AlertContent { | @@ -52,61 +52,63 @@ class AlertContent { | ||
| 52 | SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => $sSubject . "Restored Document"); | 52 | SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => $sSubject . "Restored Document"); |
| 53 | 53 | ||
| 54 | $sViewAlertParams = "fSubscriptionID=" . $aValues["subscriptionID"] . "&fSubscriptionType=" . $aValues["subscriptionType"]; | 54 | $sViewAlertParams = "fSubscriptionID=" . $aValues["subscriptionID"] . "&fSubscriptionType=" . $aValues["subscriptionType"]; |
| 55 | + $oUser = User::get($_SESSION["userID"]); | ||
| 56 | + $sAttribution = $oUser ? " by " . $oUser->getName() : ""; | ||
| 55 | $aAlertContent = array(SubscriptionConstants::subscriptionAlertType("AddFolder") => | 57 | $aAlertContent = array(SubscriptionConstants::subscriptionAlertType("AddFolder") => |
| 56 | - "A new folder '" . $aValues["newFolderName"] . "' has been added to folder '" . $aValues["parentFolderName"] . "'.<br>" . | 58 | + "A new folder '" . $aValues["newFolderName"] . "' has been added to folder '" . $aValues["parentFolderName"] . "'$sAttribution.<br>" . |
| 57 | "Please clear this subscription alert by clicking on the following link: " . | 59 | "Please clear this subscription alert by clicking on the following link: " . |
| 58 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"]), | 60 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"]), |
| 59 | 61 | ||
| 60 | SubscriptionConstants::subscriptionAlertType("RemoveSubscribedFolder") => | 62 | SubscriptionConstants::subscriptionAlertType("RemoveSubscribedFolder") => |
| 61 | - "The folder '" . $aValues["removedFolderName"] . "' has been removed from folder '" . $aValues["parentFolderName"] . "'.<br>" . | 63 | + "The folder '" . $aValues["removedFolderName"] . "' has been removed from folder '" . $aValues["parentFolderName"] . "'$sAttribution.<br>" . |
| 62 | "Your subscription to this folder has been removed also.", | 64 | "Your subscription to this folder has been removed also.", |
| 63 | 65 | ||
| 64 | SubscriptionConstants::subscriptionAlertType("RemoveChildFolder") => | 66 | SubscriptionConstants::subscriptionAlertType("RemoveChildFolder") => |
| 65 | - "The folder '" . $aValues["removedFolderName"] . "' has been removed from folder '" . $aValues["parentFolderName"] . "'.<br>" . | 67 | + "The folder '" . $aValues["removedFolderName"] . "' has been removed from folder '" . $aValues["parentFolderName"] . "'$sAttribution.<br>" . |
| 66 | "Please clear this subscription alert by clicking on the following link: " . | 68 | "Please clear this subscription alert by clicking on the following link: " . |
| 67 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"]), | 69 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"]), |
| 68 | 70 | ||
| 69 | SubscriptionConstants::subscriptionAlertType("AddDocument") => | 71 | SubscriptionConstants::subscriptionAlertType("AddDocument") => |
| 70 | - "A new document '" . $aValues["newDocumentName"] . "' has been added to folder '" . $aValues["folderName"] . "'.<br>" . | 72 | + "A new document '" . $aValues["newDocumentName"] . "' has been added to folder '" . $aValues["folderName"] . "'$sAttribution.<br>" . |
| 71 | "Please clear this subscription alert by clicking on the following link: " . | 73 | "Please clear this subscription alert by clicking on the following link: " . |
| 72 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["newDocumentName"]), | 74 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["newDocumentName"]), |
| 73 | 75 | ||
| 74 | SubscriptionConstants::subscriptionAlertType("RemoveChildDocument") => | 76 | SubscriptionConstants::subscriptionAlertType("RemoveChildDocument") => |
| 75 | - "The document '" . $aValues["removedDocumentName"] . "' has been removed from folder '" . $aValues["folderName"] . "'.<br>" . | 77 | + "The document '" . $aValues["removedDocumentName"] . "' has been removed from folder '" . $aValues["folderName"] . "'$sAttribution.<br>" . |
| 76 | "Please clear this subscription alert by clicking on the following link: " . | 78 | "Please clear this subscription alert by clicking on the following link: " . |
| 77 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["removedDocumentName"]), | 79 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["removedDocumentName"]), |
| 78 | 80 | ||
| 79 | SubscriptionConstants::subscriptionAlertType("RemoveSubscribedDocument") => | 81 | SubscriptionConstants::subscriptionAlertType("RemoveSubscribedDocument") => |
| 80 | - "The document '" . $aValues["removedDocumentName"] . "' has been removed from folder '" . $aValues["folderName"] . "'.<br>" . | 82 | + "The document '" . $aValues["removedDocumentName"] . "' has been removed from folder '" . $aValues["folderName"] . "'$sAttribution.<br>" . |
| 81 | "Your subscription to this document has been removed also.", | 83 | "Your subscription to this document has been removed also.", |
| 82 | 84 | ||
| 83 | SubscriptionConstants::subscriptionAlertType("ModifyDocument") => | 85 | SubscriptionConstants::subscriptionAlertType("ModifyDocument") => |
| 84 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been modified.<br>" . | 86 | + "The document '" . $aValues["modifiedDocumentName"] . "' has been modified$sAttribution.<br>" . |
| 85 | "Please clear this subscription alert by clicking on the following link: " . | 87 | "Please clear this subscription alert by clicking on the following link: " . |
| 86 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), | 88 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 87 | 89 | ||
| 88 | SubscriptionConstants::subscriptionAlertType("CheckInDocument") => | 90 | SubscriptionConstants::subscriptionAlertType("CheckInDocument") => |
| 89 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been checked in.<br>" . | 91 | + "The document '" . $aValues["modifiedDocumentName"] . "' has been checked in$sAttribution.<br>" . |
| 90 | "Please clear this subscription alert by clicking on the following link: " . | 92 | "Please clear this subscription alert by clicking on the following link: " . |
| 91 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), | 93 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 92 | 94 | ||
| 93 | SubscriptionConstants::subscriptionAlertType("CheckOutDocument") => | 95 | SubscriptionConstants::subscriptionAlertType("CheckOutDocument") => |
| 94 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been checked out.<br>" . | 96 | + "The document '" . $aValues["modifiedDocumentName"] . "' has been checked out$sAttribution.<br>" . |
| 95 | "Please clear this subscription alert by clicking on the following link: " . | 97 | "Please clear this subscription alert by clicking on the following link: " . |
| 96 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), | 98 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 97 | 99 | ||
| 98 | SubscriptionConstants::subscriptionAlertType("MovedDocument") => | 100 | SubscriptionConstants::subscriptionAlertType("MovedDocument") => |
| 99 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been moved from folder '" . $aValues["oldFolderName"] . "' to folder '" . $aValues["newFolderName"] . "'.<br>" . | 101 | + "The document '" . $aValues["modifiedDocumentName"] . "' has been moved from folder '" . $aValues["oldFolderName"] . "' to folder '" . $aValues["newFolderName"] . "'$sAttribution.<br>" . |
| 100 | "Please clear this subscription alert by clicking on the following link: " . | 102 | "Please clear this subscription alert by clicking on the following link: " . |
| 101 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), | 103 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 102 | 104 | ||
| 103 | SubscriptionConstants::subscriptionAlertType("ArchivedDocument") => | 105 | SubscriptionConstants::subscriptionAlertType("ArchivedDocument") => |
| 104 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been archived.<br>" . | 106 | + "The document '" . $aValues["modifiedDocumentName"] . "' has been archived$sAttribution.<br>" . |
| 105 | "Please clear this subscription alert by clicking on the following link: " . | 107 | "Please clear this subscription alert by clicking on the following link: " . |
| 106 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), | 108 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 107 | 109 | ||
| 108 | SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => | 110 | SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => |
| 109 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been restored from the archive.<br>" . | 111 | + "The document '" . $aValues["modifiedDocumentName"] . "' has been restored from the archive$sAttribution.<br>" . |
| 110 | "Please clear this subscription alert by clicking on the following link: " . | 112 | "Please clear this subscription alert by clicking on the following link: " . |
| 111 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"])); | 113 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"])); |
| 112 | 114 | ||
| @@ -114,3 +116,4 @@ class AlertContent { | @@ -114,3 +116,4 @@ class AlertContent { | ||
| 114 | "text" => "Hello " . $aValues["subscriberName"] . ",<br><br>" . $aAlertContent[$iSubscriptionAlertType]); | 116 | "text" => "Hello " . $aValues["subscriberName"] . ",<br><br>" . $aAlertContent[$iSubscriptionAlertType]); |
| 115 | } | 117 | } |
| 116 | } | 118 | } |
| 119 | +?> | ||
| 117 | \ No newline at end of file | 120 | \ No newline at end of file |