diff --git a/lib/session/control.inc b/lib/session/control.inc
index 134cdf3..4a0b4db 100644
--- a/lib/session/control.inc
+++ b/lib/session/control.inc
@@ -139,7 +139,7 @@ function checkSessionAndRedirect($bRedirect, $bDownload = false) {
} else {
$url = generateControllerUrl("login");
}
- $redirect = urlencode($_SERVER["PHP_SELF"] . "?" . $_SERVER["QUERY_STRING"]);
+ $redirect = urlencode(KTUtil::addQueryStringSelf($_SERVER["QUERY_STRING"]));
if ((strlen($redirect) > 1)) {
$default->log->debug("checkSession:: redirect url=$redirect");
// this session verification failure represents either the first visit to
diff --git a/lib/templating/kt3template.inc.php b/lib/templating/kt3template.inc.php
index 36bfd0b..3ce507e 100644
--- a/lib/templating/kt3template.inc.php
+++ b/lib/templating/kt3template.inc.php
@@ -282,6 +282,8 @@ class KTPage {
$sUrl = KTUtil::addQueryString($sUrl, $sQuery);
}
$aTuple["url"] = $sUrl;
+ } else if ($aActionTuple["query"]) {
+ $aTuple['url'] = KTUtil::addQueryStringSelf($aActionTuple["query"]);
} else {
$aTuple["url"] = false;
}
diff --git a/plugins/ktcore/admin/documentFields.php b/plugins/ktcore/admin/documentFields.php
index 0a5f9c9..482350f 100755
--- a/plugins/ktcore/admin/documentFields.php
+++ b/plugins/ktcore/admin/documentFields.php
@@ -721,7 +721,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
// since the root is virtual, we need to fake it here.
// the inner section is generised.
$treeStr .= '
- Root';
- $treeStr .= ' (edit)';
+ $treeStr .= ' (edit)';
$treeStr .= '
';
//$default->log->debug("EVILRENDER: " . print_r($treeToRender, true));
foreach ($treeToRender->getRoot() as $node_id => $subtree_nodes)
@@ -755,12 +755,12 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher {
function _evilActionHelper($iFieldId, $bIsKeyword, $current_node) {
$actionStr = " (";
if ($bIsKeyword === true) {
- $actionStr .= 'unlink';
+ $actionStr .= 'unlink';
}
else
{
- $actionStr .= 'attach keywords ';
- $actionStr .= '| delete';
+ $actionStr .= 'attach keywords ';
+ $actionStr .= '| delete';
}
$actionStr .= ")";
return $actionStr;
diff --git a/plugins/ktcore/admin/userManagement.php b/plugins/ktcore/admin/userManagement.php
index 4e9cccf..1997ba0 100755
--- a/plugins/ktcore/admin/userManagement.php
+++ b/plugins/ktcore/admin/userManagement.php
@@ -101,7 +101,7 @@ class KTUserAdminDispatcher extends KTAdminDispatcher {
$oProvider =& $oRegistry->getAuthenticationProvider($sProvider);
$this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _('User Management'));
- $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'] . '?action=addUser', 'name' => _('add a new user'));
+ $this->aBreadcrumbs[] = array('url' => KTUtil::addQueryStringSelf('action=addUser'), 'name' => _('add a new user'));
$oProvider->aBreadcrumbs = $this->aBreadcrumbs;
$oProvider->oPage->setBreadcrumbDetails($oSource->getName());
$oProvider->oPage->setTitle(_("Modify User Details"));
diff --git a/plugins/ktcore/admin/workflows.php b/plugins/ktcore/admin/workflows.php
index ad06ce6..f0db9c9 100755
--- a/plugins/ktcore/admin/workflows.php
+++ b/plugins/ktcore/admin/workflows.php
@@ -36,11 +36,10 @@ class WorkflowNavigationPortlet extends KTPortlet {
if (is_null($this->oWorkflow)) { return _('No Workflow Selected.'); }
$aAdminPages = array();
- $aAdminPages[] = array('name' => _('Overview'), 'url' => KTUtil::addQueryStringSelf('action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId()));
- $aAdminPages[] = array('name' => _('States'), 'url' => KTUtil::addQueryStringSelf('action=manageStates&fWorkflowId=' . $this->oWorkflow->getId()));
- $aAdminPages[] = array('name' => _('Transitions'), 'url' => KTUtil::addQueryStringSelf('action=manageTransitions&fWorkflowId=' . $this->oWorkflow->getId()));
- $aAdminPages[] = array('name' => _('Actions'), 'url' => KTUtil::addQueryStringSelf('action=manageActions&fWorkflowId=' . $this->oWorkflow->getId()));
-
+ $aAdminPages[] = array('name' => _('Overview'), 'query' => 'action=editWorkflow&fWorkflowId=' . $this->oWorkflow->getId());
+ $aAdminPages[] = array('name' => _('States'), 'query' => 'action=manageStates&fWorkflowId=' . $this->oWorkflow->getId());
+ $aAdminPages[] = array('name' => _('Transitions'), 'query' => 'action=manageTransitions&fWorkflowId=' . $this->oWorkflow->getId());
+ $aAdminPages[] = array('name' => _('Actions'), 'query' => 'action=manageActions&fWorkflowId=' . $this->oWorkflow->getId());
$oTemplating = new KTTemplating;
$oTemplate = $oTemplating->loadTemplate("ktcore/workflow/admin_portlet");
@@ -208,7 +207,8 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
}
foreach ($aInfo['transitions_to_state'][$oState->getId()] as $aTransition) {
- $aT[] = sprintf('%s', $_SERVER['PHP_SELF'], $aInfo['workflow']->getId(), $aTransition->getId() ,$aTransition->getName());
+ $sUrl = KTUtil::addQueryStringSelf(sprintf('action=editTransition&fWorkflowId=%d&fTransitionId=%d', $aInfo['workflow']->getId(), $aTransition->getId()));
+ $aT[] = sprintf('%s', $sUrl, $aTransition->getName());
}
return implode(', ',$aT);
@@ -302,7 +302,8 @@ class KTWorkflowDispatcher extends KTAdminDispatcher {
$aT = array();
foreach ($aInfo['transitions_from_state'][$oState->getId()] as $aTransition) {
- $aT[] = sprintf('%s', $_SERVER['PHP_SELF'], $aInfo['workflow']->getId(), $aTransition->getId() ,$aTransition->getName());
+ $sUrl = KTUtil::addQueryStringSelf(sprintf('action=editTransition&fWorkflowId=%d&fTransitionId=%d', $aInfo['workflow']->getId(), $aTransition->getId()));
+ $aT[] = sprintf('%s', $sUrl, $aTransition->getName());
}
return implode(', ', $aT);
}
diff --git a/plugins/ktcore/authentication/authenticationadminpage.inc.php b/plugins/ktcore/authentication/authenticationadminpage.inc.php
index e25e32a..92424b8 100644
--- a/plugins/ktcore/authentication/authenticationadminpage.inc.php
+++ b/plugins/ktcore/authentication/authenticationadminpage.inc.php
@@ -109,7 +109,7 @@ class KTAuthenticationAdminPage extends KTAdminDispatcher {
$oProvider =& $oRegistry->getAuthenticationProvider($sProvider);
$this->aBreadcrumbs[] = array('name' => _('Authentication'), 'url' => $_SERVER['PHP_SELF']);
- $this->aBreadcrumbs[] = array('name' => $oSource->getName(), 'url' => $_SERVER['PHP_SELF'] . "?source_id=" . $oSource->getId());
+ $this->aBreadcrumbs[] = array('name' => $oSource->getName(), 'url' => KTUtil::addQueryStringSelf("source_id=" . $oSource->getId()));
$oProvider->aBreadcrumbs = $this->aBreadcrumbs;
$oProvider->dispatch();
@@ -123,7 +123,7 @@ class KTAuthenticationAdminPage extends KTAdminDispatcher {
$oProvider =& $oRegistry->getAuthenticationProvider($sProvider);
$this->aBreadcrumbs[] = array('name' => _('Authentication'), 'url' => $_SERVER['PHP_SELF']);
- $this->aBreadcrumbs[] = array('name' => $oSource->getName(), 'url' => $_SERVER['PHP_SELF'] . "?source_id=" . $oSource->getId());
+ $this->aBreadcrumbs[] = array('name' => $oSource->getName(), 'url' => KTUtil::addQueryStringSelf("source_id=" . $oSource->getId()));
$oProvider->aBreadcrumbs = $this->aBreadcrumbs;
$oProvider->dispatch();
diff --git a/plugins/ktstandard/KTDiscussion.php b/plugins/ktstandard/KTDiscussion.php
index 7cc8b06..db41b25 100644
--- a/plugins/ktstandard/KTDiscussion.php
+++ b/plugins/ktstandard/KTDiscussion.php
@@ -133,7 +133,7 @@ class KTDocumentDiscussionAction extends KTDocumentAction {
// breadcrumbs...
$this->aBreadcrumbs[] = array(
'name' => _('discussion'),
- 'url' => $_SERVER['PHP_SELF'] . sprintf('?fDocumentId=%d', $this->oDocument->getId()),
+ 'query' => sprintf('fDocumentId=%d', $this->oDocument->getId()),
);
$this->aBreadcrumbs[] = array(
'name' => $oComment->getSubject(),
diff --git a/plugins/ktstandard/ldap/ldapauthenticationprovider.inc.php b/plugins/ktstandard/ldap/ldapauthenticationprovider.inc.php
index 3a29900..0af8e34 100644
--- a/plugins/ktstandard/ldap/ldapauthenticationprovider.inc.php
+++ b/plugins/ktstandard/ldap/ldapauthenticationprovider.inc.php
@@ -36,7 +36,9 @@ class KTLDAPAuthenticationProvider extends KTAuthenticationProvider {
}
function showUserSource($oUser, $oSource) {
- return '' . _('Edit LDAP info') . '';
+ $sQuery = sprintf("action=editUserSource&user_id=%d", $oUser->getId());
+ $sUrl = KTUtil::addQueryStringSelf($sQuery);
+ return '' . _('Edit LDAP info') . '';
}
function do_editUserSource() {
diff --git a/templates/ktcore/authentication/manage.smarty b/templates/ktcore/authentication/manage.smarty
index 2de06d2..bb0498d 100644
--- a/templates/ktcore/authentication/manage.smarty
+++ b/templates/ktcore/authentication/manage.smarty
@@ -32,7 +32,7 @@ ensure that the Plugin is enabled.{/i18n}
{else}
diff --git a/templates/ktcore/workflow/admin_portlet.smarty b/templates/ktcore/workflow/admin_portlet.smarty
index 341b48f..30a3638 100644
--- a/templates/ktcore/workflow/admin_portlet.smarty
+++ b/templates/ktcore/workflow/admin_portlet.smarty
@@ -1,5 +1,5 @@
\ No newline at end of file
+