Commit 8e4d7a531b57ed7fa18a8fe0dd29eebdb528b9b3

Authored by Brad Shuttleworth
1 parent f2549720

Bryn Divey 2006-04-24 Changed subscriptions to include full pathname and...

Bryn Divey 2006-04-21 Added document title to version comparison. Change...
Bryn Divey 2006-04-21 Fixed the error message displayed when an existing...
Bryn Divey 2006-04-21 Removed upload thingie to merge
Bryn Divey 2006-04-21 Allowing checkin with different filename
Bryn Divey 2006-04-21 Rename on upload
Bryn Divey 2006-04-20 Fixed the lookup tree display in IE


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5324 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/dashboard/Notification.inc.php
... ... @@ -138,9 +138,7 @@ class KTNotificationHandler {
138 138 function handleNotification($oKTNotification) {
139 139 $oTemplating =& KTTemplating::getSingleton();
140 140 $oTemplate = $oTemplating->loadTemplate("kt3/notifications/generic");
141   - $aTemplateData = array(
142   - "context" => $oKTNotification,
143   - );
  141 + $aTemplateData = array("context" => $oKTNotification,);
144 142 return $oTemplate->render($aTemplateData);
145 143 }
146 144  
... ...
lib/documentmanagement/MDTree.inc
... ... @@ -268,8 +268,11 @@ class MDTree {
268 268 $extraclass = '';
269 269 if (array_key_exists($subnode_val, $this->activenodes)) {
270 270 $extraclass = ' active';
271   - }
272   - $treeStr .= '<li class="treenode' . $extraclass . '"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);">' . $treeToRender->mapnodes[$subnode_val]->getName() . 'Root</a>';
  271 + } else {
  272 + $extraclass = ' inactive';
  273 + }
  274 +
  275 + $treeStr .= '<li class="treenode' . $extraclass . '"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">' . $treeToRender->mapnodes[$subnode_val]->getName() . 'Root</a>';
273 276 $treeStr .= $this->_evilTreeRecursion($subnode_val, $treeToRender, $inputname);
274 277 $treeStr .= '</li>';
275 278 }
... ... @@ -300,7 +303,7 @@ class MDTree {
300 303  
301 304 // $treeStr .= print_r($this->activenodes,true);
302 305 // the inner section is generised.
303   - //$treeStr .= '<ul class="kt_treenodes"><li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);">Root</a>';
  306 +
304 307 $treeStr .= '<ul class="kt_treenodes">';
305 308 //$default->log->debug("EVILRENDER: " . print_r($treeToRender, true));
306 309 foreach ($treeToRender->getRoot() as $node_id => $subtree_nodes)
... ... @@ -309,10 +312,14 @@ class MDTree {
309 312 // leaves are handled differently.
310 313 if ($node_id !== "leaves") {
311 314 $extraclass = '';
  315 +
312 316 if (array_key_exists($subtree_nodes, $this->activenodes)) {
313 317 $extraclass = ' active';
314   - }
315   - $treeStr .= '<li class="treenode' . $extraclass . '"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);">' . $treeToRender->mapnodes[$subtree_nodes]->getName().'</a>';
  318 + } else {
  319 + $extraclass = ' inactive';
  320 + }
  321 +
  322 + $treeStr .= '<li class="treenode' . $extraclass . '"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">' . $treeToRender->mapnodes[$subtree_nodes]->getName().'</a>';
316 323 $treeStr .= $this->_evilTreeRecursion($subtree_nodes, $treeToRender, $inputname);
317 324 $treeStr .= '</li>';
318 325 }
... ...
lib/documentmanagement/documentutil.inc.php
... ... @@ -47,7 +47,7 @@ require_once(KT_LIB_DIR . &quot;/foldermanagement/Folder.inc&quot;);
47 47 require_once(KT_LIB_DIR . '/workflow/workflowutil.inc.php');
48 48  
49 49 class KTDocumentUtil {
50   - function checkin($oDocument, $sFilename, $sCheckInComment, $oUser) {
  50 + function checkin($oDocument, $sFilename, $sCheckInComment, $oUser, $aOptions = false) {
51 51 $oStorage =& KTStorageManagerUtil::getSingleton();
52 52 $iFileSize = filesize($sFilename);
53 53  
... ... @@ -72,6 +72,15 @@ class KTDocumentUtil {
72 72 $oDocument->setMinorVersionNumber($oDocument->getMinorVersionNumber()+1);
73 73 $oDocument->setFileSize($iFileSize);
74 74  
  75 + if(is_array($aOptions)) {
  76 + $sFilename = KTUtil::arrayGet($aOptions, 'newfilename', '');
  77 + if(strlen($sFilename)) {
  78 + $oDocument->setFileName($sFilename);
  79 + $default->log->info("renamed document " . $oDocument->getId() . " to " . $sFilename);
  80 +
  81 + }
  82 + }
  83 +
75 84 $bSuccess = $oDocument->update();
76 85 if ($bSuccess !== true) {
77 86 if (PEAR::isError($bSuccess)) {
... ... @@ -385,31 +394,35 @@ class KTDocumentUtil {
385 394 // {{{ _in_add
386 395 function &_in_add($oFolder, $sFilename, $oUser, $aOptions) {
387 396 if (KTDocumentUtil::fileExists($oFolder, $sFilename)) {
388   - $oDoc = Document::getByFilenameAndFolder($sFilename, $oFolder->getId());
389   - if (PEAR::isError($oDoc)) {
  397 + $oDoc = Document::getByFilenameAndFolder($sFilename, $oFolder->getId());
  398 + if (PEAR::isError($oDoc)) {
390 399 return PEAR::raiseError(_kt("Document with that filename already exists in this folder, and appears to be invalid. Please contact the system administrator."));
391   - } else {
392   - if ($oDoc->getStatusID != LIVE) {
393   - return PEAR::raiseError(_kt("Document with that filename already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename."));
394   - } else {
395   - return PEAR::raiseError(_kt("Document with that filename already exists in this folder."));
396   - }
397   - }
  400 + } else {
  401 + if ($oDoc->getStatusID() != LIVE) {
  402 + $sError = _kt("Document with that filename already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename.");
  403 + } else {
  404 + $sError = _kt("Document with that filename already exists in this folder.");
  405 + }
  406 +
  407 + $sError .= _kt(' Document') . ': ' . $oDoc->getName() . ' (ID:' . $oDoc->getId() . ')';
  408 + return PEAR::raiseError($sError);
  409 + }
398 410 }
399 411 $sName = KTUtil::arrayGet($aOptions, 'description', $sFilename);
400 412 if (KTDocumentUtil::nameExists($oFolder, $sName)) {
401   - $oDoc = Document::getByNameAndFolder($sName, $oFolder->getId());
402   - if (PEAR::isError($oDoc)) {
  413 + $oDoc = Document::getByNameAndFolder($sName, $oFolder->getId());
  414 + if (PEAR::isError($oDoc)) {
403 415 return PEAR::raiseError(_kt("Document with that title already exists in this folder, and appears to be invalid. Please contact the system administrator."));
404   - } else {
405   - if ($oDoc->getStatusID != LIVE) {
  416 + } else {
  417 + if ($oDoc->getStatusID != LIVE) {
406 418 return PEAR::raiseError(_kt("Document with that title already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename."));
407   - } else {
408   - return PEAR::raiseError(_kt("Document with that title already exists in this folder."));
409   - }
410   - }
411   -
  419 + } else {
  420 + return PEAR::raiseError(_kt("Document with that title already exists in this folder."));
  421 + }
  422 + }
  423 +
412 424 }
  425 +
413 426 $oUploadChannel =& KTUploadChannel::getSingleton();
414 427 $oUploadChannel->sendMessage(new KTUploadNewFile($sFilename));
415 428 $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions);
... ...
lib/subscriptions/subscriptions.inc.php
... ... @@ -94,11 +94,11 @@ class SubscriptionEvent {
94 94 foreach ($aUsers as $oSubscriber) {
95 95  
96 96 // notification object first.
97   - $aNotificationOptions = array();
98   - $aNotificationOptions['target_user'] = $oSubscriber->getID();
  97 + $aNotificationOptions = array();
  98 + $aNotificationOptions['target_user'] = $oSubscriber->getID();
99 99 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
100 100 $aNotificationOptions['target_name'] = $oAddedFolder->getName();
101   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  101 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
102 102 $aNotificationOptions['object_id'] = $oAddedFolder->getId(); // parent folder_id, in this case.
103 103 $aNotificationOptions['event_type'] = "AddFolder";
104 104 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -125,7 +125,7 @@ class SubscriptionEvent {
125 125 $aNotificationOptions['target_user'] = $oSubscriber->getID();
126 126 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null - is this valid?
127 127 $aNotificationOptions['target_name'] = $oAddedDocument->getName();
128   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  128 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
129 129 $aNotificationOptions['object_id'] = $oAddedDocument->getId(); // parent folder_id, in this case.
130 130 $aNotificationOptions['event_type'] = "AddDocument";
131 131  
... ... @@ -155,20 +155,20 @@ class SubscriptionEvent {
155 155 // notification object first.
156 156 $aNotificationOptions = array();
157 157 $aNotificationOptions['target_user'] = $oSubscriber->getID();
158   - $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
159   - $aNotificationOptions['target_name'] = $oRemovedFolder->getName();
160   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
161   - $aNotificationOptions['object_id'] = $oParentFolder->getId(); // parent folder_id, since the removed one is removed.
162   - $aNotificationOptions['event_type'] = "RemoveSubscribedFolder";
  158 + $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
  159 + $aNotificationOptions['target_name'] = $oRemovedFolder->getName();
  160 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
  161 + $aNotificationOptions['object_id'] = $oParentFolder->getId(); // parent folder_id, since the removed one is removed.
  162 + $aNotificationOptions['event_type'] = "RemoveSubscribedFolder";
163 163 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
164 164  
165 165 // now the email content.
166 166 // FIXME this needs to be handled entirely within notifications from now on.
167 167 if ($oSubscriber->getEmailNotification() && (strlen($oSubscriber->getEmail()) > 0)) {
168 168 $emailContent = $content->getEmailAlertContent($oNotification);
169   - $emailSubject = $content->getEmailAlertSubject($oNotification);
170   - $oEmail = new EmailAlert($oSubscriber->getEmail(), $emailSubject, $emailContent);
171   - $oEmail->send();
  169 + $emailSubject = $content->getEmailAlertSubject($oNotification);
  170 + $oEmail = new EmailAlert($oSubscriber->getEmail(), $emailSubject, $emailContent);
  171 + $oEmail->send();
172 172 }
173 173  
174 174 // now grab each oSubscribers oSubscription, and delete.
... ... @@ -188,7 +188,7 @@ class SubscriptionEvent {
188 188 $aNotificationOptions['target_user'] = $oSubscriber->getID();
189 189 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
190 190 $aNotificationOptions['target_name'] = $oRemovedFolder->getName();
191   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  191 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
192 192 $aNotificationOptions['object_id'] = $oParentFolder->getId(); // parent folder_id, since the removed one is removed.
193 193 $aNotificationOptions['event_type'] = "RemoveChildFolder";
194 194 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -220,7 +220,7 @@ class SubscriptionEvent {
220 220 $aNotificationOptions['target_user'] = $oSubscriber->getID();
221 221 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
222 222 $aNotificationOptions['target_name'] = $oRemovedDocument->getName();
223   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  223 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
224 224 $aNotificationOptions['object_id'] = $oParentFolder->getId(); // parent folder_id, since the removed one is removed.
225 225 $aNotificationOptions['event_type'] = "RemoveSubscribedDocument";
226 226 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -251,7 +251,7 @@ class SubscriptionEvent {
251 251 $aNotificationOptions['target_user'] = $oSubscriber->getID();
252 252 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
253 253 $aNotificationOptions['target_name'] = $oRemovedDocument->getName();
254   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  254 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
255 255 $aNotificationOptions['object_id'] = $oParentFolder->getId(); // parent folder_id, since the removed one is removed.
256 256 $aNotificationOptions['event_type'] = "RemoveChildDocument";
257 257 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -279,7 +279,7 @@ class SubscriptionEvent {
279 279 $aNotificationOptions['target_user'] = $oSubscriber->getID();
280 280 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
281 281 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
282   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  282 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
283 283 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
284 284 $aNotificationOptions['event_type'] = "ModifyDocument";
285 285 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -304,7 +304,7 @@ class SubscriptionEvent {
304 304 $aNotificationOptions['target_user'] = $oSubscriber->getID();
305 305 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
306 306 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
307   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  307 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
308 308 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
309 309 $aNotificationOptions['event_type'] = "ModifyDocument";
310 310 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -331,7 +331,7 @@ class SubscriptionEvent {
331 331 $aNotificationOptions['target_user'] = $oSubscriber->getID();
332 332 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
333 333 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
334   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  334 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
335 335 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
336 336 $aNotificationOptions['event_type'] = "CheckInDocument";
337 337 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -356,7 +356,7 @@ class SubscriptionEvent {
356 356 $aNotificationOptions['target_user'] = $oSubscriber->getID();
357 357 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
358 358 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
359   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  359 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
360 360 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
361 361 $aNotificationOptions['event_type'] = "CheckInDocument";
362 362 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -384,7 +384,7 @@ class SubscriptionEvent {
384 384 $aNotificationOptions['target_user'] = $oSubscriber->getID();
385 385 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
386 386 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
387   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  387 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
388 388 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
389 389 $aNotificationOptions['event_type'] = "CheckOutDocument";
390 390 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -409,7 +409,7 @@ class SubscriptionEvent {
409 409 $aNotificationOptions['target_user'] = $oSubscriber->getID();
410 410 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
411 411 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
412   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  412 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
413 413 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
414 414 $aNotificationOptions['event_type'] = "CheckOutDocument";
415 415 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -436,7 +436,7 @@ class SubscriptionEvent {
436 436 $aNotificationOptions['target_user'] = $oSubscriber->getID();
437 437 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
438 438 $aNotificationOptions['target_name'] = $oMovedDocument->getName();
439   - $aNotificationOptions['location_name'] = $oToFolder->getName();
  439 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
440 440 $aNotificationOptions['object_id'] = $oToFolder->getId(); // parent folder_id, in this case.
441 441 $aNotificationOptions['event_type'] = "MovedDocument";
442 442 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -461,7 +461,7 @@ class SubscriptionEvent {
461 461 $aNotificationOptions['target_user'] = $oSubscriber->getID();
462 462 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
463 463 $aNotificationOptions['target_name'] = $oMovedDocument->getName();
464   - $aNotificationOptions['location_name'] = $oToFolder->getName();
  464 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
465 465 $aNotificationOptions['object_id'] = $oToFolder->getId(); // parent folder_id, in this case.
466 466 $aNotificationOptions['event_type'] = "MovedDocument";
467 467 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -485,7 +485,7 @@ class SubscriptionEvent {
485 485 $aNotificationOptions['target_user'] = $oSubscriber->getID();
486 486 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
487 487 $aNotificationOptions['target_name'] = $oMovedDocument->getName();
488   - $aNotificationOptions['location_name'] = $oToFolder->getName();
  488 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
489 489 $aNotificationOptions['object_id'] = $oToFolder->getId(); // parent folder_id, in this case.
490 490 $aNotificationOptions['event_type'] = "MovedDocument";
491 491 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -512,7 +512,7 @@ class SubscriptionEvent {
512 512 $aNotificationOptions['target_user'] = $oSubscriber->getID();
513 513 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
514 514 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
515   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  515 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
516 516 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
517 517 $aNotificationOptions['event_type'] = "ArchivedDocument";
518 518 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -537,7 +537,7 @@ class SubscriptionEvent {
537 537 $aNotificationOptions['target_user'] = $oSubscriber->getID();
538 538 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
539 539 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
540   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  540 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
541 541 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
542 542 $aNotificationOptions['event_type'] = "ArchivedDocument";
543 543 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -565,7 +565,7 @@ class SubscriptionEvent {
565 565 $aNotificationOptions['target_user'] = $oSubscriber->getID();
566 566 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
567 567 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
568   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  568 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
569 569 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
570 570 $aNotificationOptions['event_type'] = "RestoreArchivedDocument";
571 571 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -590,7 +590,7 @@ class SubscriptionEvent {
590 590 $aNotificationOptions['target_user'] = $oSubscriber->getID();
591 591 $aNotificationOptions['actor_id'] = KTUtil::arrayGet($_SESSION,"userID", null); // _won't_ be null.
592 592 $aNotificationOptions['target_name'] = $oModifiedDocument->getName();
593   - $aNotificationOptions['location_name'] = $oParentFolder->getName();
  593 + $aNotificationOptions['location_name'] = Folder::generateFullFolderPath($oParentFolder->getId());
594 594 $aNotificationOptions['object_id'] = $oModifiedDocument->getId(); // parent folder_id, in this case.
595 595 $aNotificationOptions['event_type'] = "RestoreArchivedDocument";
596 596 $oNotification =& KTSubscriptionNotification::generateSubscriptionNotification($aNotificationOptions);
... ... @@ -692,31 +692,30 @@ class SubscriptionContent {
692 692  
693 693 function getEmailAlertSubject($oKTNotification) {
694 694 $info = $this->_getSubscriptionData($oKTNotification);
695   - return $info["title"];
  695 + return $info["title"];
696 696 }
697 697  
698 698 function getNotificationAlertContent($oKTNotification) {
699 699 $info = $this->_getSubscriptionData($oKTNotification);
700   - $oTemplating =& KTTemplating::getSingleton();
701   -
702   - $oTemplate = $oTemplating->loadTemplate("kt3/notifications/subscriptions." . $info['event_type']);
703   - // if, for some reason, this doesn't actually work, use the "generic" title.
704   - if (PEAR::isError($oTemplate)) {
705   - $oTemplate = $oTemplating->loadTemplate("kt3/notifications/subscriptions.generic");
706   - }
707   - // FIXME we need to specify the i18n by user.
708   -
709   - $isBroken = false;
710   - if (PEAR::isError($info['object']) || ($info['object'] === false) || is_null($info['object'])) {
711   - $isBroken = true;
712   - }
713   -
714   - $aTemplateData = array(
715   - "context" => $oKTNotification,
716   - "info" => $info,
717   - "is_broken" => $isBroken,
718   - );
719   - return $oTemplate->render($aTemplateData);
  700 + $oTemplating =& KTTemplating::getSingleton();
  701 +
  702 + $oTemplate = $oTemplating->loadTemplate("kt3/notifications/subscriptions." . $info['event_type']);
  703 + // if, for some reason, this doesn't actually work, use the "generic" title.
  704 + if (PEAR::isError($oTemplate)) {
  705 + $oTemplate = $oTemplating->loadTemplate("kt3/notifications/subscriptions.generic");
  706 + }
  707 + // FIXME we need to specify the i18n by user.
  708 +
  709 + $isBroken = false;
  710 + if (PEAR::isError($info['object']) || ($info['object'] === false) || is_null($info['object'])) {
  711 + $isBroken = true;
  712 + }
  713 +
  714 + $aTemplateData = array("context" => $oKTNotification,
  715 + "info" => $info,
  716 + "is_broken" => $isBroken,
  717 + );
  718 + return $oTemplate->render($aTemplateData);
720 719 }
721 720 // no separate subject function, its rolled into get...Content()
722 721  
... ... @@ -752,11 +751,12 @@ class SubscriptionContent {
752 751 if ($info['actor_id'] !== null) {
753 752 $oTempUser = User::get($info['actor_id']);
754 753 if (PEAR::isError($oTempUser) || ($oTempUser == false)) {
755   - // no-act
756   - $info['actor'] = null;
  754 + // no-act
  755 + $info['actor'] = null;
757 756 } else {
758 757 $info['actor'] = $oTempUser;
759   - $info['has_actor'] = true;
  758 + $info['has_actor'] = true;
  759 + $info['actor_name'] = $oTempUser->getName();
760 760 }
761 761 }
762 762  
... ...
lib/widgets/fieldsetDisplay.inc.php
... ... @@ -287,8 +287,11 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
287 287 "document_data" => $aDocumentData,
288 288 "document" => $aDocumentData["document"],
289 289  
290   - "filename" => $document->getFileName(),
291   - "comparison_filename" => $comparison_document->getFileName(),
  290 + "title" => $document->getName(),
  291 + "comparison_title" => $comparison_document->getName(),
  292 +
  293 + "filename" => $document->getFileName(),
  294 + "comparison_filename" => $comparison_document->getFileName(),
292 295  
293 296 "creator" => $creator,
294 297 "creation_date" => $creation_date,
... ...
plugins/ktcore/KTDocumentActions.php
... ... @@ -233,12 +233,33 @@ class KTDocumentCheckInAction extends KTDocumentAction {
233 233  
234 234 // and that the filename matches
235 235 global $default;
236   - $default->log->info("checkInDocumentBL.php uploaded filename=" . $_FILES['file']['name'] . "; current filename=" . $this->oDocument->getFileName());
  236 +
  237 + $sCurrentFilename = $this->oDocument->getFileName();
  238 + $sNewFilename = $_FILES['file']['name'];
  239 +
  240 + $default->log->info("checkInDocumentBL.php uploaded filename=" . $sNewFilename . "; current filename=" . $sCurrentFilename);
  241 +
  242 +
  243 + /*
  244 + * now allowing this - document's filename is set in 'checkin'
  245 + */
237 246 if ($this->oDocument->getFileName() != $_FILES['file']['name']) {
238 247 $this->errorRedirectToMain(_kt("The file name of the uploaded file does not match the file name of the document in the system"), 'fDocumentId=' . $this->oDocument->getId() . '&reason=' . $sReason);
239 248 }
  249 + /**/
  250 +
  251 +
240 252  
241   - $res = KTDocumentUtil::checkin($this->oDocument, $_FILES['file']['tmp_name'], $sReason, $this->oUser);
  253 + $aOptions = array();
  254 +
  255 + /*
  256 + if($sNewFilename != $sCurrentFilename) {
  257 + $aOptions['newfilename'] = $sNewFilename;
  258 + }
  259 + */
  260 +
  261 +
  262 + $res = KTDocumentUtil::checkin($this->oDocument, $_FILES['file']['tmp_name'], $sReason, $this->oUser, $aOptions);
242 263 if (PEAR::isError($res)) {
243 264 $this->errorRedirectToMain(_kt("An error occurred while trying to check in the document"), 'fDocumentId=' . $this->oDocument->getId() . '&reason=' . $sReason);
244 265 }
... ... @@ -970,8 +991,18 @@ class KTDocumentWorkflowAction extends KTDocumentAction {
970 991  
971 992 $oUser =& User::get($_SESSION['userID']);
972 993 $res = KTWorkflowUtil::performTransitionOnDocument($oTransition, $oDocument, $oUser, $sComments);
973   - $this->successRedirectToMain(_kt('Transition performed'),
  994 +
  995 + if(!Permission::userHasDocumentReadPermission($oDocument)) {
  996 + $this->successRedirectTo(
  997 + 'browse',
  998 + _kt('Transition performed') . '. ' . _kt('You no longer have permission to view this document'),
  999 + array('fFolderId' => $oDocument->getFolderId())
  1000 + );
  1001 +
  1002 + } else {
  1003 + $this->successRedirectToMain(_kt('Transition performed'),
974 1004 array('fDocumentId' => $oDocument->getId()));
  1005 + }
975 1006 }
976 1007 }
977 1008 // }}}
... ...
plugins/ktcore/admin/documentFields.php
... ... @@ -839,7 +839,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
839 839 foreach ($treeToRender->contents[$subnode] as $subnode_id => $subnode_val)
840 840 {
841 841 if ($subnode_id !== "leaves") {
842   - $treeStr .= '<li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active, this.parentNode);">' . $treeToRender->mapnodes[$subnode_val]->getName() . '</a>';
  842 + $treeStr .= '<li class="treenode active"><a class="pathnode inactive" onclick="toggleElementClass(\'active\', this.parentNode); toggleElementClass(\'inactive, this.parentNode);">' . $treeToRender->mapnodes[$subnode_val]->getName() . '</a>';
843 843 $treeStr .= $this->_evilActionHelper($treeToRender->field_id, false, $subnode_val);
844 844 $treeStr .= $this->_evilTreeRecursion($subnode_val, $treeToRender);
845 845 $treeStr .= '</li>';
... ... @@ -868,7 +868,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
868 868  
869 869 // since the root is virtual, we need to fake it here.
870 870 // the inner section is generised.
871   - $treeStr .= '<ul class="kt_treenodes"><li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);">Root</a>';
  871 + $treeStr .= '<ul class="kt_treenodes"><li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">Root</a>';
872 872 $treeStr .= ' (<a href="' . KTUtil::addQueryStringSelf('action=editTree&field_id='.$treeToRender->field_id.'&current_node=0') . '">edit</a>)';
873 873 $treeStr .= '<ul>';
874 874 //$default->log->debug("EVILRENDER: " . print_r($treeToRender, true));
... ... @@ -878,7 +878,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
878 878 // leaves are handled differently.
879 879 if ($node_id !== "leaves") {
880 880 // $default->log->debug("EVILRENDER: " . print_r($subtree_nodes, true));
881   - $treeStr .= '<li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);">' . $treeToRender->mapnodes[$subtree_nodes]->getName() . '</a>';
  881 + $treeStr .= '<li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">' . $treeToRender->mapnodes[$subtree_nodes]->getName() . '</a>';
882 882 $treeStr .= $this->_evilActionHelper($treeToRender->field_id, false, $subtree_nodes);
883 883 $treeStr .= $this->_evilTreeRecursion($subtree_nodes, $treeToRender);
884 884 $treeStr .= '</li>';
... ...
plugins/ktcore/folder/addDocument.php
... ... @@ -71,6 +71,7 @@ class KTFolderAddDocumentAction extends KTFolderAction {
71 71 $add_fields = array();
72 72 $add_fields[] = new KTFileUploadWidget(_kt('File'), _kt('The contents of the document to be added to the document management system.'), 'file', "", $this->oPage, true, null, null, $aOptions);
73 73 $add_fields[] = new KTStringWidget(_kt('Title'), _kt('The document title is used as the main name of a document throughout KnowledgeTree.'), 'title', "", $this->oPage, true, null, null, $aOptions);
  74 + $add_fields[] = new KTStringWidget(_kt('New Filename'), _kt('If you wish to upload this file under a different filename, enter it here.'), 'altfilename', "", $this->oPage, false, null, null, $aOptions);
74 75  
75 76  
76 77 $aVocab = array('' => _kt('&lt;Please select a document type&gt;'));
... ... @@ -120,7 +121,13 @@ class KTFolderAddDocumentAction extends KTFolderAction {
120 121  
121 122 $aFile = $this->oValidator->validateFile($_FILES['file'], $aErrorOptions);
122 123 $sTitle = $this->oValidator->validateString($_REQUEST['title'], $aErrorOptions);
123   -
  124 + $sAltFilename = KTUtil::arrayGet($_REQUEST, 'altfilename', '');
  125 +
  126 + if(strlen(trim($sAltFilename))) {
  127 + $aFile['name'] = $sAltFilename;
  128 + }
  129 +
  130 +
124 131 $iFolderId = $this->oFolder->getId();
125 132 /*
126 133 // this is now done in ::add
... ...
resources/css/kt-framing.css
... ... @@ -487,8 +487,19 @@ a.main_nav_item {
487 487 border-width: 1px;
488 488 }
489 489 .metadata.versioned dd .current.different {
  490 + background-color: #fff2b8;
  491 +/*
490 492 padding-left: 25px;
491 493 background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat;
  494 +*/
  495 +}
  496 +
  497 +.metadata.versioned dd .previous.different {
  498 + background-color: #e9dda8;
  499 +/*
  500 + padding-left: 25px;
  501 + background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat;
  502 +*/
492 503 }
493 504  
494 505 .document_details .document_history thead th {
... ...
resources/css/kt-ie-icons.css
... ... @@ -32,4 +32,31 @@
32 32 /* IE is woefully unable to */
33 33 #portletbar { width: 200px; }
34 34 #portlet-search-text { width: 150px; }
35   -#content { padding-left: 220px; }
36 35 \ No newline at end of file
  36 +#content { padding-left: 220px; }
  37 +
  38 +
  39 +
  40 +/* NO CHILD SELECTORS IN IE! */
  41 +
  42 +.kt_treenodes li.treenode a.pathnode
  43 +{
  44 + padding-left: 15px;
  45 +}
  46 +
  47 +.kt_treenodes li.treenode.active a.pathnode {
  48 + background: transparent url(../graphics/minus.png) center left no-repeat;
  49 +
  50 +}
  51 +
  52 +.kt_treenodes li.treenode.inactive a.pathnode {
  53 + background: transparent url(../graphics/plus.png) center left no-repeat;
  54 +}
  55 +
  56 +
  57 +.kt_treenodes li.active ul {
  58 + display: block;
  59 +}
  60 +
  61 +.kt_treenodes li.inactive ul {
  62 + display: none;
  63 +}
... ...
templates/kt3/fieldsets/generic_versioned.smarty
... ... @@ -5,12 +5,20 @@
5 5 document.{/i18n}
6 6 </p>
7 7 <dl class="metadata versioned">
  8 + <dt>{i18n}Document Title{/i18n}</dt>
  9 + <dd>
  10 + {capture assign="oldval"}{$comparison_title}{/capture}
  11 + {capture assign="newval"}{$title}{/capture}
  12 + <div class="current {if ($oldval != $newval)}different{/if}">{$newval}</div>
  13 + <div class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</div>
  14 + </dd>
  15 +
8 16 <dt>{i18n}Document Filename{/i18n}</dt>
9 17 <dd>
10 18 {capture assign="oldval"}{$comparison_filename} ({$context->_sizeHelper($comparison_document->getSize())}){/capture}
11 19 {capture assign="newval"}{$filename} ({$context->_sizeHelper($document->getSize())}){/capture}
12 20 <div class="current {if ($oldval != $newval)}different{/if}">{$newval}</div>
13   - <div class="previous">{$oldval}</div>
  21 + <div class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</div>
14 22 </dd>
15 23  
16 24 <dt>{i18n}File is a{/i18n} </dt>
... ... @@ -18,7 +26,7 @@
18 26 {capture assign="oldval"}{$context->_mimeHelper($comparison_document->getMimeTypeID())}{/capture}
19 27 {capture assign="newval"}{$context->_mimeHelper($document->getMimeTypeID())}{/capture}
20 28 <div class="current {if ($oldval != $newval)}different{/if}">{$newval}</div>
21   - <div class="previous">{$oldval}</div>
  29 + <div class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</div>
22 30 </dd>
23 31  
24 32 <dt>{i18n}Created by{/i18n}</dt>
... ... @@ -31,7 +39,7 @@
31 39 {capture assign="oldval"}{$comparison_last_modified_by} ({$comparison_last_modified_date}){/capture}
32 40 {capture assign="newval"}{$last_modified_by} ({$last_modified_date}){/capture}
33 41 <div class="current {if ($oldval != $newval)}different{/if}">{$newval}</div>
34   - <div class="previous">{$oldval}</div>
  42 + <div class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</div>
35 43 </dd>
36 44  
37 45  
... ... @@ -40,7 +48,7 @@
40 48 {capture assign="oldval"}{$comparison_document_type}{/capture}
41 49 {capture assign="newval"}{$document_type}{/capture}
42 50 <div class="current {if ($oldval != $newval)}different{/if}">{$newval}</div>
43   - <div class="previous">{$oldval}</div>
  51 + <div class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</div>
44 52 </dd>
45 53  
46 54 <dt>{i18n}Workflow status{/i18n}</dt>
... ... @@ -56,7 +64,7 @@
56 64 {i18n}No workflow{/i18n}
57 65 {/if}{/capture}
58 66 <div class="current {if ($oldval != $newval)}different{/if}">{$newval}</div>
59   - <div class="previous">{$oldval}</div>
  67 + <div class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</div>
60 68 </dd>
61 69 <dt>{i18n}Document ID{/i18n}</dt>
62 70 <dd>
... ...
templates/kt3/fieldsets/simple_versioned.smarty
... ... @@ -14,7 +14,7 @@
14 14 <dd><div class="current {if ($aFieldPair.current_value != $aFieldPair.previous_value)}different{/if}">
15 15 {if ($aFieldPair.current_value !== null)}{$aFieldPair.current_value}
16 16 {else}<span class="ktInlineError">{i18n}no value in this version{/i18n}</span>{/if}
17   - </div><div class="previous">
  17 + </div><div class="previous {if ($aFieldPair.current_value != $aFieldPair.previous_value)}different{/if}">
18 18 {if ($aFieldPair.previous_value !== null)}{$aFieldPair.previous_value}
19 19 {else}<span class="ktInlineError">{i18n}no value in this version{/i18n}</span>{/if}
20 20 </div>
... ...
templates/kt3/notifications/subscriptions.AddDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}.
  4 + The document "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
... ...
templates/kt3/notifications/subscriptions.AddFolder.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The folder "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}.
  4 + The folder "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Folder{/i18n}</a>
8 9 {else}
9 10 <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span>
10 11 {/if}
11   - | | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
  12 + | <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
12 13 </div>
13 14 </dd>
... ...
templates/kt3/notifications/subscriptions.CheckInDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" has been checked in, in the folder "{$info.location_name}".
  4 + The document "{$info.object_name}" has been checked in{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}, in the folder "{$info.location_name}".
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
... ...
templates/kt3/notifications/subscriptions.CheckOutDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" has been checked out, in the folder "{$info.location_name}".
  4 + The document "{$info.object_name}" has been checked out{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}, in the folder "{$info.location_name}".
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
... ...
templates/kt3/notifications/subscriptions.ModifyDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" has been changed in the folder "{$info.location_name}". {$info.object}
  4 + The document "{$info.object_name}" has been changed in the folder "{$info.location_name}"{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}. {$info.object}
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
... ...
templates/kt3/notifications/subscriptions.MoveDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" has been moved to the folder "{$info.location_name}".
  4 + The document "{$info.object_name}" has been moved to the folder "{$info.location_name}"{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Location{/i18n}</a>
... ...
templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" has been removed from the folder "{$info.location_name}", to which you are subscribed.
  4 + The document "{$info.object_name}" has been removed from the folder "{$info.location_name}" (to which you are subscribed){if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7  
7 8 {if !$is_broken}
... ...
templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The folder "{$info.object_name}" was removed{if ($info.location_name !== null)} from "{$info.location_name}"{/if}.
  4 + The folder "{$info.object_name}" was removed{if ($info.location_name !== null)} from "{$info.location_name}"{/if}{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7 {if !$is_broken}
7 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a>
... ...
templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The document "{$info.object_name}" to which you were subscribed, has been removed.
  4 + The document "{$info.object_name}" to which you were subscribed, has been removed{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 8 </div>
... ...
templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty
1 1 <dt class="actionitem subscription">{$info.title}</dt>
2 2 <dd class="actionmessage">
3 3 <!-- could break this up. -->
4   - The folder "{$info.object_name}" to which you were subscribed, was removed.
  4 + The folder "{$info.object_name}" to which you were subscribed, was removed{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
5 6 <div class="actionoptions">
6 7 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 8 </div>
... ...