| @@ 262-265 (lines=4) @@ | ||
| 259 | $redirect_to = 'category.php'; |
|
| 260 | } |
|
| 261 | ||
| 262 | if ( !$categoryObj->store() ) { |
|
| 263 | redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
| 264 | exit; |
|
| 265 | } |
|
| 266 | // TODO : put this function in the category class |
|
| 267 | sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
| 268 | //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
| @@ 251-254 (lines=4) @@ | ||
| 248 | $faqObj->setVar('status', $status); |
|
| 249 | ||
| 250 | // Storing the FAQ |
|
| 251 | if ( !$faqObj->store() ) { |
|
| 252 | redirect_header("javascript:history.go(-1)", 3, _AM_SF_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
| 253 | exit; |
|
| 254 | } |
|
| 255 | ||
| 256 | // Send notifications |
|
| 257 | if (!empty($notifToDo)) { |
|
| @@ 130-133 (lines=4) @@ | ||
| 127 | } |
|
| 128 | ||
| 129 | // Storing the FAQ object in the database |
|
| 130 | if ( !$faqObj->store() ) { |
|
| 131 | redirect_header("javascript:history.go(-1)", 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
| 132 | exit(); |
|
| 133 | } |
|
| 134 | ||
| 135 | // Storing the answer object in the database |
|
| 136 | if ( !$newAnswerObj->store() ) { |
|
| @@ 136-139 (lines=4) @@ | ||
| 133 | } |
|
| 134 | ||
| 135 | // Storing the answer object in the database |
|
| 136 | if ( !$newAnswerObj->store() ) { |
|
| 137 | redirect_header("javascript:history.go(-1)", 3, _MD_SF_SUBMIT_ERROR . sf_formatErrors($newAnswerObj->getErrors())); |
|
| 138 | exit(); |
|
| 139 | } |
|
| 140 | ||
| 141 | $notification_handler = &xoops_gethandler('notification'); |
|
| 142 | switch ($notifCase) { |
|
| @@ 75-78 (lines=4) @@ | ||
| 72 | } |
|
| 73 | ||
| 74 | // Storing the FAQ object in the database |
|
| 75 | if ( !$newFaqObj->store() ) { |
|
| 76 | redirect_header("javascript:history.go(-1)", 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors())); |
|
| 77 | exit(); |
|
| 78 | } |
|
| 79 | ||
| 80 | // Get the cateopry object related to that FAQ |
|
| 81 | // If autoapprove_requested |
|