$year = isset($_REQUEST['year']) ? $_REQUEST['year'] : date('Y');
     $leaveTypeId = isset($_REQUEST['leaveTypeId']) ? $_REQUEST['leaveTypeId'] : LeaveQuota::LEAVEQUOTA_CRITERIA_ALL;
     $searchBy = isset($_REQUEST['searchBy']) ? $_REQUEST['searchBy'] : "employee";
     $sortBy = isset($_REQUEST['sortField']) ? $_REQUEST['sortField'] : null;
     $sortOrder = null;
     if ($sortBy != null) {
         $sortParam = "sortOrder" . $sortBy;
         if (isset($_REQUEST[$sortParam])) {
             $sortOrder = $_REQUEST[$sortParam];
         }
     }
     $url = '?leavecode=Leave&action=Leave_Summary&message=' . $mes . "&id={$id}&year={$year}&leaveTypeId={$leaveTypeId}&searchBy={$searchBy}";
     if ($sortBy != null && $sortOrder != null) {
         $url .= "&sortField={$sortBy}&sortOrder{$sortBy}={$sortOrder}";
     }
     $leaveController->redirect(null, array($url));
     break;
 case 'Leave_CancelLeave':
     // TODO: Check whether this is no loger used, and if so, remove this case
     $objs = $leaveExtractor->parseDeleteData($_POST);
     $mes = "Empty record";
     if (isset($objs)) {
         foreach ($objs as $obj) {
             $leaveController->setObjLeave($obj);
             $leaveController->setId($obj->getLeaveId());
             $mes = $leaveController->changeStatus();
         }
     }
     $leaveController->sendCancelledLeaveNotification($objs);
     $leaveController->redirect("");
     break;