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()); } }