Exemple #1
0
             }
         } else {
             $errors = $res;
         }
     }
     if (isset($_POST['jsaction'])) {
         switch ($_POST['jsaction']) {
             case 'draft':
                 if (($res = $evt->setStateDraft()) === true) {
                     $success[] = __('Event set to draft state', fsCalendar::$plugin_textdom);
                 } else {
                     $errors = $res;
                 }
                 break;
             case 'nosync':
                 $evt->disableSynchronization();
                 $success[] = __('Synchronization with post data has been disabled', fsCalendar::$plugin_textdom);
                 break;
         }
     }
 } else {
     if ($evt->eventid == 0 && !$copy) {
         // Calculate date and time
         $current = time();
         $day = fsCalendar::date('d', $current);
         $mon = fsCalendar::date('m', $current);
         $yea = fsCalendar::date('Y', $current);
         $std = fsCalendar::date('H', $current);
         $min = fsCalendar::date('i', $current);
         // No changes
         if ($min > 0) {