Commit ad3d85a4f7eb901ff0c78d6068366bc5a07da2a4
1 parent
eb4fe892
Returns Success = true, to the redirected URL,
if the Object creation was a success git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2117 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
2 deletions
presentation/lookAndFeel/knowledgeTree/create.php
| @@ -74,11 +74,15 @@ for ($i = 0; $i < count($aKeys); $i++) { | @@ -74,11 +74,15 @@ for ($i = 0; $i < count($aKeys); $i++) { | ||
| 74 | include_once("$default->fileSystemRoot/lib/$sObjectFolderName"); | 74 | include_once("$default->fileSystemRoot/lib/$sObjectFolderName"); |
| 75 | 75 | ||
| 76 | $oObject = call_user_func(strtolower($sObjectName) . "createFromArray",$aParameterValues); | 76 | $oObject = call_user_func(strtolower($sObjectName) . "createFromArray",$aParameterValues); |
| 77 | -$oObject->create(); | 77 | +if ($oObject->create()) { |
| 78 | + $bSuccess = true; | ||
| 79 | +} else { | ||
| 80 | + $bSuccess = false; | ||
| 81 | +} | ||
| 78 | 82 | ||
| 79 | //redirect the user | 83 | //redirect the user |
| 80 | if (isset($fRedirectURL)) { | 84 | if (isset($fRedirectURL)) { |
| 81 | - redirect(urldecode($fRedirectURL) . $oObject->iId); | 85 | + redirect(urldecode($fRedirectURL) . $oObject->iId . "&fSuccess=" . $bSuccess); |
| 82 | } else { | 86 | } else { |
| 83 | redirect("$default->rootUrl/control.php"); | 87 | redirect("$default->rootUrl/control.php"); |
| 84 | } | 88 | } |