Commit 1e69b12a3d437e11ad774279c1e8e665956c766b

Authored by bshuttle
1 parent 16cce222

Bryn Divey 2006-04-25 More work around notifications

Bryn Divey 2006-04-25 Added in document path, actor name, and actor unit...
Bryn Divey 2006-04-25 KTS-857: added fieldsetids to the evilness of the ...
Bryn Divey 2006-04-24 Fixed KTS-873: Error when setting controlled permi...
Bryn Divey 2006-04-24 Undid alt filename on upload Changed URLs in docum...
Bryn Divey 2006-04-24 Rename now displays correct old name
Bryn Divey 2006-04-24 Small dispatcher fixes Fixed folder rename problem
Bryn Divey 2006-04-24 KTS-653: Moving document into the same folder it w...
Bryn Divey 2006-04-24 Fixed KTS-639 (checkin with different filename)


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5333 c91229c3-7414-0410-bfa2-8a42b809f60b
docs/FAQ.txt
@@ -18,7 +18,7 @@ A: Our community forums are a good place to ask questions about @@ -18,7 +18,7 @@ A: Our community forums are a good place to ask questions about
18 network, will endeavour to answer your questions. 18 network, will endeavour to answer your questions.
19 19
20 Click on the link below to access the forums: 20 Click on the link below to access the forums:
21 - http://forum.ktdms.com/ 21 + http://forums.ktdms.com/
22 22
23 Q: Where can I discuss document management best practices, change 23 Q: Where can I discuss document management best practices, change
24 management and training issues? 24 management and training issues?
@@ -30,7 +30,7 @@ A: Our community forums are a good place to discuss best practices for @@ -30,7 +30,7 @@ A: Our community forums are a good place to discuss best practices for
30 30
31 Click on the link below to access the forums: 31 Click on the link below to access the forums:
32 32
33 - http://forum.ktdms.com/ 33 + http://forums.ktdms.com/
34 34
35 Q: Where can I report bugs in KnowledgeTree? 35 Q: Where can I report bugs in KnowledgeTree?
36 36
@@ -42,7 +42,7 @@ A: You can report bugs in KnowledgeTree by accessing our online @@ -42,7 +42,7 @@ A: You can report bugs in KnowledgeTree by accessing our online
42 42
43 Click on the link below to access the ticketing system: 43 Click on the link below to access the ticketing system:
44 44
45 - http://support.ktdms.com/ 45 + http://issues.ktdms.com/
46 46
47 Q: I want to modify KnowledgeTree or develop new functionality for it. 47 Q: I want to modify KnowledgeTree or develop new functionality for it.
48 Where do I find more information on how to go about doing this? 48 Where do I find more information on how to go about doing this?
@@ -54,13 +54,13 @@ A: You can find out more information about modifying KnowledgeTree, @@ -54,13 +54,13 @@ A: You can find out more information about modifying KnowledgeTree,
54 54
55 Click on the link below to access the Wiki: 55 Click on the link below to access the Wiki:
56 56
57 - http://support.ktdms.com/confluence/ 57 + http://issues.ktdms.com/confluence/
58 58
59 59
60 KnowledgeTree Document Management System 60 KnowledgeTree Document Management System
61 Web page: http://www.ktdms.com/ 61 Web page: http://www.ktdms.com/
62 -Wiki: http://support.ktdms.com/confluence/  
63 -Forums: http://forum.ktdms.com/  
64 -Bug reporting: http://support.ktdms.com/ 62 +Wiki: http://issues.ktdms.com/confluence/
  63 +Forums: http://forums.ktdms.com/
  64 +Bug reporting: http://issues.ktdms.com/
65 65
66 $Id$ 66 $Id$
docs/INSTALL.WIN32.txt
@@ -125,12 +125,12 @@ For the Windows platform, these are: @@ -125,12 +125,12 @@ For the Windows platform, these are:
125 . InfoZip unzip and zip - http://www.info-zip.org/ 125 . InfoZip unzip and zip - http://www.info-zip.org/
126 126
127 Installing these packages is beyond the scope of this document - please 127 Installing these packages is beyond the scope of this document - please
128 -consult the KnowledgeTree Wiki at http://support.ktdms.com/confluence/ 128 +consult the KnowledgeTree Wiki at http://issues.ktdms.com/confluence/
129 to see how others have approached this on your platform. 129 to see how others have approached this on your platform.
130 130
131 You can find Windows specific installation instructions here: 131 You can find Windows specific installation instructions here:
132 132
133 - http://support.ktdms.com/confluence/display/KTWiki/Windows+XP+installation+instructions 133 + http://issues.ktdms.com/confluence/display/KTWiki/Windows+XP+installation+instructions
134 134
135 135
136 Troubleshooting 136 Troubleshooting
@@ -140,12 +140,12 @@ Please make sure that your KnowledgeTree installation passes all the @@ -140,12 +140,12 @@ Please make sure that your KnowledgeTree installation passes all the
140 pre- and post-installation checkups first. 140 pre- and post-installation checkups first.
141 141
142 Refer to the Frequently Asked Questions list on the KnowledgeTree Wiki 142 Refer to the Frequently Asked Questions list on the KnowledgeTree Wiki
143 -at http://support.ktdms.com/confluence/ 143 +at http://issues.ktdms.com/confluence/
144 144
145 -Ask on the KnowledgeTree forums on http://forum.ktdms.com/. 145 +Ask on the KnowledgeTree forums on http://forums.ktdms.com/.
146 146
147 If you have found a bug, please report it to the KnowledgeTree bug 147 If you have found a bug, please report it to the KnowledgeTree bug
148 -reporting system at http://support.ktdms.com/. 148 +reporting system at http://issues.ktdms.com/.
149 149
150 Upgrading 150 Upgrading
151 --------- 151 ---------
docs/INSTALL.txt
@@ -14,9 +14,9 @@ KnowledgeTree Installation Notes @@ -14,9 +14,9 @@ KnowledgeTree Installation Notes
14 14
15 Due to the many different configuration possibilities, these can not 15 Due to the many different configuration possibilities, these can not
16 all be discussed here. Please consult the KnowledgeTree Wiki system 16 all be discussed here. Please consult the KnowledgeTree Wiki system
17 - at http://support.ktdms.com/confluence/ to see what others have done 17 + at http://issues.ktdms.com/confluence/ to see what others have done
18 on your platform, and discuss the pros and cons of various options on 18 on your platform, and discuss the pros and cons of various options on
19 - the KnowledgeTree Forums at http://forum.ktdms.com/ 19 + the KnowledgeTree Forums at http://forums.ktdms.com/
20 20
21 * Check the pre-installation checkup: 21 * Check the pre-installation checkup:
22 22
@@ -42,7 +42,7 @@ KnowledgeTree Installation Notes @@ -42,7 +42,7 @@ KnowledgeTree Installation Notes
42 a password (-p, and you will be asked for the password). 42 a password (-p, and you will be asked for the password).
43 43
44 Using other tools is beyond the scope of this document. Consult the 44 Using other tools is beyond the scope of this document. Consult the
45 - KnowledgeTree Wiki at http://support.ktdms.com/confluence/ to see how 45 + KnowledgeTree Wiki at http://issues.ktdms.com/confluence/ to see how
46 others have approached this on your platform. 46 others have approached this on your platform.
47 47
48 * Configure your installation in config/config.ini: 48 * Configure your installation in config/config.ini:
@@ -122,7 +122,7 @@ For the Windows platform, these are: @@ -122,7 +122,7 @@ For the Windows platform, these are:
122 . InfoZip unzip and zip - http://www.info-zip.org/ 122 . InfoZip unzip and zip - http://www.info-zip.org/
123 123
124 Installing these packages is beyond the scope of this document - please 124 Installing these packages is beyond the scope of this document - please
125 -consult the KnowledgeTree Wiki at http://support.ktdms.com/confluence/ 125 +consult the KnowledgeTree Wiki at http://issues.ktdms.com/confluence/
126 to see how others have approached this on your platform. We recommend 126 to see how others have approached this on your platform. We recommend
127 that you use the appropriate package management procedures for 127 that you use the appropriate package management procedures for
128 installing these packages on your system to ensure ease of maintenance 128 installing these packages on your system to ensure ease of maintenance
@@ -140,12 +140,12 @@ Please make sure that your KnowledgeTree installation passes all the @@ -140,12 +140,12 @@ Please make sure that your KnowledgeTree installation passes all the
140 pre- and post-installation checkups first. 140 pre- and post-installation checkups first.
141 141
142 Refer to the Frequently Asked Questions list on the KnowledgeTree Wiki 142 Refer to the Frequently Asked Questions list on the KnowledgeTree Wiki
143 -at http://support.ktdms.com/confluence/ 143 +at http://issues.ktdms.com/confluence/
144 144
145 -Ask on the KnowledgeTree forums on http://forum.ktdms.com/. 145 +Ask on the KnowledgeTree forums on http://forums.ktdms.com/.
146 146
147 If you have found a bug, please report it to the KnowledgeTree bug 147 If you have found a bug, please report it to the KnowledgeTree bug
148 -reporting system at http://support.ktdms.com/. 148 +reporting system at http://issues.ktdms.com/.
149 149
150 Upgrading 150 Upgrading
151 --------- 151 ---------
@@ -156,8 +156,8 @@ Refer to docs/UPGRADE.txt @@ -156,8 +156,8 @@ Refer to docs/UPGRADE.txt
156 156
157 KnowledgeTree Document Management System 157 KnowledgeTree Document Management System
158 Web page: http://www.ktdms.com/ 158 Web page: http://www.ktdms.com/
159 -Wiki: http://support.ktdms.com/confluence/  
160 -Forums: http://forum.ktdms.com/  
161 -Bug reporting: http://support.ktdms.com/ 159 +Wiki: http://issues.ktdms.com/confluence/
  160 +Forums: http://forums.ktdms.com/
  161 +Bug reporting: http://issues.ktdms.com/
162 162
163 $Id$ 163 $Id$
docs/README.txt
@@ -42,8 +42,8 @@ For installation instructions please refer to docs/INSTALL.txt @@ -42,8 +42,8 @@ For installation instructions please refer to docs/INSTALL.txt
42 42
43 KnowledgeTree Document Management System 43 KnowledgeTree Document Management System
44 Web page: http://www.ktdms.com/ 44 Web page: http://www.ktdms.com/
45 -Wiki: http://support.ktdms.com/confluence/  
46 -Forums: http://forum.ktdms.com/  
47 -Bug reporting: http://support.ktdms.com/ 45 +Wiki: http://issues.ktdms.com/confluence/
  46 +Forums: http://forums.ktdms.com/
  47 +Bug reporting: http://issues.ktdms.com/
48 48
49 $Id$ 49 $Id$
docs/UPGRADE.txt
@@ -90,8 +90,8 @@ directory to "var/Documents before upgrading. @@ -90,8 +90,8 @@ directory to "var/Documents before upgrading.
90 90
91 KnowledgeTree Document Management System 91 KnowledgeTree Document Management System
92 Web page: http://www.ktdms.com/ 92 Web page: http://www.ktdms.com/
93 -Wiki: http://support.ktdms.com/confluence/  
94 -Forums: http://forum.ktdms.com/  
95 -Bug reporting: http://support.ktdms.com/ 93 +Wiki: http://issues.ktdms.com/confluence/
  94 +Forums: http://forums.ktdms.com/
  95 +Bug reporting: http://issues.ktdms.com/
96 96
97 $Id$ 97 $Id$
lib/config/config.inc.php
@@ -73,6 +73,7 @@ class KTConfig { @@ -73,6 +73,7 @@ class KTConfig {
73 $c = new Config; 73 $c = new Config;
74 $root =& $c->parseConfig($filename, "IniCommented"); 74 $root =& $c->parseConfig($filename, "IniCommented");
75 $this->aFileRoot[$filename] =& $root; 75 $this->aFileRoot[$filename] =& $root;
  76 +
76 $conf =& $root->toArray(); 77 $conf =& $root->toArray();
77 foreach ($conf["root"] as $seck => $secv) { 78 foreach ($conf["root"] as $seck => $secv) {
78 $aSectionFile[$seck] = $filename; 79 $aSectionFile[$seck] = $filename;
lib/dispatcher.inc.php
@@ -44,7 +44,7 @@ class KTDispatcher { @@ -44,7 +44,7 @@ class KTDispatcher {
44 var $cancel_var = "kt_cancel"; 44 var $cancel_var = "kt_cancel";
45 var $bAutomaticTransaction = false; 45 var $bAutomaticTransaction = false;
46 var $bTransactionStarted = false; 46 var $bTransactionStarted = false;
47 - var $oValidator = null; 47 + var $oValidator = null;
48 48
49 function KTDispatcher() { 49 function KTDispatcher() {
50 $this->oValidator =& new KTDispatcherValidation($this); 50 $this->oValidator =& new KTDispatcherValidation($this);
@@ -101,7 +101,7 @@ class KTDispatcher { @@ -101,7 +101,7 @@ class KTDispatcher {
101 if (isset($oOrigDispatcher->aBreadcrumbs)) { 101 if (isset($oOrigDispatcher->aBreadcrumbs)) {
102 $this->aBreadcrumbs = $oOrigDispatcher->aBreadcrumbs; 102 $this->aBreadcrumbs = $oOrigDispatcher->aBreadcrumbs;
103 } 103 }
104 - if (isset($oOrigDispatcher->aBreadcrumbs)) { 104 + if (isset($oOrigDispatcher->bTransactionStarted)) {
105 $this->bTransactionStarted = $oOrigDispatcher->bTransactionStarted; 105 $this->bTransactionStarted = $oOrigDispatcher->bTransactionStarted;
106 } 106 }
107 if (isset($oOrigDispatcher->oUser)) { 107 if (isset($oOrigDispatcher->oUser)) {
@@ -193,14 +193,14 @@ class KTStandardDispatcher extends KTDispatcher { @@ -193,14 +193,14 @@ class KTStandardDispatcher extends KTDispatcher {
193 var $aBreadcrumbs = array(); 193 var $aBreadcrumbs = array();
194 var $sSection = false; 194 var $sSection = false;
195 var $oPage = false; 195 var $oPage = false;
196 - var $sHelpPage = null; 196 + var $sHelpPage = null;
197 197
198 function KTStandardDispatcher() { 198 function KTStandardDispatcher() {
199 if (empty($GLOBALS['main'])) { 199 if (empty($GLOBALS['main'])) {
200 $GLOBALS['main'] =& new KTPage; 200 $GLOBALS['main'] =& new KTPage;
201 } 201 }
202 $this->oPage =& $GLOBALS['main']; 202 $this->oPage =& $GLOBALS['main'];
203 - parent::KTDispatcher(); 203 + parent::KTDispatcher();
204 } 204 }
205 205
206 function permissionDenied () { 206 function permissionDenied () {
lib/documentmanagement/Document.inc
@@ -39,7 +39,6 @@ DEFINE("ARCHIVED", 4); @@ -39,7 +39,6 @@ DEFINE("ARCHIVED", 4);
39 DEFINE("STATUS_INCOMPLETE", 5); 39 DEFINE("STATUS_INCOMPLETE", 5);
40 40
41 require_once(KT_LIB_DIR . "/foldermanagement/Folder.inc"); 41 require_once(KT_LIB_DIR . "/foldermanagement/Folder.inc");
42 -  
43 require_once(KT_LIB_DIR . '/documentmanagement/documentcontentversion.inc.php'); 42 require_once(KT_LIB_DIR . '/documentmanagement/documentcontentversion.inc.php');
44 require_once(KT_LIB_DIR . '/documentmanagement/documentcore.inc.php'); 43 require_once(KT_LIB_DIR . '/documentmanagement/documentcore.inc.php');
45 require_once(KT_LIB_DIR . '/documentmanagement/documentmetadataversion.inc.php'); 44 require_once(KT_LIB_DIR . '/documentmanagement/documentmetadataversion.inc.php');
@@ -396,8 +395,14 @@ class Document { @@ -396,8 +395,14 @@ class Document {
396 // {{{ getByState 395 // {{{ getByState
397 function &getByState($oState) { 396 function &getByState($oState) {
398 $iStateId = KTUtil::getId($oState); 397 $iStateId = KTUtil::getId($oState);
399 - $sTable = KTUtil::getTableName('documents');  
400 - $sQuery = sprintf('SELECT id FROM %s WHERE workflow_state_id = ?', $sTable); 398 +
  399 + $sDocumentTable = KTUtil::getTableName('documents');
  400 + $sDocumentMetadataTable = KTUtil::getTableName('document_metadata_version');
  401 +
  402 + $sQuery = sprintf("SELECT D.id AS document_id FROM %s AS D
  403 + LEFT JOIN %s AS DM ON D.metadata_version_id = DM.id
  404 + WHERE workflow_state_id = ?", $sDocumentTable, $sDocumentMetadataTable);
  405 +
401 $aParams = array($iStateId); 406 $aParams = array($iStateId);
402 $aIds = DBUtil::getResultArrayKey(array($sQuery, $aParams), 'document_id'); 407 $aIds = DBUtil::getResultArrayKey(array($sQuery, $aParams), 'document_id');
403 408
@@ -560,5 +565,16 @@ class Document { @@ -560,5 +565,16 @@ class Document {
560 function clearAllCaches() { 565 function clearAllCaches() {
561 return KTEntityUtil::clearAllCaches('Document'); 566 return KTEntityUtil::clearAllCaches('Document');
562 } 567 }
  568 +
  569 +
  570 + function getBreadcrumbs() {
  571 + $aBreadcrumbs = KTBrowseUtil::breadcrumbsForDocument($this);
  572 + if(PEAR::isError($aBreadcrumbs)) {
  573 + return false;
  574 + }
  575 + return $aBreadcrumbs;
  576 + }
  577 +
  578 +
563 } 579 }
564 ?> 580 ?>
lib/documentmanagement/documentutil.inc.php
@@ -75,9 +75,9 @@ class KTDocumentUtil { @@ -75,9 +75,9 @@ class KTDocumentUtil {
75 if(is_array($aOptions)) { 75 if(is_array($aOptions)) {
76 $sFilename = KTUtil::arrayGet($aOptions, 'newfilename', ''); 76 $sFilename = KTUtil::arrayGet($aOptions, 'newfilename', '');
77 if(strlen($sFilename)) { 77 if(strlen($sFilename)) {
  78 + global $default;
78 $oDocument->setFileName($sFilename); 79 $oDocument->setFileName($sFilename);
79 $default->log->info("renamed document " . $oDocument->getId() . " to " . $sFilename); 80 $default->log->info("renamed document " . $oDocument->getId() . " to " . $sFilename);
80 -  
81 } 81 }
82 } 82 }
83 83
@@ -610,6 +610,10 @@ class KTDocumentUtil { @@ -610,6 +610,10 @@ class KTDocumentUtil {
610 610
611 // IF we're deleted ... 611 // IF we're deleted ...
612 if ($oDocument->getStatusID() == DELETED) { return true; } 612 if ($oDocument->getStatusID() == DELETED) { return true; }
  613 +
  614 +
  615 + $oOrigFolder = Folder::get($oDocument->getFolderId());
  616 +
613 617
614 DBUtil::startTransaction(); 618 DBUtil::startTransaction();
615 619
@@ -651,6 +655,12 @@ class KTDocumentUtil { @@ -651,6 +655,12 @@ class KTDocumentUtil {
651 $oDocument->setFolderID(1); 655 $oDocument->setFolderID(1);
652 656
653 DBUtil::commit(); 657 DBUtil::commit();
  658 +
  659 +
  660 + // we weren't doing notifications on this one
  661 + $oSubscriptionEvent = new SubscriptionEvent();
  662 + $oSubscriptionEvent->RemoveDocument($oDocument, $oOrigFolder);
  663 +
654 664
655 // document is now deleted: triggers are best-effort. 665 // document is now deleted: triggers are best-effort.
656 666
lib/email/Email.inc
@@ -43,8 +43,8 @@ class Email { @@ -43,8 +43,8 @@ class Email {
43 // create a new phpmailer object. 43 // create a new phpmailer object.
44 require_once(KT_DIR . '/thirdparty/phpmailer/class.phpmailer.php'); 44 require_once(KT_DIR . '/thirdparty/phpmailer/class.phpmailer.php');
45 $this->oMailer = new phpmailer(); 45 $this->oMailer = new phpmailer();
46 - $this->oMailer->Encoding = 'base64';  
47 - $this->oMailer->CharSet = 'utf-8'; 46 + $this->oMailer->Encoding = 'base64';
  47 + $this->oMailer->CharSet = 'utf-8';
48 $this->oMailer->isSMTP(); 48 $this->oMailer->isSMTP();
49 $this->oMailer->Host = $default->emailServer; 49 $this->oMailer->Host = $default->emailServer;
50 $this->oMailer->From = (strlen($sFromEmail) == 0) ? $default->emailFrom : $sFromEmail; 50 $this->oMailer->From = (strlen($sFromEmail) == 0) ? $default->emailFrom : $sFromEmail;
lib/subscriptions/subscriptions.inc.php
@@ -756,7 +756,18 @@ class SubscriptionContent { @@ -756,7 +756,18 @@ class SubscriptionContent {
756 } else { 756 } else {
757 $info['actor'] = $oTempUser; 757 $info['actor'] = $oTempUser;
758 $info['has_actor'] = true; 758 $info['has_actor'] = true;
759 - $info['actor_name'] = $oTempUser->getName(); 759 +
  760 + $sName = $oTempUser->getName();
  761 + $iUnitId = $oTempUser->getUnitId();
  762 +
  763 + if($iUnitId !== false) {
  764 + $oUnit = Unit::get($iUnitId);
  765 + if(!PEAR::isError($oUnit)) {
  766 + $sName .= sprintf(" (%s)", $oUnit->getName());
  767 + }
  768 + }
  769 +
  770 + $info['actor_name'] = $sName;
760 } 771 }
761 } 772 }
762 773
lib/users/User.inc
@@ -211,10 +211,8 @@ class User extends KTEntity { @@ -211,10 +211,8 @@ class User extends KTEntity {
211 } 211 }
212 212
213 /** 213 /**
214 - * Static function  
215 - * Return the useID for the specified user 214 + * Return the useID for the user
216 * 215 *
217 - * @param int the id the user to lookup the unit for  
218 * @return int the unitID, false otherwise and $_SESSION["errorMessage"] set 216 * @return int the unitID, false otherwise and $_SESSION["errorMessage"] set
219 */ 217 */
220 function getUnitId() { 218 function getUnitId() {
plugins/ktcore/KTDocumentActions.php
@@ -214,6 +214,7 @@ class KTDocumentCheckInAction extends KTDocumentAction { @@ -214,6 +214,7 @@ class KTDocumentCheckInAction extends KTDocumentAction {
214 $checkin_fields = array(); 214 $checkin_fields = array();
215 $checkin_fields[] = new KTFileUploadWidget(_kt('File'), _kt('The updated document.'), 'file', "", $this->oPage, true); 215 $checkin_fields[] = new KTFileUploadWidget(_kt('File'), _kt('The updated document.'), 'file', "", $this->oPage, true);
216 $checkin_fields[] = new KTStringWidget(_kt('Description'), _kt('Describe the changes made to the document.'), 'reason', $sReason, $this->oPage, true); 216 $checkin_fields[] = new KTStringWidget(_kt('Description'), _kt('Describe the changes made to the document.'), 'reason', $sReason, $this->oPage, true);
  217 + $checkin_fields[] = new KTCheckboxWidget(_kt('Force Original Filename'), _kt('If this is checked, the uploaded document must have the same filename as the original.'), 'forcefilename', '1', $this->oPage, true);
217 218
218 $oTemplate->setData(array( 219 $oTemplate->setData(array(
219 'context' => &$this, 220 'context' => &$this,
@@ -226,6 +227,8 @@ class KTDocumentCheckInAction extends KTDocumentAction { @@ -226,6 +227,8 @@ class KTDocumentCheckInAction extends KTDocumentAction {
226 $sReason = KTUtil::arrayGet($_REQUEST, 'reason'); 227 $sReason = KTUtil::arrayGet($_REQUEST, 'reason');
227 $sReason = $this->oValidator->notEmpty($sReason); 228 $sReason = $this->oValidator->notEmpty($sReason);
228 229
  230 + $bForceFilename = KTUtil::arrayGet($_REQUEST, 'forcefilename');
  231 +
229 // make sure the user actually selected a file first 232 // make sure the user actually selected a file first
230 if (strlen($_FILES['file']['name']) == 0) { 233 if (strlen($_FILES['file']['name']) == 0) {
231 $this->errorRedirectToMain(_kt("No file was uploaded"), 'fDocumentId=' . $this->oDocument->getId() . '&reason=' . $sReason); 234 $this->errorRedirectToMain(_kt("No file was uploaded"), 'fDocumentId=' . $this->oDocument->getId() . '&reason=' . $sReason);
@@ -240,23 +243,15 @@ class KTDocumentCheckInAction extends KTDocumentAction { @@ -240,23 +243,15 @@ class KTDocumentCheckInAction extends KTDocumentAction {
240 $default->log->info("checkInDocumentBL.php uploaded filename=" . $sNewFilename . "; current filename=" . $sCurrentFilename); 243 $default->log->info("checkInDocumentBL.php uploaded filename=" . $sNewFilename . "; current filename=" . $sCurrentFilename);
241 244
242 245
243 - /*  
244 - * now allowing this - document's filename is set in 'checkin'  
245 - */  
246 - if ($this->oDocument->getFileName() != $_FILES['file']['name']) {  
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);  
248 - }  
249 - /**/  
250 -  
251 -  
252 -  
253 $aOptions = array(); 246 $aOptions = array();
254 247
255 - /*  
256 - if($sNewFilename != $sCurrentFilename) {  
257 - $aOptions['newfilename'] = $sNewFilename; 248 + if ($this->oDocument->getFileName() != $_FILES['file']['name']) {
  249 + if($bForceFilename) {
  250 + $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);
  251 + } else {
  252 + $aOptions['newfilename'] = $sNewFilename;
  253 + }
258 } 254 }
259 - */  
260 255
261 256
262 $res = KTDocumentUtil::checkin($this->oDocument, $_FILES['file']['tmp_name'], $sReason, $this->oUser, $aOptions); 257 $res = KTDocumentUtil::checkin($this->oDocument, $_FILES['file']['tmp_name'], $sReason, $this->oUser, $aOptions);
@@ -541,10 +536,18 @@ class KTDocumentMoveAction extends KTDocumentAction { @@ -541,10 +536,18 @@ class KTDocumentMoveAction extends KTDocumentAction {
541 function do_move() { 536 function do_move() {
542 $this->oPage->setBreadcrumbDetails(_kt("move")); 537 $this->oPage->setBreadcrumbDetails(_kt("move"));
543 $oTemplate =& $this->oValidator->validateTemplate('ktcore/action/move_final'); 538 $oTemplate =& $this->oValidator->validateTemplate('ktcore/action/move_final');
  539 +
  540 + if($this->oDocument->getFolderId() === $this->oFolder->getId()) {
  541 + $this->errorRedirectTo('main', _kt("The document was already in this folder"), sprintf("fDocumentId=%d&fFolderId=%d", $this->oDocument->getId(), $this->oFolder->getId()));
  542 + exit(0);
  543 + }
  544 +
  545 +
544 $sFolderPath = join(" » ", $this->oFolder->getPathArray()); 546 $sFolderPath = join(" » ", $this->oFolder->getPathArray());
545 $aNames = $this->oDocumentFolder->getPathArray(); 547 $aNames = $this->oDocumentFolder->getPathArray();
546 $aNames[] = $this->oDocument->getName(); 548 $aNames[] = $this->oDocument->getName();
547 $sDocumentName = join(" » ", $aNames); 549 $sDocumentName = join(" » ", $aNames);
  550 +
548 $move_fields = array(); 551 $move_fields = array();
549 $move_fields[] = new KTStaticTextWidget(_kt('Document to move'), '', 'fDocumentId', $sDocumentName, $this->oPage, false); 552 $move_fields[] = new KTStaticTextWidget(_kt('Document to move'), '', 'fDocumentId', $sDocumentName, $this->oPage, false);
550 $move_fields[] = new KTStaticTextWidget(_kt('Target folder'), '', 'fFolderId', $sFolderPath, $this->oPage, false); 553 $move_fields[] = new KTStaticTextWidget(_kt('Target folder'), '', 'fFolderId', $sFolderPath, $this->oPage, false);
@@ -576,6 +579,7 @@ class KTDocumentMoveAction extends KTDocumentAction { @@ -576,6 +579,7 @@ class KTDocumentMoveAction extends KTDocumentAction {
576 $iOriginalFolderPermissionObjectId = $oOriginalFolder->getPermissionObjectId(); 579 $iOriginalFolderPermissionObjectId = $oOriginalFolder->getPermissionObjectId();
577 $iDocumentPermissionObjectId = $this->oDocument->getPermissionObjectId(); 580 $iDocumentPermissionObjectId = $this->oDocument->getPermissionObjectId();
578 581
  582 +
579 if ($iDocumentPermissionObjectId === $iOriginalFolderPermissionObjectId) { 583 if ($iDocumentPermissionObjectId === $iOriginalFolderPermissionObjectId) {
580 $this->oDocument->setPermissionObjectId($this->oFolder->getPermissionObjectId()); 584 $this->oDocument->setPermissionObjectId($this->oFolder->getPermissionObjectId());
581 } 585 }
plugins/ktcore/admin/documentFields.php
@@ -689,17 +689,33 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -689,17 +689,33 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
689 global $default; 689 global $default;
690 // extract. 690 // extract.
691 691
692 - $oFieldset =& KTFieldset::get($_REQUEST['fFieldsetId']);  
693 - $oField =& DocumentField::get($_REQUEST['field_id']); 692 + $iFieldsetId = KTUtil::arrayGet($_REQUEST, 'fFieldsetId', false);
  693 + $iFieldId = KTUtil::arrayGet($_REQUEST, 'field_id', false);
  694 +
  695 + $oFieldset =& KTFieldset::get($iFieldsetId);
  696 + if(PEAR::isError($oFieldset)) {
  697 + $this->errorRedirectTo('main', _kt('Unable to find fieldset'), sprintf('fFieldId=%d&fFieldsetId=%d', $iFieldsetId, $iFieldId));
  698 + exit(0);
  699 + }
  700 +
  701 + $oField =& DocumentField::get($iFieldId);
  702 + if(PEAR::isError($oField)) {
  703 + $this->errorRedirectTo('main', _kt('Unable to find field'), sprintf('fFieldId=%d&fFieldsetId=%d', $iFieldsetId, $iFieldId));
  704 + exit(0);
  705 + }
  706 +
  707 +
  708 +
  709 +
694 710
695 $this->aBreadcrumbs[] = array( 711 $this->aBreadcrumbs[] = array(
696 'url' => $_SERVER['PHP_SELF'], 712 'url' => $_SERVER['PHP_SELF'],
697 - 'query' => 'action=edit&fFieldsetId=' . $_REQUEST['fFieldsetId'], 713 + 'query' => 'action=edit&fFieldsetId=' . $iFieldsetId,
698 'name' => $oFieldset->getName() 714 'name' => $oFieldset->getName()
699 ); 715 );
700 $this->aBreadcrumbs[] = array( 716 $this->aBreadcrumbs[] = array(
701 'url' => $_SERVER['PHP_SELF'], 717 'url' => $_SERVER['PHP_SELF'],
702 - 'query' => 'action=editField&fFieldsetId=' . $_REQUEST['fFieldsetId'] . '&fFieldId=' . $oField->getId(), 718 + 'query' => 'action=editField&fFieldsetId=' . $iFieldsetId . '&fFieldId=' . $oField->getId(),
703 'name' => $oField->getName() 719 'name' => $oField->getName()
704 ); 720 );
705 $this->oPage->setBreadcrumbDetails(_kt('edit lookup tree')); 721 $this->oPage->setBreadcrumbDetails(_kt('edit lookup tree'));
@@ -728,8 +744,11 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -728,8 +744,11 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
728 $msg = _kt('Changes saved.'); 744 $msg = _kt('Changes saved.');
729 if ($subaction === "addCategory") { 745 if ($subaction === "addCategory") {
730 $new_category = KTUtil::arrayGet($_REQUEST, 'category_name'); 746 $new_category = KTUtil::arrayGet($_REQUEST, 'category_name');
731 - if (empty($new_category)) { return $this->errorRedirectTo("editTree", _kt("Must enter a name for the new category."), array("field_id" => $field_id)); }  
732 - else { $this->subact_addCategory($field_id, $current_node, $new_category, $fieldTree);} 747 + if (empty($new_category)) {
  748 + return $this->errorRedirectTo("editTree", _kt("Must enter a name for the new category."), array("field_id" => $field_id, "fFieldsetId" => $iFieldsetId));
  749 + } else {
  750 + $this->subact_addCategory($field_id, $current_node, $new_category, $fieldTree);
  751 + }
733 $msg = _kt('Category added'). ': ' . $new_category; 752 $msg = _kt('Category added'). ': ' . $new_category;
734 } 753 }
735 if ($subaction === "deleteCategory") { 754 if ($subaction === "deleteCategory") {
@@ -751,10 +770,9 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -751,10 +770,9 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
751 $msg = _kt('Keyword moved to base of tree.'); 770 $msg = _kt('Keyword moved to base of tree.');
752 } 771 }
753 // now redirect 772 // now redirect
754 - $query = 'field_id=' . $field_id; 773 + $query = sprintf('field_id=%d&fFieldsetId=%d', $field_id, $iFieldsetId);
755 return $this->successRedirectTo($target, $msg, $query); 774 return $this->successRedirectTo($target, $msg, $query);
756 } 775 }
757 -  
758 if ($fieldTree->root === null) { 776 if ($fieldTree->root === null) {
759 return $this->errorRedirectToMain(_kt("Error building tree. Is this a valid tree-lookup field?")); 777 return $this->errorRedirectToMain(_kt("Error building tree. Is this a valid tree-lookup field?"));
760 } 778 }
@@ -835,12 +853,17 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -835,12 +853,17 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
835 853
836 function _evilTreeRecursion($subnode, $treeToRender) 854 function _evilTreeRecursion($subnode, $treeToRender)
837 { 855 {
  856 + // deliver us from evil....
  857 + $iFieldId = $treeToRender->field_id;
  858 + $oField = DocumentField::get($iFieldId);
  859 + $iFieldsetId = $oField->getParentFieldsetId();
  860 +
838 $treeStr = "<ul>"; 861 $treeStr = "<ul>";
839 foreach ($treeToRender->contents[$subnode] as $subnode_id => $subnode_val) 862 foreach ($treeToRender->contents[$subnode] as $subnode_id => $subnode_val)
840 { 863 {
841 if ($subnode_id !== "leaves") { 864 if ($subnode_id !== "leaves") {
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>'; 865 $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 - $treeStr .= $this->_evilActionHelper($treeToRender->field_id, false, $subnode_val); 866 + $treeStr .= $this->_evilActionHelper($iFieldsetId, $iFieldId, false, $subnode_val);
844 $treeStr .= $this->_evilTreeRecursion($subnode_val, $treeToRender); 867 $treeStr .= $this->_evilTreeRecursion($subnode_val, $treeToRender);
845 $treeStr .= '</li>'; 868 $treeStr .= '</li>';
846 } 869 }
@@ -849,7 +872,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -849,7 +872,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
849 foreach ($subnode_val as $leaf) 872 foreach ($subnode_val as $leaf)
850 { 873 {
851 $treeStr .= '<li class="leafnode">' . $treeToRender->lookups[$leaf]->getName(); 874 $treeStr .= '<li class="leafnode">' . $treeToRender->lookups[$leaf]->getName();
852 - $treeStr .= $this->_evilActionHelper($treeToRender->field_id, true, $leaf); 875 + $treeStr .= $this->_evilActionHelper($iFieldsetId, $iFieldId, true, $leaf);
853 $treeStr .= '</li>'; } 876 $treeStr .= '</li>'; }
854 } 877 }
855 } 878 }
@@ -862,15 +885,23 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -862,15 +885,23 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
862 // Come up with a better way to do this (? NBM) 885 // Come up with a better way to do this (? NBM)
863 function _evilTreeRenderer($treeToRender) { 886 function _evilTreeRenderer($treeToRender) {
864 //global $default; 887 //global $default;
  888 +
865 $treeStr = "<!-- this is rendered with an unholy hack. sorry. -->"; 889 $treeStr = "<!-- this is rendered with an unholy hack. sorry. -->";
866 $stack = array(); 890 $stack = array();
867 $exitstack = array(); 891 $exitstack = array();
868 892
  893 + // deliver us from evil....
  894 + $iFieldId = $treeToRender->field_id;
  895 + $oField = DocumentField::get($iFieldId);
  896 + $iFieldsetId = $oField->getParentFieldsetId();
  897 + $sBaseQS = sprintf('field_id=%d&fFieldsetId=%d&', $iFieldId, $iFieldsetId);
  898 +
869 // since the root is virtual, we need to fake it here. 899 // since the root is virtual, we need to fake it here.
870 // the inner section is generised. 900 // the inner section is generised.
871 $treeStr .= '<ul class="kt_treenodes"><li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">Root</a>'; 901 $treeStr .= '<ul class="kt_treenodes"><li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">Root</a>';
872 - $treeStr .= ' (<a href="' . KTUtil::addQueryStringSelf('action=editTree&field_id='.$treeToRender->field_id.'&current_node=0') . '">edit</a>)'; 902 + $treeStr .= ' (<a href="' . KTUtil::addQueryStringSelf($sBaseQS . 'action=editTree&current_node=0') . '">edit</a>)';
873 $treeStr .= '<ul>'; 903 $treeStr .= '<ul>';
  904 +
874 //$default->log->debug("EVILRENDER: " . print_r($treeToRender, true)); 905 //$default->log->debug("EVILRENDER: " . print_r($treeToRender, true));
875 foreach ($treeToRender->getRoot() as $node_id => $subtree_nodes) 906 foreach ($treeToRender->getRoot() as $node_id => $subtree_nodes)
876 { 907 {
@@ -879,7 +910,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -879,7 +910,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
879 if ($node_id !== "leaves") { 910 if ($node_id !== "leaves") {
880 // $default->log->debug("EVILRENDER: " . print_r($subtree_nodes, true)); 911 // $default->log->debug("EVILRENDER: " . print_r($subtree_nodes, true));
881 $treeStr .= '<li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">' . $treeToRender->mapnodes[$subtree_nodes]->getName() . '</a>'; 912 $treeStr .= '<li class="treenode active"><a class="pathnode" onclick="toggleElementClass(\'active\', this.parentNode);toggleElementClass(\'inactive\', this.parentNode);">' . $treeToRender->mapnodes[$subtree_nodes]->getName() . '</a>';
882 - $treeStr .= $this->_evilActionHelper($treeToRender->field_id, false, $subtree_nodes); 913 + $treeStr .= $this->_evilActionHelper($iFieldsetId, $iFieldId, false, $subtree_nodes);
883 $treeStr .= $this->_evilTreeRecursion($subtree_nodes, $treeToRender); 914 $treeStr .= $this->_evilTreeRecursion($subtree_nodes, $treeToRender);
884 $treeStr .= '</li>'; 915 $treeStr .= '</li>';
885 } 916 }
@@ -888,7 +919,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -888,7 +919,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
888 foreach ($subtree_nodes as $leaf) 919 foreach ($subtree_nodes as $leaf)
889 { 920 {
890 $treeStr .= '<li class="leafnode">' . $treeToRender->lookups[$leaf]->getName(); 921 $treeStr .= '<li class="leafnode">' . $treeToRender->lookups[$leaf]->getName();
891 - $treeStr .= $this->_evilActionHelper($treeToRender->field_id, true, $leaf); 922 + $treeStr .= $this->_evilActionHelper($iFieldsetId, $iFieldId, true, $leaf);
892 $treeStr .= '</li>'; 923 $treeStr .= '</li>';
893 } 924 }
894 } 925 }
@@ -899,16 +930,20 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -899,16 +930,20 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
899 return $treeStr; 930 return $treeStr;
900 } 931 }
901 932
902 - // don't hate me.  
903 - function _evilActionHelper($iFieldId, $bIsKeyword, $current_node) { 933 + // BS: don't hate me.
  934 + // BD: sorry. I hate you.
  935 +
  936 + function _evilActionHelper($iFieldsetId, $iFieldId, $bIsKeyword, $current_node) {
  937 + $sBaseQS = sprintf('fFieldsetId=%d&field_id=%d&', $iFieldsetId, $iFieldId);
  938 +
904 $actionStr = " ("; 939 $actionStr = " (";
905 if ($bIsKeyword === true) { 940 if ($bIsKeyword === true) {
906 - $actionStr .= '<a href="' . KTUtil::addQueryStringSelf('action=editTree&field_id='.$iFieldId.'&keyword_id='.$current_node.'&subaction=unlinkKeyword') . '">unlink</a>'; 941 + $actionStr .= '<a href="' . KTUtil::addQueryStringSelf($sBaseQS . 'action=editTree&keyword_id='.$current_node.'&subaction=unlinkKeyword') . '">unlink</a>';
907 } 942 }
908 else 943 else
909 { 944 {
910 - $actionStr .= '<a href="' . KTUtil::addQueryStringSelf('action=editTree&field_id=' . $iFieldId . '&current_node=' . $current_node) .'">attach keywords</a> ';  
911 - $actionStr .= '| <a href="' . KTUtil::addQueryStringSelf('action=editTree&field_id='.$iFieldId.'&current_node='.$current_node.'&subaction=deleteCategory') . '">delete</a>'; 945 + $actionStr .= '<a href="' . KTUtil::addQueryStringSelf($sBaseQS . 'action=editTree&current_node=' . $current_node) .'">attach keywords</a> ';
  946 + $actionStr .= '| <a href="' . KTUtil::addQueryStringSelf($sBaseQS . 'action=editTree&current_node='.$current_node.'&subaction=deleteCategory') . '">delete</a>';
912 } 947 }
913 $actionStr .= ")"; 948 $actionStr .= ")";
914 return $actionStr; 949 return $actionStr;
@@ -934,7 +969,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { @@ -934,7 +969,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
934 "context" => &$this, 969 "context" => &$this,
935 "fieldset_id" => $fieldset_id, 970 "fieldset_id" => $fieldset_id,
936 "aFields" => $aFields, 971 "aFields" => $aFields,
937 - "behaviours" => $aBehaviours, 972 + "behaviours" => $aBehaviours,
938 "iMasterFieldId" => $oFieldset->getMasterFieldId(), 973 "iMasterFieldId" => $oFieldset->getMasterFieldId(),
939 ); 974 );
940 return $oTemplate->render($aTemplateData); 975 return $oTemplate->render($aTemplateData);
plugins/ktcore/folder/Rename.php
@@ -70,8 +70,9 @@ class KTFolderRenameAction extends KTFolderAction { @@ -70,8 +70,9 @@ class KTFolderRenameAction extends KTFolderAction {
70 $sFolderName = KTUtil::arrayGet($_REQUEST, 'foldername'); 70 $sFolderName = KTUtil::arrayGet($_REQUEST, 'foldername');
71 $aErrorOptions['defaultmessage'] = _kt("No folder name given"); 71 $aErrorOptions['defaultmessage'] = _kt("No folder name given");
72 $sFolderName = $this->oValidator->validateString($sFolderName, $aErrorOptions); 72 $sFolderName = $this->oValidator->validateString($sFolderName, $aErrorOptions);
  73 + $sOldFolderName = $this->oFolder->getName();
73 74
74 - $oParentFolder =& Folder::get($this->oFolder->iParentID); 75 + $oParentFolder =& Folder::get($this->oFolder->getParentID());
75 if(PEAR::isError($oParentFolder)) { 76 if(PEAR::isError($oParentFolder)) {
76 $this->errorRedirectToMain(_kt('Unable to retrieve parent folder.'), $aErrorOptions['redirect_to'][1]); 77 $this->errorRedirectToMain(_kt('Unable to retrieve parent folder.'), $aErrorOptions['redirect_to'][1]);
77 exit(0); 78 exit(0);
@@ -89,7 +90,7 @@ class KTFolderRenameAction extends KTFolderAction { @@ -89,7 +90,7 @@ class KTFolderRenameAction extends KTFolderAction {
89 redirect(KTBrowseUtil::getUrlForFolder($this->oFolder)); 90 redirect(KTBrowseUtil::getUrlForFolder($this->oFolder));
90 exit(0); 91 exit(0);
91 } else { 92 } else {
92 - $_SESSION['KTInfoMessage'][] = sprintf(_kt('Folder "%s" renamed to "%s".'), $this->oFolder->getName(), $sFolderName); 93 + $_SESSION['KTInfoMessage'][] = sprintf(_kt('Folder "%s" renamed to "%s".'), $sOldFolderName, $sFolderName);
93 } 94 }
94 95
95 $this->commitTransaction(); 96 $this->commitTransaction();
plugins/ktcore/folder/addDocument.php
@@ -71,7 +71,13 @@ class KTFolderAddDocumentAction extends KTFolderAction { @@ -71,7 +71,13 @@ class KTFolderAddDocumentAction extends KTFolderAction {
71 $add_fields = array(); 71 $add_fields = array();
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); 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 $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); 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 +
  75 +
  76 +
  77 + /* Allows filename change on upload
  78 +
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); 79 $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);
  80 + */
75 81
76 82
77 $aVocab = array('' => _kt('&lt;Please select a document type&gt;')); 83 $aVocab = array('' => _kt('&lt;Please select a document type&gt;'));
templates/kt3/notifications/subscriptions.AddFolder.smarty
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 {if !$is_broken} 7 {if !$is_broken}
8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Folder{/i18n}</a> 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Folder{/i18n}</a>
9 {else} 9 {else}
10 - <span class="descriptiveText">{i18n}Document is no longer available{/i18n}</span> 10 + <span class="descriptiveText">{i18n}Folder is no longer available{/i18n}</span>
11 {/if} 11 {/if}
12 | <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>
13 </div> 13 </div>
templates/kt3/notifications/subscriptions.ArchiveDocument.smarty renamed to templates/kt3/notifications/subscriptions.ArchivedDocument.smarty
1 <dt class="actionitem subscription">{$info.title}</dt> 1 <dt class="actionitem subscription">{$info.title}</dt>
2 <dd class="actionmessage"> 2 <dd class="actionmessage">
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 - The document "{$info.object_name}" has been archived by an administrator. 4 + The document "{$info.object_name}" {if ($info.location_name !== null)} from "{$info.location_name}"{/if} was archived{if ($info.has_actor)}
  5 + by {$info.actor_name}{/if}.
  6 +
5 <div class="actionoptions"> 7 <div class="actionoptions">
6 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a> 8 <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 </div> 9 </div>
templates/ktcore/document/admin/archivebrowse.smarty
@@ -10,7 +10,7 @@ notification to you.{/i18n} @@ -10,7 +10,7 @@ notification to you.{/i18n}
10 <form method="POST" action="{$smarty.server.PHP_SELF}"> 10 <form method="POST" action="{$smarty.server.PHP_SELF}">
11 <input type="hidden" name="action" value="confirm_restore" /> 11 <input type="hidden" name="action" value="confirm_restore" />
12 <p class="descriptiveText">{i18n}Use the folder collection and path below to 12 <p class="descriptiveText">{i18n}Use the folder collection and path below to
13 -browse to the folder you wish to move the documents into.{/i18n}</p> 13 +browse to the folder containing the documents you wish to restore.{/i18n}</p>
14 14
15 <input type="hidden" name="fFolderId" value="{$folder->getId()}" /> 15 <input type="hidden" name="fFolderId" value="{$folder->getId()}" />
16 {foreach from=$collection_breadcrumbs item=breadcrumb name=bc} 16 {foreach from=$collection_breadcrumbs item=breadcrumb name=bc}