diff --git a/lib/workflow/workflowutil.inc.php b/lib/workflow/workflowutil.inc.php index 74bcf7a..857fa1e 100644 --- a/lib/workflow/workflowutil.inc.php +++ b/lib/workflow/workflowutil.inc.php @@ -147,13 +147,15 @@ class KTWorkflowUtil { return $res; } $aOptions = array('noid' => true); - foreach ($aActions as $sAction) { - $res = DBUtil::autoInsert($sTable, array( - 'workflow_id' => $iWorkflowId, - 'action_name' => $sAction, - ), $aOptions); - if (PEAR::isError($res)) { - return $res; + if (!empty($aActions)) { + foreach ($aActions as $sAction) { + $res = DBUtil::autoInsert($sTable, array( + 'workflow_id' => $iWorkflowId, + 'action_name' => $sAction, + ), $aOptions); + if (PEAR::isError($res)) { + return $res; + } } } return; diff --git a/plugins/ktcore/KTCorePlugin.php b/plugins/ktcore/KTCorePlugin.php index 4a67f98..3dc59cd 100644 --- a/plugins/ktcore/KTCorePlugin.php +++ b/plugins/ktcore/KTCorePlugin.php @@ -110,7 +110,7 @@ class KTCorePlugin extends KTPlugin { _('Archived Document Restoration'), _("Restore old (archived) documents, usually at a user's request."), 'admin/archivedDocuments.php', null); $this->registerAdminPage("expunge", 'DeletedDocumentsDispatcher', 'storage', - _('Expunge Deleted Documents'), _('Permanently expunge deleted documents.'), + _('Restore or Expunge Deleted Documents'), _('Restore previously deleted documents, or permanently expunge them.'), 'admin/deletedDocuments.php', null); // misc diff --git a/plugins/ktcore/KTDocumentActions.php b/plugins/ktcore/KTDocumentActions.php index 05b5961..00d7da1 100644 --- a/plugins/ktcore/KTDocumentActions.php +++ b/plugins/ktcore/KTDocumentActions.php @@ -626,6 +626,9 @@ class KTDocumentWorkflowAction extends KTDocumentAction { $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']); $oWorkflow =& $this->oValidator->validateWorkflow($_REQUEST['fWorkflowId']); $res = KTWorkflowUtil::startWorkflowOnDocument($oWorkflow, $oDocument); + if (PEAR::isError($res)) { + $this->errorRedirectToMain($res->message, sprintf('fDocumentId=%s',$oDocument->getId())); + } $this->successRedirectToMain(_('Workflow started'), array('fDocumentId' => $oDocument->getId())); exit(0); diff --git a/plugins/ktcore/admin/ajaxSimpleConditionals.php b/plugins/ktcore/admin/ajaxSimpleConditionals.php index a6db195..bbf95af 100755 --- a/plugins/ktcore/admin/ajaxSimpleConditionals.php +++ b/plugins/ktcore/admin/ajaxSimpleConditionals.php @@ -1,12 +1,12 @@ aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _('Group Management')); - $this->oPage->setBreadcrumbDetails(_('create new group')); + $this->oPage->setBreadcrumbDetails(_('Add a new group')); - $this->oPage->setTitle(_("Create New Group")); + $this->oPage->setTitle(_("Add a new group")); $edit_fields = array(); $add_fields[] = new KTStringWidget(_('Group Name'),_('A short name for the group. e.g. administrators.'), 'group_name', null, $this->oPage, true); diff --git a/plugins/ktcore/admin/manageConditionals.php b/plugins/ktcore/admin/manageConditionals.php index 6efcfa4..e8e853e 100755 --- a/plugins/ktcore/admin/manageConditionals.php +++ b/plugins/ktcore/admin/manageConditionals.php @@ -1,5 +1,5 @@ oValidator->validateTemplate('ktcore/document/add'); $add_fields = array(); $add_fields[] = new KTFileUploadWidget(_('File'), _('The contents of the document to be added to the document management system.'), 'file', "", $this->oPage, true); - $add_fields[] = new KTStringWidget(_('Title'), _('Describe the changes made to the document.'), 'title', "", $this->oPage, true); + $add_fields[] = new KTStringWidget(_('Title'), _('The document title is used as the main name of a document through the KnowledgeTree.'), 'title', "", $this->oPage, true); $aVocab = array(); foreach (DocumentType::getList() as $oDocumentType) { diff --git a/templates/ktcore/folder/roles.smarty b/templates/ktcore/folder/roles.smarty index ee06e92..b392f2a 100644 --- a/templates/ktcore/folder/roles.smarty +++ b/templates/ktcore/folder/roles.smarty @@ -20,6 +20,7 @@ role allocations can take very long time, depending on the number of folders bel
+{if (count($roles) > 0)} {foreach item=aRole key=role_id from=$roles}{i18n}No roles defined in the Role Administration area.{/i18n}