diff --git a/admin.php b/admin.php index 31f7fe1..73f34e7 100644 --- a/admin.php +++ b/admin.php @@ -13,7 +13,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { function AdminSplashDispatcher() { $this->aBreadcrumbs = array( - array('url' => KTUtil::getRequestScriptName($_SERVER), 'name' => 'Administration'), + array('url' => $_SERVER['PHP_SELF'], 'name' => 'Administration'), ); parent::KTAdminDispatcher(); @@ -37,7 +37,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { $aTemplateData = array( "context" => $this, "categories" => $categories, - "baseurl" => KTUtil::getRequestScriptName($_SERVER), + "baseurl" => $_SERVER['PHP_SELF'], ); return $oTemplate->render($aTemplateData); } @@ -51,7 +51,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { $aCategory = $oRegistry->getCategory($category); $aItems = $oRegistry->getItemsForCategory($category); - $this->aBreadcrumbs[] = array("name" => $aCategory["title"]); + $this->aBreadcrumbs[] = array("name" => $aCategory["title"], "url" => KTUtil::ktLink('admin.php',$category)); $this->oPage->title = _("DMS Administration") . ": " . $aCategory["title"]; @@ -61,13 +61,14 @@ class AdminSplashDispatcher extends KTAdminDispatcher { "context" => $this, "category" => $aCategory, "items" => $aItems, - "baseurl" => KTUtil::getRequestScriptName($_SERVER), + "baseurl" => $_SERVER['PHP_SELF'], ); return $oTemplate->render($aTemplateData); } } $sub_url = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); + $sub_url = trim($sub_url); $sub_url= trim($sub_url, "/"); @@ -84,8 +85,8 @@ if (empty($sub_url)) { $aCategory = $oRegistry->getCategory($aParts[0]); $oDispatcher->aBreadcrumbs = array(); - $oDispatcher->aBreadcrumbs[] = array('url' => KTUtil::getRequestScriptName($_SERVER), 'name' => 'Administration'); - $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::getRequestScriptName($_SERVER) . '/' . $aParts[0]); + $oDispatcher->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => 'Administration'); + $oDispatcher->aBreadcrumbs[] = array("name" => $aCategory['title'], "url" => KTUtil::ktLink('admin.php',$aParts[0])); } else { // FIXME (minor) redirect to no-suburl? $oDispatcher = new AdminSplashDispatcher(); diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index 8aafe6a..c2b5038 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -371,7 +371,7 @@ if (array_key_exists('HTTPS', $_SERVER)) { } $oKTConfig->setdefaultns("KnowledgeTree", "rootUrl", $KTInit->guessRootUrl()); $oKTConfig->setdefaultns("KnowledgeTree", "execSearchPath", $_SERVER['PATH']); -$oKTConfig->setdefaultns("KnowledgeTree", "pathInfoSupport", true); +$oKTConfig->setdefaultns("KnowledgeTree", "pathInfoSupport", false); $oKTConfig->setdefaultns("storage", "manager", 'KTOnDiskPathStorageManager'); $oKTConfig->setdefaultns("config", "useDatabaseConfiguration", false); $oKTConfig->setdefaultns("tweaks", "browseToRoot", false); diff --git a/docs/INSTALL.txt b/docs/INSTALL.txt index ee88c4c..9e05c9f 100644 --- a/docs/INSTALL.txt +++ b/docs/INSTALL.txt @@ -121,6 +121,11 @@ Installing this package is beyond the scope of this document - please consult the KnowledgeTree Wiki at http://support.ktdms.com/confluence/ to see how others have approached this on your platform. +NOTE: if you install the packages outside of the path normally searched +by your operating system (e.g. in c:\antiword or /usr/local/bin) you will +need to specify the _full_ path to the actual applications (e.g. +/usr/local/bin/pdftotext). + Troubleshooting --------------- diff --git a/lib/templating/smartytemplate.inc.php b/lib/templating/smartytemplate.inc.php index 5dcc08b..5b0a0b9 100644 --- a/lib/templating/smartytemplate.inc.php +++ b/lib/templating/smartytemplate.inc.php @@ -77,6 +77,7 @@ class KTSmartyTemplate extends KTTemplate { $smarty->register_function('entity_radios', array('KTSmartyTemplate', 'entity_radios')); $smarty->register_block('i18n', array('KTSmartyTemplate', 'i18n_block'), false); $smarty->register_modifier('addQueryString', array('KTSmartyTemplate', 'addQueryString')); + $smarty->register_function('ktLink', array('KTSmartyTemplate', 'ktLink')); $smarty->register_modifier('addQS', array('KTSmartyTemplate', 'addQueryString')); $smarty->register_modifier('addQueryStringSelf', array('KTSmartyTemplate', 'addQueryStringSelf')); $smarty->register_modifier('addQSSelf', array('KTSmartyTemplate', 'addQueryStringSelf')); @@ -240,9 +241,29 @@ class KTSmartyTemplate extends KTTemplate { return KTUtil::addQueryString($url, $qs); } + + /* + * ktLink generates a fully prepared link for KT. + * + * It takes into account kt_path_info requirements, + * rootUrl requirements, etc. + * + * To do this effectively, you need three things: + * + * @param base e.g. /admin.php + * @param subpath e.g. /security/permissions/ + * @param query e.g. fFolder=1&fMyVar=2 + * + */ + function ktLink($params, &$smarty) { + return KTUtil::ktLink($params['base'], $params['subpath'], $params['query']); + } + + function addQueryStringSelf($qs) { return KTUtil::addQueryStringSelf($qs); } + } ?> diff --git a/lib/util/ktutil.inc b/lib/util/ktutil.inc index b2d1db1..14bd950 100644 --- a/lib/util/ktutil.inc +++ b/lib/util/ktutil.inc @@ -450,6 +450,27 @@ class KTUtil { } // }}} + // {{{ ktLink + function ktLink($base, $subpath='', $qs='') { + $KTConfig =& KTConfig::getSingleton(); + $root = $KTConfig->get("KnowledgeTree/rootUrl"); + $url = $root . '/' . $base; + $query = ''; + + $hasPathInfo = $KTConfig->get("KnowledgeTree/pathInfoSupport"); + if ($hasPathInfo) { + $url .= $subpath; + } else { + $query = 'kt_path_info=' . $subpath; + if (!empty($qs)) { + $query .= '&'; + } + } + $query .= $qs; + return KTUtil::addQueryString($url, $query); + } + // }}} + // {{{ addQueryStringSelf function addQueryStringSelf($qs) { return KTUtil::addQueryString($_SERVER['PHP_SELF'], $qs); diff --git a/plugins/ktcore/admin/workflows.php b/plugins/ktcore/admin/workflows.php index 2b898db..82855da 100755 --- a/plugins/ktcore/admin/workflows.php +++ b/plugins/ktcore/admin/workflows.php @@ -36,7 +36,7 @@ class WorkflowNavigationPortlet extends KTPortlet { if (is_null($this->oWorkflow)) { return _('No Workflow Selected.'); } $aAdminPages = array(); - $aAdminPages[] = array('name' => _('Overview'), 'url' => $_SERVER['PHP_SELF'] . '?action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId()); + $aAdminPages[] = array('name' => _('Overview'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], '?action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId())); $aAdminPages[] = array('name' => _('States'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageStates&fWorkflowId=' . $this->oWorkflow->getId()); $aAdminPages[] = array('name' => _('Transitions'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageTransitions&fWorkflowId=' . $this->oWorkflow->getId()); $aAdminPages[] = array('name' => _('Actions'), 'url' => $_SERVER['PHP_SELF'] . '?action=manageActions&fWorkflowId=' . $this->oWorkflow->getId()); diff --git a/templates/kt3/admin_categories.smarty b/templates/kt3/admin_categories.smarty index ebbcc1c..0b42a92 100644 --- a/templates/kt3/admin_categories.smarty +++ b/templates/kt3/admin_categories.smarty @@ -1,6 +1,6 @@
{foreach item=aCategory from=$categories} -
{$aCategory.title}
+
{capture assign="cat_id"}{$aCategory.name}{/capture}{$aCategory.title}
{$aCategory.description}
{/foreach}
\ No newline at end of file diff --git a/templates/kt3/admin_items.smarty b/templates/kt3/admin_items.smarty index 4b513bb..aa0b42f 100644 --- a/templates/kt3/admin_items.smarty +++ b/templates/kt3/admin_items.smarty @@ -5,7 +5,7 @@ {else}
{foreach item=aItem from=$items} -
{$aItem.title}
+
{$aItem.title}
{$aItem.description}
{/foreach}
diff --git a/templates/ktcore/manage_permissions.smarty b/templates/ktcore/manage_permissions.smarty index abd8605..b5f596d 100644 --- a/templates/ktcore/manage_permissions.smarty +++ b/templates/ktcore/manage_permissions.smarty @@ -47,7 +47,7 @@ --> {i18n}Delete Permission{/i18n} { /if } diff --git a/templates/ktcore/metadata/conditional/manageConditional.smarty b/templates/ktcore/metadata/conditional/manageConditional.smarty index cbca8ff..5ab0b8e 100644 --- a/templates/ktcore/metadata/conditional/manageConditional.smarty +++ b/templates/ktcore/metadata/conditional/manageConditional.smarty @@ -1,4 +1,4 @@ -

{i18n}Manage conditional fieldset{/i18n}

+

{i18n}Manage conditional fieldset{/i18n}

{if $sIncomplete || !$oFieldset->getIsComplete()}
@@ -27,9 +27,9 @@ to complete{/i18n}: {$sIncomplete|escape}

{i18n}Conditional type{/i18n}

{if $oFieldset->getIsComplex()} -{i18n}Complex{/i18n}: {i18n}Complex{/i18n}: {i18n}Manage -complex conditional{/i18n} +complex conditional{/i18n}

@@ -39,8 +39,9 @@ complex conditional{/i18n} {else} -{i18n}Simple{/i18n}: {i18n}Simple{/i18n}: {i18n}Manage simple conditional{/i18n} +

diff --git a/templates/ktcore/principals/addgroup.smarty b/templates/ktcore/principals/addgroup.smarty index d728b9d..239664a 100644 --- a/templates/ktcore/principals/addgroup.smarty +++ b/templates/ktcore/principals/addgroup.smarty @@ -13,7 +13,7 @@ {/foreach}
diff --git a/templates/ktcore/principals/adduser.smarty b/templates/ktcore/principals/adduser.smarty index c7a43be..456e43f 100644 --- a/templates/ktcore/principals/adduser.smarty +++ b/templates/ktcore/principals/adduser.smarty @@ -36,7 +36,7 @@ within KnowledgeTree below.{/i18n}

{/foreach}
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
diff --git a/templates/ktcore/principals/editgroup.smarty b/templates/ktcore/principals/editgroup.smarty index bd6e7e0..e34015f 100644 --- a/templates/ktcore/principals/editgroup.smarty +++ b/templates/ktcore/principals/editgroup.smarty @@ -14,7 +14,7 @@ the system's information about group #name{/i18n}

{/foreach}
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
diff --git a/templates/ktcore/principals/edituser.smarty b/templates/ktcore/principals/edituser.smarty index 4f93868..1da9591 100644 --- a/templates/ktcore/principals/edituser.smarty +++ b/templates/ktcore/principals/edituser.smarty @@ -12,7 +12,7 @@ {/foreach}
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
diff --git a/templates/ktcore/principals/groupadmin.smarty b/templates/ktcore/principals/groupadmin.smarty index be5e9b6..08eda19 100644 --- a/templates/ktcore/principals/groupadmin.smarty +++ b/templates/ktcore/principals/groupadmin.smarty @@ -4,7 +4,7 @@ Add New Group

{i18n}Groups allow you to assign permissions and roles to a number of different users at once.{/i18n}

-

Add GroupAdd a new group.

+

Add GroupAdd a new group.

@@ -12,7 +12,7 @@ number of different users at once.{/i18n}

{i18n}Search for groups{/i18n}

{i18n}Since there may be many groups in the system, please type a few letters from the group's name to begin. -Alternatively, view all groups (note that this +Alternatively, view all groups (note that this action may take some time if you have many groups).{/i18n}

{foreach item=oWidget from=$search_fields} @@ -53,13 +53,13 @@ action may take some time if you have many groups).{/i18n}

{$context->_getUnitName($oGroup)} {/if} - {i18n}Edit{/i18n} {i18n}Manage Users{/i18n} +href="{addQS}action=manageUsers&group_id={$oGroup->getId()}{/addQS}">{i18n}Manage Users{/i18n} {i18n}Manage sub-groups{/i18n} - {i18n}Manage sub-groups{/i18n} + {i18n}Delete{/i18n} {/foreach} diff --git a/templates/ktcore/principals/groups_managesubgroups.smarty b/templates/ktcore/principals/groups_managesubgroups.smarty index acfbece..41b3bc7 100644 --- a/templates/ktcore/principals/groups_managesubgroups.smarty +++ b/templates/ktcore/principals/groups_managesubgroups.smarty @@ -63,7 +63,7 @@
diff --git a/templates/ktcore/principals/groups_manageusers.smarty b/templates/ktcore/principals/groups_manageusers.smarty index b608305..23ade67 100644 --- a/templates/ktcore/principals/groups_manageusers.smarty +++ b/templates/ktcore/principals/groups_manageusers.smarty @@ -62,7 +62,7 @@
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
diff --git a/templates/ktcore/principals/orgadmin.smarty b/templates/ktcore/principals/orgadmin.smarty index bb549f3..7baa4d5 100644 --- a/templates/ktcore/principals/orgadmin.smarty +++ b/templates/ktcore/principals/orgadmin.smarty @@ -36,7 +36,7 @@ asd {foreach item=oOrg from=$org_list} {$oOrg->getName()} - {i18n}Edit{/i18n} + {i18n}Edit{/i18n} {/foreach} diff --git a/templates/ktcore/principals/password.smarty b/templates/ktcore/principals/password.smarty index b5f5ac8..723c6a7 100644 --- a/templates/ktcore/principals/password.smarty +++ b/templates/ktcore/principals/password.smarty @@ -15,9 +15,6 @@
- -
diff --git a/templates/ktcore/principals/preferences.smarty b/templates/ktcore/principals/preferences.smarty index d8f60f1..fb29188 100644 --- a/templates/ktcore/principals/preferences.smarty +++ b/templates/ktcore/principals/preferences.smarty @@ -15,7 +15,7 @@
-

{i18n}Change your password.{/i18n}

+

{i18n}Change your password.{/i18n}

diff --git a/templates/ktcore/principals/roleadmin.smarty b/templates/ktcore/principals/roleadmin.smarty index b931e49..6706959 100644 --- a/templates/ktcore/principals/roleadmin.smarty +++ b/templates/ktcore/principals/roleadmin.smarty @@ -35,7 +35,7 @@
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
@@ -55,8 +55,8 @@ {foreach item=oRole from=$roles} {$oRole->getName()} - {i18n}Edit{/i18n} - {i18n}Delete{/i18n} + {i18n}Edit{/i18n} + {i18n}Delete{/i18n} {/foreach} {else} diff --git a/templates/ktcore/principals/unitadmin.smarty b/templates/ktcore/principals/unitadmin.smarty index 1f3704c..81d34ca 100644 --- a/templates/ktcore/principals/unitadmin.smarty +++ b/templates/ktcore/principals/unitadmin.smarty @@ -9,7 +9,7 @@ of the document management system to a particular part of your organisation. Unit administrators have additional right within that portion of the document management system, and they can also adjust the membership of groups that belong to the unit.{/i18n}

-

Add UnitAdd a new unit.

+

Add UnitAdd a new unit.

@@ -24,8 +24,8 @@ membership of groups that belong to the unit.{/i18n}

{foreach item=oUnit from=$unit_list} - - + + {/foreach} diff --git a/templates/ktcore/principals/updatepassword.smarty b/templates/ktcore/principals/updatepassword.smarty index 4627cf0..f21f54d 100644 --- a/templates/ktcore/principals/updatepassword.smarty +++ b/templates/ktcore/principals/updatepassword.smarty @@ -12,7 +12,7 @@
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
diff --git a/templates/ktcore/principals/usergroups.smarty b/templates/ktcore/principals/usergroups.smarty index b17d90a..61c07e4 100644 --- a/templates/ktcore/principals/usergroups.smarty +++ b/templates/ktcore/principals/usergroups.smarty @@ -64,7 +64,7 @@
- {i18n}Cancel{/i18n} + {i18n}Cancel{/i18n}
{$oUnit->getName()}{i18n}Edit{/i18n}{i18n}Delete{/i18n}{i18n}Edit{/i18n}{i18n}Delete{/i18n}