From 4ff42382b8b4a129594d17021fa2ba434bd2c216 Mon Sep 17 00:00:00 2001 From: nbm Date: Thu, 22 Dec 2005 09:07:05 +0000 Subject: [PATCH] Make URL generation understand kt_no_extensions --- lib/actions/documentaction.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/actions/documentaction.inc.php b/lib/actions/documentaction.inc.php index 860d1ec..6524d8f 100644 --- a/lib/actions/documentaction.inc.php +++ b/lib/actions/documentaction.inc.php @@ -71,10 +71,14 @@ class KTDocumentAction extends KTStandardDispatcher { function getURL() { $oKTConfig =& KTConfig::getSingleton(); + $sExt = ".php"; + if (KTUtil::arrayGet($_SERVER, 'kt_no_extensions')) { + $sExt = ""; + } if ($oKTConfig->get("KnowledgeTree/pathInfoSupport")) { - return sprintf("%s/action.php/%s?fDocumentId=%d", $GLOBALS['KTRootUrl'], $this->sName, $this->oDocument->getID()); + return sprintf("%s/action%s/%s?fDocumentId=%d", $GLOBALS['KTRootUrl'], $sExt, $this->sName, $this->oDocument->getID()); } else { - return sprintf("%s/action.php/?kt_path_info=%s&fDocumentId=%d", $GLOBALS['KTRootUrl'], $this->sName, $this->oDocument->getID()); + return sprintf("%s/action%s/?kt_path_info=%s&fDocumentId=%d", $GLOBALS['KTRootUrl'], $sExt, $this->sName, $this->oDocument->getID()); } } -- libgit2 0.21.4