@@ -521,56 +521,56 @@ |
||
| 521 | 521 | |
| 522 | 522 | switch ($type) { |
| 523 | 523 | // Daily |
| 524 | - case 0x0A: |
|
| 525 | - if ($everyn == 1) { |
|
| 526 | - $type = dgettext("kopano", "workday"); |
|
| 527 | - $occSingleDayRank = true; |
|
| 528 | - } |
|
| 529 | - elseif ($everyn == (24 * 60)) { |
|
| 530 | - $type = dgettext("kopano", "day"); |
|
| 531 | - $occSingleDayRank = true; |
|
| 532 | - } |
|
| 533 | - else { |
|
| 534 | - $everyn /= (24 * 60); |
|
| 535 | - $type = dgettext("kopano", "days"); |
|
| 536 | - $occSingleDayRank = false; |
|
| 537 | - } |
|
| 538 | - break; |
|
| 539 | - // Weekly |
|
| 540 | - case 0x0B: |
|
| 541 | - if ($everyn == 1) { |
|
| 542 | - $type = dgettext("kopano", "week"); |
|
| 543 | - $occSingleDayRank = true; |
|
| 544 | - } |
|
| 545 | - else { |
|
| 546 | - $type = dgettext("kopano", "weeks"); |
|
| 547 | - $occSingleDayRank = false; |
|
| 548 | - } |
|
| 549 | - break; |
|
| 550 | - // Monthly |
|
| 551 | - case 0x0C: |
|
| 552 | - if ($everyn == 1) { |
|
| 553 | - $type = dgettext("kopano", "month"); |
|
| 554 | - $occSingleDayRank = true; |
|
| 555 | - } |
|
| 556 | - else { |
|
| 557 | - $type = dgettext("kopano", "months"); |
|
| 558 | - $occSingleDayRank = false; |
|
| 559 | - } |
|
| 560 | - break; |
|
| 561 | - // Yearly |
|
| 562 | - case 0x0D: |
|
| 563 | - if ($everyn <= 12) { |
|
| 564 | - $everyn = 1; |
|
| 565 | - $type = dgettext("kopano", "year"); |
|
| 566 | - $occSingleDayRank = true; |
|
| 567 | - } |
|
| 568 | - else { |
|
| 569 | - $everyn = $everyn / 12; |
|
| 570 | - $type = dgettext("kopano", "years"); |
|
| 571 | - $occSingleDayRank = false; |
|
| 572 | - } |
|
| 573 | - break; |
|
| 524 | + case 0x0A: |
|
| 525 | + if ($everyn == 1) { |
|
| 526 | + $type = dgettext("kopano", "workday"); |
|
| 527 | + $occSingleDayRank = true; |
|
| 528 | + } |
|
| 529 | + elseif ($everyn == (24 * 60)) { |
|
| 530 | + $type = dgettext("kopano", "day"); |
|
| 531 | + $occSingleDayRank = true; |
|
| 532 | + } |
|
| 533 | + else { |
|
| 534 | + $everyn /= (24 * 60); |
|
| 535 | + $type = dgettext("kopano", "days"); |
|
| 536 | + $occSingleDayRank = false; |
|
| 537 | + } |
|
| 538 | + break; |
|
| 539 | + // Weekly |
|
| 540 | + case 0x0B: |
|
| 541 | + if ($everyn == 1) { |
|
| 542 | + $type = dgettext("kopano", "week"); |
|
| 543 | + $occSingleDayRank = true; |
|
| 544 | + } |
|
| 545 | + else { |
|
| 546 | + $type = dgettext("kopano", "weeks"); |
|
| 547 | + $occSingleDayRank = false; |
|
| 548 | + } |
|
| 549 | + break; |
|
| 550 | + // Monthly |
|
| 551 | + case 0x0C: |
|
| 552 | + if ($everyn == 1) { |
|
| 553 | + $type = dgettext("kopano", "month"); |
|
| 554 | + $occSingleDayRank = true; |
|
| 555 | + } |
|
| 556 | + else { |
|
| 557 | + $type = dgettext("kopano", "months"); |
|
| 558 | + $occSingleDayRank = false; |
|
| 559 | + } |
|
| 560 | + break; |
|
| 561 | + // Yearly |
|
| 562 | + case 0x0D: |
|
| 563 | + if ($everyn <= 12) { |
|
| 564 | + $everyn = 1; |
|
| 565 | + $type = dgettext("kopano", "year"); |
|
| 566 | + $occSingleDayRank = true; |
|
| 567 | + } |
|
| 568 | + else { |
|
| 569 | + $everyn = $everyn / 12; |
|
| 570 | + $type = dgettext("kopano", "years"); |
|
| 571 | + $occSingleDayRank = false; |
|
| 572 | + } |
|
| 573 | + break; |
|
| 574 | 574 | } |
| 575 | 575 | |
| 576 | 576 | // get timings of the first occurrence |
@@ -1569,17 +1569,17 @@ discard block |
||
| 1569 | 1569 | $status = olRecipientTrackStatusNone; |
| 1570 | 1570 | |
| 1571 | 1571 | switch ($class) { |
| 1572 | - case "IPM.Schedule.Meeting.Resp.Pos": |
|
| 1573 | - $status = olRecipientTrackStatusAccepted; |
|
| 1574 | - break; |
|
| 1572 | + case "IPM.Schedule.Meeting.Resp.Pos": |
|
| 1573 | + $status = olRecipientTrackStatusAccepted; |
|
| 1574 | + break; |
|
| 1575 | 1575 | |
| 1576 | - case "IPM.Schedule.Meeting.Resp.Tent": |
|
| 1577 | - $status = olRecipientTrackStatusTentative; |
|
| 1578 | - break; |
|
| 1576 | + case "IPM.Schedule.Meeting.Resp.Tent": |
|
| 1577 | + $status = olRecipientTrackStatusTentative; |
|
| 1578 | + break; |
|
| 1579 | 1579 | |
| 1580 | - case "IPM.Schedule.Meeting.Resp.Neg": |
|
| 1581 | - $status = olRecipientTrackStatusDeclined; |
|
| 1582 | - break; |
|
| 1580 | + case "IPM.Schedule.Meeting.Resp.Neg": |
|
| 1581 | + $status = olRecipientTrackStatusDeclined; |
|
| 1582 | + break; |
|
| 1583 | 1583 | } |
| 1584 | 1584 | |
| 1585 | 1585 | return $status; |
@@ -1770,20 +1770,20 @@ discard block |
||
| 1770 | 1770 | $recip[PR_SEARCH_KEY] = $messageprops[PR_SENT_REPRESENTING_SEARCH_KEY]; |
| 1771 | 1771 | |
| 1772 | 1772 | switch ($status) { |
| 1773 | - case olResponseAccepted: |
|
| 1774 | - $classpostfix = "Pos"; |
|
| 1775 | - $subjectprefix = dgettext("kopano", "Accepted"); |
|
| 1776 | - break; |
|
| 1777 | - |
|
| 1778 | - case olResponseDeclined: |
|
| 1779 | - $classpostfix = "Neg"; |
|
| 1780 | - $subjectprefix = dgettext("kopano", "Declined"); |
|
| 1781 | - break; |
|
| 1782 | - |
|
| 1783 | - case olResponseTentative: |
|
| 1784 | - $classpostfix = "Tent"; |
|
| 1785 | - $subjectprefix = dgettext("kopano", "Tentatively accepted"); |
|
| 1786 | - break; |
|
| 1773 | + case olResponseAccepted: |
|
| 1774 | + $classpostfix = "Pos"; |
|
| 1775 | + $subjectprefix = dgettext("kopano", "Accepted"); |
|
| 1776 | + break; |
|
| 1777 | + |
|
| 1778 | + case olResponseDeclined: |
|
| 1779 | + $classpostfix = "Neg"; |
|
| 1780 | + $subjectprefix = dgettext("kopano", "Declined"); |
|
| 1781 | + break; |
|
| 1782 | + |
|
| 1783 | + case olResponseTentative: |
|
| 1784 | + $classpostfix = "Tent"; |
|
| 1785 | + $subjectprefix = dgettext("kopano", "Tentatively accepted"); |
|
| 1786 | + break; |
|
| 1787 | 1787 | } |
| 1788 | 1788 | |
| 1789 | 1789 | if ($proposalStartTime && $proposalEndTime) { |
@@ -224,23 +224,23 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | // Set correct taskmode and taskhistory depending on response type |
| 226 | 226 | switch ($props[PR_MESSAGE_CLASS]) { |
| 227 | - case 'IPM.TaskRequest.Accept': |
|
| 228 | - $taskhistory = thAccepted; |
|
| 229 | - $taskstate = tdsACC; |
|
| 230 | - $delegationstate = olTaskDelegationAccepted; |
|
| 231 | - break; |
|
| 227 | + case 'IPM.TaskRequest.Accept': |
|
| 228 | + $taskhistory = thAccepted; |
|
| 229 | + $taskstate = tdsACC; |
|
| 230 | + $delegationstate = olTaskDelegationAccepted; |
|
| 231 | + break; |
|
| 232 | 232 | |
| 233 | - case 'IPM.TaskRequest.Decline': |
|
| 234 | - $taskhistory = thDeclined; |
|
| 235 | - $taskstate = tdsDEC; |
|
| 236 | - $delegationstate = olTaskDelegationDeclined; |
|
| 237 | - break; |
|
| 233 | + case 'IPM.TaskRequest.Decline': |
|
| 234 | + $taskhistory = thDeclined; |
|
| 235 | + $taskstate = tdsDEC; |
|
| 236 | + $delegationstate = olTaskDelegationDeclined; |
|
| 237 | + break; |
|
| 238 | 238 | |
| 239 | - case 'IPM.TaskRequest.Update': |
|
| 240 | - $taskhistory = thUpdated; |
|
| 241 | - $taskstate = tdsACC; // Doesn't actually change anything |
|
| 242 | - $delegationstate = olTaskDelegationAccepted; |
|
| 243 | - break; |
|
| 239 | + case 'IPM.TaskRequest.Update': |
|
| 240 | + $taskhistory = thUpdated; |
|
| 241 | + $taskstate = tdsACC; // Doesn't actually change anything |
|
| 242 | + $delegationstate = olTaskDelegationAccepted; |
|
| 243 | + break; |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | // Update taskstate (what the task looks like) and task history (last action done by the assignee) |
@@ -610,17 +610,17 @@ discard block |
||
| 610 | 610 | } |
| 611 | 611 | |
| 612 | 612 | switch ($type) { |
| 613 | - case tdmtTaskAcc: |
|
| 614 | - $messageclass = "IPM.TaskRequest.Accept"; |
|
| 615 | - break; |
|
| 613 | + case tdmtTaskAcc: |
|
| 614 | + $messageclass = "IPM.TaskRequest.Accept"; |
|
| 615 | + break; |
|
| 616 | 616 | |
| 617 | - case tdmtTaskDec: |
|
| 618 | - $messageclass = "IPM.TaskRequest.Decline"; |
|
| 619 | - break; |
|
| 617 | + case tdmtTaskDec: |
|
| 618 | + $messageclass = "IPM.TaskRequest.Decline"; |
|
| 619 | + break; |
|
| 620 | 620 | |
| 621 | - case tdmtTaskUpd: |
|
| 622 | - $messageclass = "IPM.TaskRequest.Update"; |
|
| 623 | - break; |
|
| 621 | + case tdmtTaskUpd: |
|
| 622 | + $messageclass = "IPM.TaskRequest.Update"; |
|
| 623 | + break; |
|
| 624 | 624 | } |
| 625 | 625 | |
| 626 | 626 | mapi_savechanges($sub); |
@@ -260,35 +260,35 @@ |
||
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | switch ($errno) { |
| 263 | - case 0: |
|
| 264 | - // logging disabled by LOG_ERROR_MASK |
|
| 265 | - break; |
|
| 266 | - |
|
| 267 | - case E_DEPRECATED: |
|
| 268 | - // do not handle this message |
|
| 269 | - break; |
|
| 270 | - |
|
| 271 | - case E_NOTICE: |
|
| 272 | - case E_WARNING: |
|
| 273 | - $logger = \Logger::getLogger('error'); |
|
| 274 | - $logger->warn("{$errfile}:{$errline} {$errstr} ({$errno})"); |
|
| 275 | - break; |
|
| 276 | - |
|
| 277 | - default: |
|
| 278 | - $bt = debug_backtrace(); |
|
| 279 | - $logger = \Logger::getLogger('error'); |
|
| 280 | - $logger->error("trace error: {$errfile}:{$errline} {$errstr} ({$errno}) - backtrace: " . (count($bt) - 1) . " steps"); |
|
| 281 | - for ($i = 1, $bt_length = count($bt); $i < $bt_length; ++$i) { |
|
| 282 | - $file = $line = "unknown"; |
|
| 283 | - if (isset($bt[$i]['file'])) { |
|
| 284 | - $file = $bt[$i]['file']; |
|
| 285 | - } |
|
| 286 | - if (isset($bt[$i]['line'])) { |
|
| 287 | - $line = $bt[$i]['line']; |
|
| 288 | - } |
|
| 289 | - $logger->error("trace: {$i}:" . $file . ":" . $line . " - " . ((isset($bt[$i]['class'])) ? $bt[$i]['class'] . $bt[$i]['type'] : "") . $bt[$i]['function'] . "()"); |
|
| 263 | + case 0: |
|
| 264 | + // logging disabled by LOG_ERROR_MASK |
|
| 265 | + break; |
|
| 266 | + |
|
| 267 | + case E_DEPRECATED: |
|
| 268 | + // do not handle this message |
|
| 269 | + break; |
|
| 270 | + |
|
| 271 | + case E_NOTICE: |
|
| 272 | + case E_WARNING: |
|
| 273 | + $logger = \Logger::getLogger('error'); |
|
| 274 | + $logger->warn("{$errfile}:{$errline} {$errstr} ({$errno})"); |
|
| 275 | + break; |
|
| 276 | + |
|
| 277 | + default: |
|
| 278 | + $bt = debug_backtrace(); |
|
| 279 | + $logger = \Logger::getLogger('error'); |
|
| 280 | + $logger->error("trace error: {$errfile}:{$errline} {$errstr} ({$errno}) - backtrace: " . (count($bt) - 1) . " steps"); |
|
| 281 | + for ($i = 1, $bt_length = count($bt); $i < $bt_length; ++$i) { |
|
| 282 | + $file = $line = "unknown"; |
|
| 283 | + if (isset($bt[$i]['file'])) { |
|
| 284 | + $file = $bt[$i]['file']; |
|
| 290 | 285 | } |
| 291 | - break; |
|
| 286 | + if (isset($bt[$i]['line'])) { |
|
| 287 | + $line = $bt[$i]['line']; |
|
| 288 | + } |
|
| 289 | + $logger->error("trace: {$i}:" . $file . ":" . $line . " - " . ((isset($bt[$i]['class'])) ? $bt[$i]['class'] . $bt[$i]['type'] : "") . $bt[$i]['function'] . "()"); |
|
| 290 | + } |
|
| 291 | + break; |
|
| 292 | 292 | } |
| 293 | 293 | } |
| 294 | 294 | |