@@ 174-183 (lines=10) @@ | ||
171 | // TODO... |
|
172 | break; |
|
173 | ||
174 | case 5: |
|
175 | // New answer submitted for a published Q&A, need approbation |
|
176 | // Send notifications |
|
177 | if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) { |
|
178 | require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
179 | $notificationHandler->subscribe('faq', $newAnswerObj->answerid(), 'answer_approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
180 | } |
|
181 | ||
182 | $faqObj->sendNotifications([_SF_NOT_NEW_ANSWER_PROPOSED]); |
|
183 | break; |
|
184 | } |
|
185 | ||
186 | //redirect_header("javascript:history.go(-1)", 3, $redirect_msg); |
|
@@ 150-158 (lines=9) @@ | ||
147 | $faqObj->sendNotifications([_SF_NOT_FAQ_PUBLISHED]); |
|
148 | break; |
|
149 | ||
150 | case 2: |
|
151 | // Answer for an open question submitted, auto-approved; became Q&A, need approbation |
|
152 | if (isset($_POST['notifypub']) && 1 == $_POST['notifypub']) { |
|
153 | require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
154 | $notificationHandler->subscribe('faq', $faqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
155 | } |
|
156 | // Send notifications |
|
157 | $faqObj->sendNotifications([_SF_NOT_FAQ_SUBMITTED]); |
|
158 | break; |
|
159 | ||
160 | case 3: |
|
161 | // Answer submitted, needs approbation |