Commit 6fb73b0998c30f6370d95698c481b032b7dd8069

Authored by kevin_fourie
1 parent 590534d1

Merged in from DEV trunk...

KTS-2917

"If the fieldset names are too long there is no way to get to the edit button on the main Fieldset page"

Fixed. Fieldset name is now truncated to a better size.

Committed By: Jonathan Byrne
Reviewed By: Jalaloedien Abrahams

KTS-2717
"Changing folder permissions to allow for a new user group to perform the delete action does not work"
Fixed. On overriding permissions for the folder the copy permissions action wasn't taking existing documents in the folder into account.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen

KTS-2432
"Dynamic Condition Doesnt Work in 3.4.3"
Fixed. On adding / editing a document it now checks if dynamic conditions exist and updates the permission object.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen

KTC-227
"Widget broken"

Fixed. Html tags are now interpreted properly on the conditional metadata admin page.

Committed By: Jonathan Byrne
Reviewed By: Jalaloedien Abrahams

KTS-3048
"External Dependencies missing after upgrade"
In Progess. Updated the upgrade config functions.

Committed By: Kevin Fourie
Reviewed By: Conrad Vermeulen


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8093 c91229c3-7414-0410-bfa2-8a42b809f60b
config/dmsDefaults.php
@@ -76,6 +76,16 @@ if (!defined('KT_LIB_DIR')) { @@ -76,6 +76,16 @@ if (!defined('KT_LIB_DIR')) {
76 define('KT_LIB_DIR', KT_DIR . '/lib'); 76 define('KT_LIB_DIR', KT_DIR . '/lib');
77 } 77 }
78 78
  79 +// If not defined, set KT_INSTALL_DIR based on my usual location in the tree
  80 +if (!defined('KT_INSTALL_DIR')) {
  81 + $installLoc = realpath(dirname(__FILE__) . '/../..');
  82 + if (substr(PHP_OS, 0, 3) == 'WIN') {
  83 + $installLoc = str_replace('\\','/',$installLoc);
  84 + }
  85 + define('KT_INSTALL_DIR', $installLoc);
  86 +}
  87 +
  88 +
79 // PATH_SEPARATOR added in PHP 4.3.0 89 // PATH_SEPARATOR added in PHP 4.3.0
80 if (!defined('PATH_SEPARATOR')) { 90 if (!defined('PATH_SEPARATOR')) {
81 if (substr(PHP_OS, 0, 3) == 'WIN') { 91 if (substr(PHP_OS, 0, 3) == 'WIN') {
lib/documentmanagement/documentutil.inc.php
@@ -558,12 +558,12 @@ class KTDocumentUtil { @@ -558,12 +558,12 @@ class KTDocumentUtil {
558 DBUtil::startTransaction(); 558 DBUtil::startTransaction();
559 $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions); 559 $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions);
560 560
561 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Document created'))); 561 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Document created')));
562 if (PEAR::isError($oDocument)) { 562 if (PEAR::isError($oDocument)) {
563 return $oDocument; 563 return $oDocument;
564 } 564 }
565 565
566 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Scanning file'))); 566 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Scanning file')));
567 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); 567 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton();
568 $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'scan'); 568 $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'scan');
569 $iTrigger = 0; 569 $iTrigger = 0;
@@ -582,22 +582,8 @@ class KTDocumentUtil { @@ -582,22 +582,8 @@ class KTDocumentUtil {
582 // NEW SEARCH 582 // NEW SEARCH
583 583
584 Indexer::index($oDocument); 584 Indexer::index($oDocument);
585 - /*  
586 - $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Transforming file')));  
587 - $oKTTriggerRegistry = KTTriggerRegistry::getSingleton();  
588 - $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'transform');  
589 - foreach ($aTriggers as $aTrigger) {  
590 - $sTrigger = $aTrigger[0];  
591 - if ($aTrigger[1]) {  
592 - require_once($aTrigger[1]);  
593 - }  
594 - $oTrigger = new $sTrigger;  
595 - $oTrigger->setDocument($oDocument);  
596 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(sprintf(_kt(" (trigger %s)"), $sTrigger)));  
597 - $oTrigger->transform();  
598 - }*/  
599 585
600 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Creating transaction'))); 586 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Creating transaction')));
601 $aOptions = array('user' => $oUser); 587 $aOptions = array('user' => $oUser);
602 //create the document transaction record 588 //create the document transaction record
603 $oDocumentTransaction = new DocumentTransaction($oDocument, _kt('Document created'), 'ktcore.transactions.create', $aOptions); 589 $oDocumentTransaction = new DocumentTransaction($oDocument, _kt('Document created'), 'ktcore.transactions.create', $aOptions);
@@ -607,7 +593,7 @@ class KTDocumentUtil { @@ -607,7 +593,7 @@ class KTDocumentUtil {
607 return $res; 593 return $res;
608 } 594 }
609 595
610 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Sending subscriptions'))); 596 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Sending subscriptions')));
611 // fire subscription alerts for the checked in document 597 // fire subscription alerts for the checked in document
612 $oSubscriptionEvent = new SubscriptionEvent(); 598 $oSubscriptionEvent = new SubscriptionEvent();
613 $oFolder = Folder::get($oDocument->getFolderID()); 599 $oFolder = Folder::get($oDocument->getFolderID());
@@ -630,6 +616,20 @@ class KTDocumentUtil { @@ -630,6 +616,20 @@ class KTDocumentUtil {
630 KTDocumentUtil::updateSearchableText($oDocument, true); 616 KTDocumentUtil::updateSearchableText($oDocument, true);
631 617
632 DBUtil::commit(); 618 DBUtil::commit();
  619 +
  620 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Checking permissions...')));
  621 +
  622 + // Check if there are any dynamic conditions / permissions that need to be updated on the document
  623 + // If there are dynamic conditions then update the permissions on the document
  624 + // The dynamic condition test fails unless the document exists in the DB therefore update permissions after committing the transaction.
  625 + include_once(KT_LIB_DIR.'/permissions/permissiondynamiccondition.inc.php');
  626 + $iPermissionObjectId = $oFolder->getPermissionObjectID();
  627 + $dynamicCondition = KTPermissionDynamicCondition::getByPermissionObjectId($iPermissionObjectId);
  628 +
  629 + if(!PEAR::isError($dynamicCondition) && !empty($dynamicCondition)){
  630 + $res = KTPermissionUtil::updatePermissionLookup($oDocument);
  631 + }
  632 +
633 $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('All done...'))); 633 $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('All done...')));
634 634
635 return $oDocument; 635 return $oDocument;
lib/permissions/permissiondynamiccondition.inc.php
@@ -5,32 +5,32 @@ @@ -5,32 +5,32 @@
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
7 * Copyright (C) 2004 - 2008 The Jam Warehouse Software (Pty) Limited 7 * Copyright (C) 2004 - 2008 The Jam Warehouse Software (Pty) Limited
8 - * 8 + *
9 * This program is free software; you can redistribute it and/or modify it under 9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License version 3 as published by the 10 * the terms of the GNU General Public License version 3 as published by the
11 * Free Software Foundation. 11 * Free Software Foundation.
12 - * 12 + *
13 * This program is distributed in the hope that it will be useful, but WITHOUT 13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 * details. 16 * details.
17 - * 17 + *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 - * 20 + *
21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, 21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. 22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
23 - * 23 + *
24 * The interactive user interfaces in modified source and object code versions 24 * The interactive user interfaces in modified source and object code versions
25 * of this program must display Appropriate Legal Notices, as required under 25 * of this program must display Appropriate Legal Notices, as required under
26 * Section 5 of the GNU General Public License version 3. 26 * Section 5 of the GNU General Public License version 3.
27 - * 27 + *
28 * In accordance with Section 7(b) of the GNU General Public License version 3, 28 * In accordance with Section 7(b) of the GNU General Public License version 3,
29 * these Appropriate Legal Notices must retain the display of the "Powered by 29 * these Appropriate Legal Notices must retain the display of the "Powered by
30 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 30 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
32 - * must display the words "Powered by KnowledgeTree" and retain the original  
33 - * copyright notice. 32 + * must display the words "Powered by KnowledgeTree" and retain the original
  33 + * copyright notice.
34 * Contributor( s): ______________________________________ 34 * Contributor( s): ______________________________________
35 * 35 *
36 */ 36 */
@@ -89,6 +89,15 @@ class KTPermissionDynamicCondition extends KTEntity { @@ -89,6 +89,15 @@ class KTPermissionDynamicCondition extends KTEntity {
89 )); 89 ));
90 } 90 }
91 91
  92 + function &getByPermissionObjectId($iPermissionObjectId) {
  93 + return KTEntityUtil::getByDict('KTPermissionDynamicCondition', array(
  94 + 'permission_object_id' => $iPermissionObjectId,
  95 + ), array(
  96 + 'multi' => true,
  97 + ));
  98 + }
  99 +
  100 +
92 function &getByPermissionObjectAndCondition($oPermissionObject, $oCondition) { 101 function &getByPermissionObjectAndCondition($oPermissionObject, $oCondition) {
93 $iPermissionObjectId = KTUtil::getId($oPermissionObject); 102 $iPermissionObjectId = KTUtil::getId($oPermissionObject);
94 $iConditionId = KTUtil::getId($oCondition); 103 $iConditionId = KTUtil::getId($oCondition);
@@ -142,7 +151,7 @@ class KTPermissionDynamicCondition extends KTEntity { @@ -142,7 +151,7 @@ class KTPermissionDynamicCondition extends KTEntity {
142 array($iConditionId), 151 array($iConditionId),
143 ); 152 );
144 $aIds = DBUtil::getResultArrayKey($aQuery, 'id'); 153 $aIds = DBUtil::getResultArrayKey($aQuery, 'id');
145 - 154 +
146 155
147 $sParam = DBUtil::paramArray($aIds); 156 $sParam = DBUtil::paramArray($aIds);
148 157
lib/permissions/permissionutil.inc.php
@@ -431,7 +431,7 @@ class KTPermissionUtil { @@ -431,7 +431,7 @@ class KTPermissionUtil {
431 */ 431 */
432 432
433 433
434 - if (is_null($oPermLookup)) { 434 + //if (is_null($oPermLookup)) {
435 $aMapPermDesc = array(); 435 $aMapPermDesc = array();
436 foreach ($aMapPermAllowed as $iPermissionId => $aAllowed) { 436 foreach ($aMapPermAllowed as $iPermissionId => $aAllowed) {
437 $oLookupPD = KTPermissionUtil::getOrCreateDescriptor($aAllowed); 437 $oLookupPD = KTPermissionUtil::getOrCreateDescriptor($aAllowed);
@@ -439,7 +439,7 @@ class KTPermissionUtil { @@ -439,7 +439,7 @@ class KTPermissionUtil {
439 } 439 }
440 440
441 $oPermLookup = KTPermissionLookupAssignment::findOrCreateLookupByPermissionDescriptorMap($aMapPermDesc); 441 $oPermLookup = KTPermissionLookupAssignment::findOrCreateLookupByPermissionDescriptorMap($aMapPermDesc);
442 - } 442 + //}
443 443
444 $oFolderOrDocument->setPermissionLookupID($oPermLookup->getID()); 444 $oFolderOrDocument->setPermissionLookupID($oPermLookup->getID());
445 $oFolderOrDocument->update(); 445 $oFolderOrDocument->update();
@@ -600,7 +600,8 @@ class KTPermissionUtil { @@ -600,7 +600,8 @@ class KTPermissionUtil {
600 600
601 $sQuery = "UPDATE $default->documents_table SET 601 $sQuery = "UPDATE $default->documents_table SET
602 permission_object_id = ? WHERE permission_object_id = ? AND 602 permission_object_id = ? WHERE permission_object_id = ? AND
603 - parent_folder_ids LIKE ?"; 603 + (parent_folder_ids LIKE ? OR folder_id = ?)";
  604 + $aParams[] = $iFolderID;
604 DBUtil::runQuery(array($sQuery, $aParams)); 605 DBUtil::runQuery(array($sQuery, $aParams));
605 606
606 Document::clearAllCaches(); 607 Document::clearAllCaches();
lib/upgrades/UpgradeFunctions.inc.php
@@ -1038,17 +1038,18 @@ class UpgradeFunctions { @@ -1038,17 +1038,18 @@ class UpgradeFunctions {
1038 $ini->addItem('webservice', 'validateSessionCount', 'false'); 1038 $ini->addItem('webservice', 'validateSessionCount', 'false');
1039 1039
1040 // externalBinary Section 1040 // externalBinary Section
  1041 + $ini->delSection('externalBinary');
1041 if(OS_WINDOWS){ 1042 if(OS_WINDOWS){
1042 - $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.');  
1043 - $ini->addItem('externalBinary', 'pdftotext', 'pdftotext');  
1044 - $ini->addItem('externalBinary', 'catppt', 'catppt');  
1045 - $ini->addItem('externalBinary', 'pstotext', 'pstotext');  
1046 - $ini->addItem('externalBinary', 'catdoc', 'catdoc');  
1047 - $ini->addItem('externalBinary', 'antiword', 'antiword.exe');  
1048 - $ini->addItem('externalBinary', 'python', 'python.bat');  
1049 - $ini->addItem('externalBinary', 'java', 'java.exe');  
1050 - $ini->addItem('externalBinary', 'php', 'php.exe');  
1051 - $ini->addItem('externalBinary', 'df', 'df.exe'); 1043 + $ini->addItem('externalBinary', 'xls2csv', KT_INSTALL_DIR . '/bin/catdoc/xls2csv.exe', '', 'The following are external binaries that may be used by various parts of knowledgeTree.');
  1044 + $ini->addItem('externalBinary', 'pdftotext', KT_INSTALL_DIR . '/bin/xpdf/pdftotext.exe');
  1045 + $ini->addItem('externalBinary', 'catppt', KT_INSTALL_DIR . '/bin/catdoc/catppt.exe');
  1046 + $ini->addItem('externalBinary', 'pstotext', KT_INSTALL_DIR . '/pstotext');
  1047 + $ini->addItem('externalBinary', 'catdoc', KT_INSTALL_DIR . '/bin/catdoc/catdoc.exe');
  1048 + $ini->addItem('externalBinary', 'antiword', KT_INSTALL_DIR . '/bin/antiword/antiword.exe');
  1049 + $ini->addItem('externalBinary', 'python', KT_INSTALL_DIR . '/python.bat');
  1050 + $ini->addItem('externalBinary', 'java', KT_INSTALL_DIR . '/java/jre/bin/java.exe');
  1051 + $ini->addItem('externalBinary', 'php', KT_INSTALL_DIR . '/php/php.exe');
  1052 + $ini->addItem('externalBinary', 'df', KT_INSTALL_DIR . '/bin/gnuwin32/df.exe');
1052 1053
1053 } else { 1054 } else {
1054 $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); 1055 $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.');
@@ -1056,7 +1057,7 @@ class UpgradeFunctions { @@ -1056,7 +1057,7 @@ class UpgradeFunctions {
1056 $ini->addItem('externalBinary', 'catppt', 'catppt'); 1057 $ini->addItem('externalBinary', 'catppt', 'catppt');
1057 $ini->addItem('externalBinary', 'pstotext', 'pstotext'); 1058 $ini->addItem('externalBinary', 'pstotext', 'pstotext');
1058 $ini->addItem('externalBinary', 'catdoc', 'catdoc'); 1059 $ini->addItem('externalBinary', 'catdoc', 'catdoc');
1059 - $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); 1060 + $ini->addItem('externalBinary', 'antiword', '');
1060 $ini->addItem('externalBinary', 'python', 'python'); 1061 $ini->addItem('externalBinary', 'python', 'python');
1061 $ini->addItem('externalBinary', 'java', 'java'); 1062 $ini->addItem('externalBinary', 'java', 'java');
1062 $ini->addItem('externalBinary', 'php', 'php'); 1063 $ini->addItem('externalBinary', 'php', 'php');
plugins/ktcore/admin/fieldsets/conditional.inc.php
@@ -111,12 +111,15 @@ class ConditionalFieldsetManagementDispatcher extends BasicFieldsetManagementDis @@ -111,12 +111,15 @@ class ConditionalFieldsetManagementDispatcher extends BasicFieldsetManagementDis
111 // now prep for the warnings. 111 // now prep for the warnings.
112 if ($this->oMasterfield) { 112 if ($this->oMasterfield) {
113 if (!empty($this->aFreeFields)) { 113 if (!empty($this->aFreeFields)) {
114 - $this->addErrorMessage(_kt("All fields must be assigned to an order in the conditional system. To correct this, please use the \"manage field ordering\" link below. <strong>This fieldset will display as a normal, non-conditional fieldset until this problem is corrected.</strong>")); 114 + $this->addErrorMessage(_kt("Al fields must be assigned to an order in the conditional system. To correct this, please use the \"manage field ordering\" link below. <b>This fieldset will display as a normal, non-conditional fieldset until this problem is corrected.</b>"));
  115 + $this->oPage->booleanLink = true;
115 } else if ($this->bIncomplete) { 116 } else if ($this->bIncomplete) {
116 - $this->addErrorMessage(sprintf(_kt("This fieldset is incomplete: %s <strong>This fieldset will display as a normal, non-conditional fieldset until this problem is corrected.</strong>"), $sIncomplete)); 117 + $this->addErrorMessage(sprintf(_kt("This fieldset is incomplete: %s <b>This fieldset will display as a normal, non-conditional fieldset until this problem is corrected.</b>"), $sIncomplete));
  118 + $this->oPage->booleanLink = true;
117 } 119 }
118 } else { 120 } else {
119 - $this->addErrorMessage(_kt("A conditional fieldset must have a master field before it can be used. To correct this, please use the \"manage field ordering\" link below. <strong>This fieldset will display as a normal, non-conditional fieldset until this problem is corrected.</strong>")); 121 + $this->addErrorMessage(_kt("A conditional fieldset must have a master field before it can be used. To correct this, please use the \"manage field ordering\" link below. <b>This fieldset will display as a normal, non-conditional fieldset until this problem is corrected.</b>"));
  122 + $this->oPage->booleanLink = true;
120 } 123 }
121 124
122 } 125 }
plugins/ktcore/document/edit.php
@@ -49,6 +49,7 @@ require_once(KT_LIB_DIR . &#39;/permissions/permissionutil.inc.php&#39;); @@ -49,6 +49,7 @@ require_once(KT_LIB_DIR . &#39;/permissions/permissionutil.inc.php&#39;);
49 require_once(KT_LIB_DIR . "/widgets/forms.inc.php"); 49 require_once(KT_LIB_DIR . "/widgets/forms.inc.php");
50 require_once(KT_LIB_DIR . "/metadata/fieldsetregistry.inc.php"); 50 require_once(KT_LIB_DIR . "/metadata/fieldsetregistry.inc.php");
51 require_once(KT_LIB_DIR . "/util/sanitize.inc"); 51 require_once(KT_LIB_DIR . "/util/sanitize.inc");
  52 +require_once(KT_LIB_DIR.'/permissions/permissiondynamiccondition.inc.php');
52 53
53 // {{{ KTDocumentEditAction 54 // {{{ KTDocumentEditAction
54 class KTDocumentEditAction extends KTDocumentAction { 55 class KTDocumentEditAction extends KTDocumentAction {
@@ -233,6 +234,16 @@ class KTDocumentEditAction extends KTDocumentAction { @@ -233,6 +234,16 @@ class KTDocumentEditAction extends KTDocumentAction {
233 $oDocumentTransaction = & new DocumentTransaction($this->oDocument, _kt('Document metadata updated'), 'ktcore.transactions.update'); 234 $oDocumentTransaction = & new DocumentTransaction($this->oDocument, _kt('Document metadata updated'), 'ktcore.transactions.update');
234 $oDocumentTransaction->create(); 235 $oDocumentTransaction->create();
235 236
  237 + // Check if there are any dynamic conditions / permissions that need to be updated on the document
  238 + // If there are dynamic conditions then update the permissions on the document
  239 + // The dynamic condition test fails unless the changes exists in the DB therefore update permissions after committing the transaction.
  240 + $iPermissionObjectId = $this->oDocument->getPermissionObjectID();
  241 + $dynamicCondition = KTPermissionDynamicCondition::getByPermissionObjectId($iPermissionObjectId);
  242 +
  243 + if(!PEAR::isError($dynamicCondition) && !empty($dynamicCondition)){
  244 + $res = KTPermissionUtil::updatePermissionLookup($this->oDocument);
  245 + }
  246 +
236 redirect(KTBrowseUtil::getUrlForDocument($this->oDocument->getId())); 247 redirect(KTBrowseUtil::getUrlForDocument($this->oDocument->getId()));
237 exit(0); 248 exit(0);
238 } 249 }
@@ -369,6 +380,16 @@ class KTDocumentEditAction extends KTDocumentAction { @@ -369,6 +380,16 @@ class KTDocumentEditAction extends KTDocumentAction {
369 $ret = $oTrigger->postValidate(); 380 $ret = $oTrigger->postValidate();
370 } 381 }
371 382
  383 + // Check if there are any dynamic conditions / permissions that need to be updated on the document
  384 + // If there are dynamic conditions then update the permissions on the document
  385 + // The dynamic condition test fails unless the changes exists in the DB therefore update permissions after committing the transaction.
  386 + $iPermissionObjectId = $this->oDocument->getPermissionObjectID();
  387 + $dynamicCondition = KTPermissionDynamicCondition::getByPermissionObjectId($iPermissionObjectId);
  388 +
  389 + if(!PEAR::isError($dynamicCondition) && !empty($dynamicCondition)){
  390 + $res = KTPermissionUtil::updatePermissionLookup($this->oDocument);
  391 + }
  392 +
372 $this->successRedirectToMain(sprintf(_kt("You have selected a new document type: %s. "), $data['type']->getName())); 393 $this->successRedirectToMain(sprintf(_kt("You have selected a new document type: %s. "), $data['type']->getName()));
373 } 394 }
374 } 395 }
templates/ktcore/metadata/admin/list.smarty
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 {foreach from=$fieldsets item=oFieldset} 25 {foreach from=$fieldsets item=oFieldset}
26 <tr> 26 <tr>
27 <td> 27 <td>
28 - { $oFieldset->getName() } 28 + { $oFieldset->getName()|truncate:40:"..." }
29 </a> 29 </a>
30 </td> 30 </td>
31 <td class="centered"> 31 <td class="centered">