From 4e51be46de69e35157785e3be9ecff0eb7721381 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 26 Apr 2004 11:34:03 +0000 Subject: [PATCH] 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. --- presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php b/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php index 4fc7781..16e247e 100644 --- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php +++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php @@ -58,7 +58,7 @@ if (checkSession()) { $main->setErrorMessage("You do not have permission to create new folders in this folderrootUrl/control.php?action=browse&fFolderID=$fFolderID\">graphicsUrl/widgets/cancel.gif\" border=\"0\">"); } $main->setCentralPayload($oPatternCustom); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->setHasRequiredFields(true); $main->render(); } else { @@ -82,7 +82,7 @@ if (checkSession()) { $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("There is another folder named $fFolderName in this folder already"); $main->setHasRequiredFields(true); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->render(); } else { $oParentFolder = Folder::get($fFolderID); @@ -113,7 +113,7 @@ if (checkSession()) { $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("There was an error creating the folder $fFolderName on the filesystem"); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->setHasRequiredFields(true); $main->render(); } @@ -127,7 +127,7 @@ if (checkSession()) { $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("There was an error creating the folder $fFolderName on the filesystem"); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->setHasRequiredFields(true); $main->render(); } @@ -139,7 +139,7 @@ if (checkSession()) { $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("There was an error creating the folder $fFolderName in the database"); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->render(); } } @@ -150,7 +150,7 @@ if (checkSession()) { $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("Folder not created. Folder names may not contain: '<', '>', '*', '/', '\', '|', '?' or '\"' "); $main->setHasRequiredFields(true); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->render(); } @@ -161,7 +161,7 @@ if (checkSession()) { $oPatternCustom->setHtml(renderBrowsePage($fFolderID)); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("You do not have permission to create new folders in this folder"); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->render(); } } else { @@ -170,7 +170,7 @@ if (checkSession()) { $oPatternCustom->setHtml(renderBrowseAddPage($fFolderID)); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("You did not specify a document type. If there are no system document types, please contact a System Administrator."); - $main->setFormAction("addFolderBL.php?fFolderID=$fFolderID"); + $main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID"); $main->render(); } } -- libgit2 0.21.4