Commit 4e51be46de69e35157785e3be9ecff0eb7721381
1 parent
104046b4
Type: Bugfix
Description: Corrected form action relative paths. Behaviour before fix: Add folder broken for sites with the dms not at site root. Behaviour after fix: Expected functionality for all installations. Credit: Thanks for Roman Pavlov for this bug report and patch. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2828 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
8 additions
and
8 deletions
presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php
| ... | ... | @@ -58,7 +58,7 @@ if (checkSession()) { |
| 58 | 58 | $main->setErrorMessage("You do not have permission to create new folders in this folder</td><td><a href=\"$default->rootUrl/control.php?action=browse&fFolderID=$fFolderID\"><img src=\"$default->graphicsUrl/widgets/cancel.gif\" border=\"0\"></a>"); |
| 59 | 59 | } |
| 60 | 60 | $main->setCentralPayload($oPatternCustom); |
| 61 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 61 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 62 | 62 | $main->setHasRequiredFields(true); |
| 63 | 63 | $main->render(); |
| 64 | 64 | } else { |
| ... | ... | @@ -82,7 +82,7 @@ if (checkSession()) { |
| 82 | 82 | $main->setCentralPayload($oPatternCustom); |
| 83 | 83 | $main->setErrorMessage("There is another folder named $fFolderName in this folder already"); |
| 84 | 84 | $main->setHasRequiredFields(true); |
| 85 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 85 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 86 | 86 | $main->render(); |
| 87 | 87 | } else { |
| 88 | 88 | $oParentFolder = Folder::get($fFolderID); |
| ... | ... | @@ -113,7 +113,7 @@ if (checkSession()) { |
| 113 | 113 | $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); |
| 114 | 114 | $main->setCentralPayload($oPatternCustom); |
| 115 | 115 | $main->setErrorMessage("There was an error creating the folder $fFolderName on the filesystem"); |
| 116 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 116 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 117 | 117 | $main->setHasRequiredFields(true); |
| 118 | 118 | $main->render(); |
| 119 | 119 | } |
| ... | ... | @@ -127,7 +127,7 @@ if (checkSession()) { |
| 127 | 127 | $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); |
| 128 | 128 | $main->setCentralPayload($oPatternCustom); |
| 129 | 129 | $main->setErrorMessage("There was an error creating the folder $fFolderName on the filesystem"); |
| 130 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 130 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 131 | 131 | $main->setHasRequiredFields(true); |
| 132 | 132 | $main->render(); |
| 133 | 133 | } |
| ... | ... | @@ -139,7 +139,7 @@ if (checkSession()) { |
| 139 | 139 | $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); |
| 140 | 140 | $main->setCentralPayload($oPatternCustom); |
| 141 | 141 | $main->setErrorMessage("There was an error creating the folder $fFolderName in the database"); |
| 142 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 142 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 143 | 143 | $main->render(); |
| 144 | 144 | } |
| 145 | 145 | } |
| ... | ... | @@ -150,7 +150,7 @@ if (checkSession()) { |
| 150 | 150 | $main->setCentralPayload($oPatternCustom); |
| 151 | 151 | $main->setErrorMessage("Folder not created. Folder names may not contain: '<', '>', '*', '/', '\', '|', '?' or '\"' "); |
| 152 | 152 | $main->setHasRequiredFields(true); |
| 153 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 153 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 154 | 154 | $main->render(); |
| 155 | 155 | } |
| 156 | 156 | |
| ... | ... | @@ -161,7 +161,7 @@ if (checkSession()) { |
| 161 | 161 | $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); |
| 162 | 162 | $main->setCentralPayload($oPatternCustom); |
| 163 | 163 | $main->setErrorMessage("You do not have permission to create new folders in this folder"); |
| 164 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 164 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 165 | 165 | $main->render(); |
| 166 | 166 | } |
| 167 | 167 | } else { |
| ... | ... | @@ -170,7 +170,7 @@ if (checkSession()) { |
| 170 | 170 | $oPatternCustom->setHtml(renderBrowseAddPage($fFolderID)); |
| 171 | 171 | $main->setCentralPayload($oPatternCustom); |
| 172 | 172 | $main->setErrorMessage("You did not specify a document type. If there are no system document types, please contact a System Administrator."); |
| 173 | - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); | |
| 173 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); | |
| 174 | 174 | $main->render(); |
| 175 | 175 | } |
| 176 | 176 | } | ... | ... |