Exemple #1
0
         $ach->displayCreateForm();
     }
     $ath->footer(array());
     break;
 case 'notification':
     if (!user_isloggedin()) {
         exit_not_logged_in();
         return;
     }
     switch ($request->getValidated('action')) {
         case 'remove_global':
             $ok = false;
             $global_notification_id = $request->getValidated('global_notification_id', 'uint');
             if ($global_notification_id) {
                 $agnf = new ArtifactGlobalNotificationFactory();
                 if ($agnf->removeGlobalNotificationForTracker($global_notification_id, $atid)) {
                     $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('tracker_include_type', 'info_gn_deleted'));
                     $ok = true;
                     //Add a default if needed
                     if (!count($agnf->getGlobalNotificationsForTracker($atid))) {
                         if ($agnf->addGlobalNotificationForTracker($atid)) {
                             $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('tracker_include_type', 'info_gn_default_added'));
                         } else {
                             $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('tracker_include_type', 'info_gn_default_not_added'));
                         }
                     }
                 } else {
                     $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('tracker_include_type', 'error_gn_not_deleted'));
                 }
             } else {
                 $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('tracker_include_type', 'error_missing_param'));