Commit 4ff42382b8b4a129594d17021fa2ba434bd2c216
1 parent
c8b242bb
Make URL generation understand kt_no_extensions
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4523 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
2 deletions
lib/actions/documentaction.inc.php
| @@ -71,10 +71,14 @@ class KTDocumentAction extends KTStandardDispatcher { | @@ -71,10 +71,14 @@ class KTDocumentAction extends KTStandardDispatcher { | ||
| 71 | 71 | ||
| 72 | function getURL() { | 72 | function getURL() { |
| 73 | $oKTConfig =& KTConfig::getSingleton(); | 73 | $oKTConfig =& KTConfig::getSingleton(); |
| 74 | + $sExt = ".php"; | ||
| 75 | + if (KTUtil::arrayGet($_SERVER, 'kt_no_extensions')) { | ||
| 76 | + $sExt = ""; | ||
| 77 | + } | ||
| 74 | if ($oKTConfig->get("KnowledgeTree/pathInfoSupport")) { | 78 | if ($oKTConfig->get("KnowledgeTree/pathInfoSupport")) { |
| 75 | - return sprintf("%s/action.php/%s?fDocumentId=%d", $GLOBALS['KTRootUrl'], $this->sName, $this->oDocument->getID()); | 79 | + return sprintf("%s/action%s/%s?fDocumentId=%d", $GLOBALS['KTRootUrl'], $sExt, $this->sName, $this->oDocument->getID()); |
| 76 | } else { | 80 | } else { |
| 77 | - return sprintf("%s/action.php/?kt_path_info=%s&fDocumentId=%d", $GLOBALS['KTRootUrl'], $this->sName, $this->oDocument->getID()); | 81 | + return sprintf("%s/action%s/?kt_path_info=%s&fDocumentId=%d", $GLOBALS['KTRootUrl'], $sExt, $this->sName, $this->oDocument->getID()); |
| 78 | } | 82 | } |
| 79 | } | 83 | } |
| 80 | 84 |