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} {$aRole.name} @@ -43,5 +44,8 @@ role allocations can take very long time, depending on the number of folders bel {/if} {/foreach} +{else} +

{i18n}No roles defined in the Role Administration area.{/i18n}

+{/if} \ No newline at end of file diff --git a/templates/ktcore/metadata/conditional/editsimple.smarty b/templates/ktcore/metadata/conditional/editsimple.smarty index d4ba781..c1de580 100644 --- a/templates/ktcore/metadata/conditional/editsimple.smarty +++ b/templates/ktcore/metadata/conditional/editsimple.smarty @@ -93,7 +93,7 @@ addLoadEvent(partial(editSimpleField, {$iMasterFieldId})); - + \ No newline at end of file diff --git a/templates/ktcore/metadata/conditional/manageConditional.smarty b/templates/ktcore/metadata/conditional/manageConditional.smarty index 965af13..859822f 100644 --- a/templates/ktcore/metadata/conditional/manageConditional.smarty +++ b/templates/ktcore/metadata/conditional/manageConditional.smarty @@ -40,7 +40,7 @@ complex conditional{/i18n} {else} {i18n}Simple{/i18n}: getId()}">{i18n}Manage simple conditional{/i18n} +href="{$rootUrl}/plugins/ktcore/admin/manageConditionals.php?action=editFieldset&fieldset_id={$oFieldset->getId()}">{i18n}Manage simple conditional{/i18n}
diff --git a/templates/ktcore/principals/addgroup.smarty b/templates/ktcore/principals/addgroup.smarty index 898b512..89b4610 100644 --- a/templates/ktcore/principals/addgroup.smarty +++ b/templates/ktcore/principals/addgroup.smarty @@ -1,12 +1,12 @@ -

{i18n}Create a new Group{/i18n}

+

{i18n}Add a new group{/i18n}

-

{i18n}Create a new group.{/i18n}

+

{i18n}Add a new group{/i18n}

- {i18n}Change Group Details{/i18n} + {i18n}Specify group details{/i18n}

FIXME brief overview of group editing.

{foreach item=oWidget from=$add_fields} {$oWidget->render()} diff --git a/templates/ktcore/principals/groupadmin.smarty b/templates/ktcore/principals/groupadmin.smarty index 0b51f71..1916e8e 100644 --- a/templates/ktcore/principals/groupadmin.smarty +++ b/templates/ktcore/principals/groupadmin.smarty @@ -1,8 +1,5 @@

{i18n}Group Administration{/i18n}

-

FIXME Overview of groups.

- -

Add GroupAdd a new group.

diff --git a/templates/ktcore/principals/useradmin.smarty b/templates/ktcore/principals/useradmin.smarty index 4559860..531ad71 100644 --- a/templates/ktcore/principals/useradmin.smarty +++ b/templates/ktcore/principals/useradmin.smarty @@ -1,7 +1,5 @@

User Management

-

FIXME brief overview of user management.

-

Restrict groups that are editable based on group_id if only a unitAdmin