Ejemplo n.º 1
0
 public static function pauseBackup()
 {
     if (isset($_POST['id']) && MainWPUtility::ctype_digit($_POST['id'])) {
         $task = MainWPDB::Instance()->getBackupTaskById($_POST['id']);
         if (MainWPUtility::can_edit_backuptask($task)) {
             MainWPDB::Instance()->updateBackupTaskWithValues($task->id, array('paused' => 1));
             die(json_encode(array('result' => 'SUCCESS')));
         }
     }
     die(json_encode(array('notask' => true)));
 }