@@ -17,13 +17,13 @@ discard block |
||
| 17 | 17 | parent::__construct(); |
| 18 | 18 | |
| 19 | 19 | $this->mapping += array( |
| 20 | - SYNC_POOMCAL_DELETED => array ( self::STREAMER_VAR => "deleted", |
|
| 21 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ZEROORONE => self::STREAMER_CHECK_SETZERO), |
|
| 20 | + SYNC_POOMCAL_DELETED => array(self::STREAMER_VAR => "deleted", |
|
| 21 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ZEROORONE => self::STREAMER_CHECK_SETZERO), |
|
| 22 | 22 | self::STREAMER_RONOTIFY => true), |
| 23 | 23 | |
| 24 | - SYNC_POOMCAL_EXCEPTIONSTARTTIME => array ( self::STREAMER_VAR => "exceptionstarttime", |
|
| 24 | + SYNC_POOMCAL_EXCEPTIONSTARTTIME => array(self::STREAMER_VAR => "exceptionstarttime", |
|
| 25 | 25 | self::STREAMER_TYPE => self::STREAMER_TYPE_DATE, |
| 26 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETONE), |
|
| 26 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETONE), |
|
| 27 | 27 | self::STREAMER_RONOTIFY => true), |
| 28 | 28 | ); |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $this->mapping[SYNC_POOMCAL_SUBJECT][self::STREAMER_RONOTIFY] = true; |
| 38 | 38 | $this->mapping[SYNC_POOMCAL_ENDTIME][self::STREAMER_CHECKS] = array(self::STREAMER_CHECK_CMPHIGHER => SYNC_POOMCAL_STARTTIME); |
| 39 | 39 | $this->mapping[SYNC_POOMCAL_ENDTIME][self::STREAMER_RONOTIFY] = true; |
| 40 | - $this->mapping[SYNC_POOMCAL_BUSYSTATUS][self::STREAMER_CHECKS] = array(self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2,3,4) ); |
|
| 40 | + $this->mapping[SYNC_POOMCAL_BUSYSTATUS][self::STREAMER_CHECKS] = array(self::STREAMER_CHECK_ONEVALUEOF => array(0, 1, 2, 3, 4)); |
|
| 41 | 41 | $this->mapping[SYNC_POOMCAL_BUSYSTATUS][self::STREAMER_RONOTIFY] = true; |
| 42 | 42 | $this->mapping[SYNC_POOMCAL_REMINDER][self::STREAMER_CHECKS] = array(self::STREAMER_CHECK_CMPHIGHER => -1); |
| 43 | 43 | $this->mapping[SYNC_POOMCAL_REMINDER][self::STREAMER_RONOTIFY] = true; |
@@ -18,23 +18,23 @@ |
||
| 18 | 18 | public $bodytype; |
| 19 | 19 | |
| 20 | 20 | public function __construct() { |
| 21 | - $mapping = array ( |
|
| 21 | + $mapping = array( |
|
| 22 | 22 | //only one of the following 3 apply types will be available |
| 23 | - SYNC_SETTINGS_APPLIESTOINTERVAL => array ( self::STREAMER_VAR => "appliesToInternal", |
|
| 23 | + SYNC_SETTINGS_APPLIESTOINTERVAL => array(self::STREAMER_VAR => "appliesToInternal", |
|
| 24 | 24 | self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY), |
| 25 | 25 | |
| 26 | - SYNC_SETTINGS_APPLIESTOEXTERNALKNOWN => array ( self::STREAMER_VAR => "appliesToExternal", |
|
| 26 | + SYNC_SETTINGS_APPLIESTOEXTERNALKNOWN => array(self::STREAMER_VAR => "appliesToExternal", |
|
| 27 | 27 | self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY), |
| 28 | 28 | |
| 29 | - SYNC_SETTINGS_APPLIESTOEXTERNALUNKNOWN => array ( self::STREAMER_VAR => "appliesToExternalUnknown", |
|
| 29 | + SYNC_SETTINGS_APPLIESTOEXTERNALUNKNOWN => array(self::STREAMER_VAR => "appliesToExternalUnknown", |
|
| 30 | 30 | self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY), |
| 31 | 31 | |
| 32 | - SYNC_SETTINGS_ENABLED => array ( self::STREAMER_VAR => "enabled"), |
|
| 32 | + SYNC_SETTINGS_ENABLED => array(self::STREAMER_VAR => "enabled"), |
|
| 33 | 33 | |
| 34 | - SYNC_SETTINGS_REPLYMESSAGE => array ( self::STREAMER_VAR => "replymessage"), |
|
| 34 | + SYNC_SETTINGS_REPLYMESSAGE => array(self::STREAMER_VAR => "replymessage"), |
|
| 35 | 35 | |
| 36 | - SYNC_SETTINGS_BODYTYPE => array ( self::STREAMER_VAR => "bodytype", |
|
| 37 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(SYNC_SETTINGSOOF_BODYTYPE_HTML, ucfirst(strtolower(SYNC_SETTINGSOOF_BODYTYPE_TEXT))) )), |
|
| 36 | + SYNC_SETTINGS_BODYTYPE => array(self::STREAMER_VAR => "bodytype", |
|
| 37 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(SYNC_SETTINGSOOF_BODYTYPE_HTML, ucfirst(strtolower(SYNC_SETTINGSOOF_BODYTYPE_TEXT))))), |
|
| 38 | 38 | |
| 39 | 39 | ); |
| 40 | 40 | |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | public $Status; |
| 16 | 16 | |
| 17 | 17 | public function __construct() { |
| 18 | - $mapping = array ( |
|
| 19 | - SYNC_RIGHTSMANAGEMENT_TEMPLATES => array ( self::STREAMER_VAR => "rmtemplates", |
|
| 18 | + $mapping = array( |
|
| 19 | + SYNC_RIGHTSMANAGEMENT_TEMPLATES => array(self::STREAMER_VAR => "rmtemplates", |
|
| 20 | 20 | self::STREAMER_TYPE => "SyncRigtsManagementTemplate", |
| 21 | 21 | self::STREAMER_ARRAY => SYNC_RIGHTSMANAGEMENT_TEMPLATE, |
| 22 | 22 | self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY), |
| 23 | 23 | |
| 24 | - SYNC_SETTINGS_PROP_STATUS => array ( self::STREAMER_VAR => "Status", |
|
| 24 | + SYNC_SETTINGS_PROP_STATUS => array(self::STREAMER_VAR => "Status", |
|
| 25 | 25 | self::STREAMER_TYPE => self::STREAMER_TYPE_IGNORE) |
| 26 | 26 | ); |
| 27 | 27 | |
@@ -22,25 +22,25 @@ |
||
| 22 | 22 | public $Status; |
| 23 | 23 | |
| 24 | 24 | public function __construct() { |
| 25 | - $mapping = array ( |
|
| 26 | - SYNC_SETTINGS_MODEL => array ( self::STREAMER_VAR => "model"), |
|
| 27 | - SYNC_SETTINGS_IMEI => array ( self::STREAMER_VAR => "imei"), |
|
| 28 | - SYNC_SETTINGS_FRIENDLYNAME => array ( self::STREAMER_VAR => "friendlyname"), |
|
| 29 | - SYNC_SETTINGS_OS => array ( self::STREAMER_VAR => "os"), |
|
| 30 | - SYNC_SETTINGS_OSLANGUAGE => array ( self::STREAMER_VAR => "oslanguage"), |
|
| 31 | - SYNC_SETTINGS_PHONENUMBER => array ( self::STREAMER_VAR => "phonenumber"), |
|
| 25 | + $mapping = array( |
|
| 26 | + SYNC_SETTINGS_MODEL => array(self::STREAMER_VAR => "model"), |
|
| 27 | + SYNC_SETTINGS_IMEI => array(self::STREAMER_VAR => "imei"), |
|
| 28 | + SYNC_SETTINGS_FRIENDLYNAME => array(self::STREAMER_VAR => "friendlyname"), |
|
| 29 | + SYNC_SETTINGS_OS => array(self::STREAMER_VAR => "os"), |
|
| 30 | + SYNC_SETTINGS_OSLANGUAGE => array(self::STREAMER_VAR => "oslanguage"), |
|
| 31 | + SYNC_SETTINGS_PHONENUMBER => array(self::STREAMER_VAR => "phonenumber"), |
|
| 32 | 32 | |
| 33 | - SYNC_SETTINGS_PROP_STATUS => array ( self::STREAMER_VAR => "Status", |
|
| 33 | + SYNC_SETTINGS_PROP_STATUS => array(self::STREAMER_VAR => "Status", |
|
| 34 | 34 | self::STREAMER_TYPE => self::STREAMER_TYPE_IGNORE) |
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | 37 | if (Request::GetProtocolVersion() >= 12.1) { |
| 38 | - $mapping[SYNC_SETTINGS_USERAGENT] = array ( self::STREAMER_VAR => "useragent"); |
|
| 38 | + $mapping[SYNC_SETTINGS_USERAGENT] = array(self::STREAMER_VAR => "useragent"); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | if (Request::GetProtocolVersion() >= 14.0) { |
| 42 | - $mapping[SYNC_SETTINGS_MOBILEOPERATOR] = array ( self::STREAMER_VAR => "mobileoperator"); |
|
| 43 | - $mapping[SYNC_SETTINGS_ENABLEOUTBOUNDSMS] = array ( self::STREAMER_VAR => "enableoutboundsms"); |
|
| 42 | + $mapping[SYNC_SETTINGS_MOBILEOPERATOR] = array(self::STREAMER_VAR => "mobileoperator"); |
|
| 43 | + $mapping[SYNC_SETTINGS_ENABLEOUTBOUNDSMS] = array(self::STREAMER_VAR => "enableoutboundsms"); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | parent::__construct($mapping); |
@@ -19,17 +19,17 @@ |
||
| 19 | 19 | |
| 20 | 20 | function __construct() { |
| 21 | 21 | $mapping = array( |
| 22 | - SYNC_AIRSYNCBASE_STATUS => array ( self::STREAMER_VAR => "status"), |
|
| 23 | - SYNC_AIRSYNCBASE_TYPE => array ( self::STREAMER_VAR => "type"), |
|
| 24 | - SYNC_AIRSYNCBASE_ESTIMATEDDATASIZE => array ( self::STREAMER_VAR => "estimatedDataSize", |
|
| 25 | - self::STREAMER_PRIVATE => strlen(self::STRIP_PRIVATE_SUBSTITUTE)), // when stripping private we set the body to self::STRIP_PRIVATE_SUBSTITUTE, so the size needs to be its length |
|
| 26 | - SYNC_AIRSYNCBASE_TRUNCATED => array ( self::STREAMER_VAR => "truncated"), |
|
| 27 | - SYNC_AIRSYNCBASE_DATA => array ( self::STREAMER_VAR => "data", |
|
| 22 | + SYNC_AIRSYNCBASE_STATUS => array(self::STREAMER_VAR => "status"), |
|
| 23 | + SYNC_AIRSYNCBASE_TYPE => array(self::STREAMER_VAR => "type"), |
|
| 24 | + SYNC_AIRSYNCBASE_ESTIMATEDDATASIZE => array(self::STREAMER_VAR => "estimatedDataSize", |
|
| 25 | + self::STREAMER_PRIVATE => strlen(self::STRIP_PRIVATE_SUBSTITUTE)), // when stripping private we set the body to self::STRIP_PRIVATE_SUBSTITUTE, so the size needs to be its length |
|
| 26 | + SYNC_AIRSYNCBASE_TRUNCATED => array(self::STREAMER_VAR => "truncated"), |
|
| 27 | + SYNC_AIRSYNCBASE_DATA => array(self::STREAMER_VAR => "data", |
|
| 28 | 28 | self::STREAMER_TYPE => self::STREAMER_TYPE_STREAM_ASPLAIN, |
| 29 | 29 | self::STREAMER_PROP => self::STREAMER_TYPE_MULTIPART, |
| 30 | 30 | self::STREAMER_RONOTIFY => true, |
| 31 | - self::STREAMER_PRIVATE => StringStreamWrapper::Open(self::STRIP_PRIVATE_SUBSTITUTE)), // replace the body with self::STRIP_PRIVATE_SUBSTITUTE when stripping private |
|
| 32 | - SYNC_AIRSYNCBASE_PREVIEW => array ( self::STREAMER_VAR => "preview", |
|
| 31 | + self::STREAMER_PRIVATE => StringStreamWrapper::Open(self::STRIP_PRIVATE_SUBSTITUTE)), // replace the body with self::STRIP_PRIVATE_SUBSTITUTE when stripping private |
|
| 32 | + SYNC_AIRSYNCBASE_PREVIEW => array(self::STREAMER_VAR => "preview", |
|
| 33 | 33 | self::STREAMER_PRIVATE => self::STRIP_PRIVATE_SUBSTITUTE) |
| 34 | 34 | ); |
| 35 | 35 | |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | public $firstdayofweek; |
| 27 | 27 | |
| 28 | 28 | function __construct() { |
| 29 | - $mapping = array ( |
|
| 30 | - SYNC_POOMTASKS_START => array ( self::STREAMER_VAR => "start", |
|
| 29 | + $mapping = array( |
|
| 30 | + SYNC_POOMTASKS_START => array(self::STREAMER_VAR => "start", |
|
| 31 | 31 | self::STREAMER_TYPE => self::STREAMER_TYPE_DATE, |
| 32 | 32 | self::STREAMER_RONOTIFY => true), |
| 33 | 33 | |
@@ -38,29 +38,29 @@ discard block |
||
| 38 | 38 | // 3 = Recurs monthly on the nth day |
| 39 | 39 | // 5 = Recurs yearly |
| 40 | 40 | // 6 = Recurs yearly on the nth day |
| 41 | - SYNC_POOMTASKS_TYPE => array ( self::STREAMER_VAR => "type", |
|
| 42 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETZERO, |
|
| 43 | - self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2,3,5,6) ), |
|
| 41 | + SYNC_POOMTASKS_TYPE => array(self::STREAMER_VAR => "type", |
|
| 42 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETZERO, |
|
| 43 | + self::STREAMER_CHECK_ONEVALUEOF => array(0, 1, 2, 3, 5, 6)), |
|
| 44 | 44 | self::STREAMER_RONOTIFY => true), |
| 45 | 45 | |
| 46 | - SYNC_POOMTASKS_UNTIL => array ( self::STREAMER_VAR => "until", |
|
| 46 | + SYNC_POOMTASKS_UNTIL => array(self::STREAMER_VAR => "until", |
|
| 47 | 47 | self::STREAMER_TYPE => self::STREAMER_TYPE_DATE, |
| 48 | 48 | self::STREAMER_RONOTIFY => true), |
| 49 | 49 | |
| 50 | - SYNC_POOMTASKS_OCCURRENCES => array ( self::STREAMER_VAR => "occurrences", |
|
| 51 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 52 | - self::STREAMER_CHECK_CMPLOWER => 1000 ), |
|
| 50 | + SYNC_POOMTASKS_OCCURRENCES => array(self::STREAMER_VAR => "occurrences", |
|
| 51 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 52 | + self::STREAMER_CHECK_CMPLOWER => 1000), |
|
| 53 | 53 | self::STREAMER_RONOTIFY => true), |
| 54 | 54 | |
| 55 | - SYNC_POOMTASKS_INTERVAL => array ( self::STREAMER_VAR => "interval", |
|
| 56 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 57 | - self::STREAMER_CHECK_CMPLOWER => 1000 ), |
|
| 55 | + SYNC_POOMTASKS_INTERVAL => array(self::STREAMER_VAR => "interval", |
|
| 56 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 57 | + self::STREAMER_CHECK_CMPLOWER => 1000), |
|
| 58 | 58 | self::STREAMER_RONOTIFY => true), |
| 59 | 59 | |
| 60 | 60 | //TODO: check iOS5 sends deadoccur inside of the recurrence |
| 61 | - SYNC_POOMTASKS_DEADOCCUR => array ( self::STREAMER_VAR => "deadoccur", |
|
| 61 | + SYNC_POOMTASKS_DEADOCCUR => array(self::STREAMER_VAR => "deadoccur", |
|
| 62 | 62 | self::STREAMER_RONOTIFY => true), |
| 63 | - SYNC_POOMTASKS_REGENERATE => array ( self::STREAMER_VAR => "regenerate", |
|
| 63 | + SYNC_POOMTASKS_REGENERATE => array(self::STREAMER_VAR => "regenerate", |
|
| 64 | 64 | self::STREAMER_RONOTIFY => true), |
| 65 | 65 | |
| 66 | 66 | // DayOfWeek values |
@@ -73,38 +73,38 @@ discard block |
||
| 73 | 73 | // 62 = Weekdays // TODO check: value set by WA with daily weekday recurrence |
| 74 | 74 | // 64 = Saturday |
| 75 | 75 | // 127 = The last day of the month. Value valid only in monthly or yearly recurrences. |
| 76 | - SYNC_POOMTASKS_DAYOFWEEK => array ( self::STREAMER_VAR => "dayofweek", |
|
| 77 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 78 | - self::STREAMER_CHECK_CMPLOWER => 128 ), |
|
| 76 | + SYNC_POOMTASKS_DAYOFWEEK => array(self::STREAMER_VAR => "dayofweek", |
|
| 77 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 78 | + self::STREAMER_CHECK_CMPLOWER => 128), |
|
| 79 | 79 | self::STREAMER_RONOTIFY => true), |
| 80 | 80 | |
| 81 | 81 | // DayOfMonth values |
| 82 | 82 | // 1-31 representing the day |
| 83 | - SYNC_POOMTASKS_DAYOFMONTH => array ( self::STREAMER_VAR => "dayofmonth", |
|
| 84 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 85 | - self::STREAMER_CHECK_CMPLOWER => 32 ), |
|
| 83 | + SYNC_POOMTASKS_DAYOFMONTH => array(self::STREAMER_VAR => "dayofmonth", |
|
| 84 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 85 | + self::STREAMER_CHECK_CMPLOWER => 32), |
|
| 86 | 86 | self::STREAMER_RONOTIFY => true), |
| 87 | 87 | |
| 88 | 88 | // WeekOfMonth |
| 89 | 89 | // 1-4 = Y st/nd/rd/th week of month |
| 90 | 90 | // 5 = last week of month |
| 91 | - SYNC_POOMTASKS_WEEKOFMONTH => array ( self::STREAMER_VAR => "weekofmonth", |
|
| 92 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(1,2,3,4,5) ), |
|
| 91 | + SYNC_POOMTASKS_WEEKOFMONTH => array(self::STREAMER_VAR => "weekofmonth", |
|
| 92 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(1, 2, 3, 4, 5)), |
|
| 93 | 93 | self::STREAMER_RONOTIFY => true), |
| 94 | 94 | |
| 95 | 95 | // MonthOfYear |
| 96 | 96 | // 1-12 representing the month |
| 97 | - SYNC_POOMTASKS_MONTHOFYEAR => array ( self::STREAMER_VAR => "monthofyear", |
|
| 98 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(1,2,3,4,5,6,7,8,9,10,11,12) ), |
|
| 97 | + SYNC_POOMTASKS_MONTHOFYEAR => array(self::STREAMER_VAR => "monthofyear", |
|
| 98 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)), |
|
| 99 | 99 | self::STREAMER_RONOTIFY => true), |
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | - if(Request::GetProtocolVersion() >= 14.0) { |
|
| 103 | - $mapping[SYNC_POOMTASKS_CALENDARTYPE] = array ( self::STREAMER_VAR => "calendartype", |
|
| 102 | + if (Request::GetProtocolVersion() >= 14.0) { |
|
| 103 | + $mapping[SYNC_POOMTASKS_CALENDARTYPE] = array(self::STREAMER_VAR => "calendartype", |
|
| 104 | 104 | self::STREAMER_RONOTIFY => true); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - if(Request::GetProtocolVersion() >= 14.1) { |
|
| 107 | + if (Request::GetProtocolVersion() >= 14.1) { |
|
| 108 | 108 | // First day of the calendar week for recurrence. |
| 109 | 109 | // FirstDayOfWeek values: |
| 110 | 110 | // 0 = Sunday |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | // 4 = Thursday |
| 115 | 115 | // 5 = Friday |
| 116 | 116 | // 6 = Saturday |
| 117 | - $mapping[SYNC_POOMTASKS_FIRSTDAYOFWEEK] = array ( self::STREAMER_VAR => "firstdayofweek", |
|
| 118 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2,3,4,5,6) ), |
|
| 117 | + $mapping[SYNC_POOMTASKS_FIRSTDAYOFWEEK] = array(self::STREAMER_VAR => "firstdayofweek", |
|
| 118 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(0, 1, 2, 3, 4, 5, 6)), |
|
| 119 | 119 | self::STREAMER_RONOTIFY => true); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | return false; |
| 145 | 145 | |
| 146 | 146 | if (isset($this->start) && isset($this->until) && $this->until < $this->start) { |
| 147 | - ZLog::Write(LOGLEVEL_WARN, sprintf("SyncObject->Check(): Unmet condition in object from type %s: parameter 'start' is HIGHER than 'until'. Check failed!", get_class($this) )); |
|
| 147 | + ZLog::Write(LOGLEVEL_WARN, sprintf("SyncObject->Check(): Unmet condition in object from type %s: parameter 'start' is HIGHER than 'until'. Check failed!", get_class($this))); |
|
| 148 | 148 | return false; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -137,11 +137,13 @@ |
||
| 137 | 137 | $ret = parent::Check($logAsDebug); |
| 138 | 138 | |
| 139 | 139 | // semantic checks general "turn off switch" |
| 140 | - if (defined("DO_SEMANTIC_CHECKS") && DO_SEMANTIC_CHECKS === false) |
|
| 141 | - return $ret; |
|
| 140 | + if (defined("DO_SEMANTIC_CHECKS") && DO_SEMANTIC_CHECKS === false) { |
|
| 141 | + return $ret; |
|
| 142 | + } |
|
| 142 | 143 | |
| 143 | - if (!$ret) |
|
| 144 | - return false; |
|
| 144 | + if (!$ret) { |
|
| 145 | + return false; |
|
| 146 | + } |
|
| 145 | 147 | |
| 146 | 148 | if (isset($this->start) && isset($this->until) && $this->until < $this->start) { |
| 147 | 149 | ZLog::Write(LOGLEVEL_WARN, sprintf("SyncObject->Check(): Unmet condition in object from type %s: parameter 'start' is HIGHER than 'until'. Check failed!", get_class($this) )); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | public $firstdayofweek; |
| 23 | 23 | |
| 24 | 24 | function __construct() { |
| 25 | - $mapping = array ( |
|
| 25 | + $mapping = array( |
|
| 26 | 26 | // Recurrence type |
| 27 | 27 | // 0 = Recurs daily |
| 28 | 28 | // 1 = Recurs weekly |
@@ -30,23 +30,23 @@ discard block |
||
| 30 | 30 | // 3 = Recurs monthly on the nth day |
| 31 | 31 | // 5 = Recurs yearly |
| 32 | 32 | // 6 = Recurs yearly on the nth day |
| 33 | - SYNC_POOMCAL_TYPE => array ( self::STREAMER_VAR => "type", |
|
| 34 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETZERO, |
|
| 35 | - self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2,3,5,6) ), |
|
| 33 | + SYNC_POOMCAL_TYPE => array(self::STREAMER_VAR => "type", |
|
| 34 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETZERO, |
|
| 35 | + self::STREAMER_CHECK_ONEVALUEOF => array(0, 1, 2, 3, 5, 6)), |
|
| 36 | 36 | self::STREAMER_RONOTIFY => true), |
| 37 | 37 | |
| 38 | - SYNC_POOMCAL_UNTIL => array ( self::STREAMER_VAR => "until", |
|
| 38 | + SYNC_POOMCAL_UNTIL => array(self::STREAMER_VAR => "until", |
|
| 39 | 39 | self::STREAMER_TYPE => self::STREAMER_TYPE_DATE, |
| 40 | 40 | self::STREAMER_RONOTIFY => true), |
| 41 | 41 | |
| 42 | - SYNC_POOMCAL_OCCURRENCES => array ( self::STREAMER_VAR => "occurrences", |
|
| 43 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 44 | - self::STREAMER_CHECK_CMPLOWER => 1000 ), |
|
| 42 | + SYNC_POOMCAL_OCCURRENCES => array(self::STREAMER_VAR => "occurrences", |
|
| 43 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 44 | + self::STREAMER_CHECK_CMPLOWER => 1000), |
|
| 45 | 45 | self::STREAMER_RONOTIFY => true), |
| 46 | 46 | |
| 47 | - SYNC_POOMCAL_INTERVAL => array ( self::STREAMER_VAR => "interval", |
|
| 48 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 49 | - self::STREAMER_CHECK_CMPLOWER => 1000 ), |
|
| 47 | + SYNC_POOMCAL_INTERVAL => array(self::STREAMER_VAR => "interval", |
|
| 48 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 49 | + self::STREAMER_CHECK_CMPLOWER => 1000), |
|
| 50 | 50 | self::STREAMER_RONOTIFY => true), |
| 51 | 51 | |
| 52 | 52 | // DayOfWeek values |
@@ -60,38 +60,38 @@ discard block |
||
| 60 | 60 | // 64 = Saturday |
| 61 | 61 | // 127 = The last day of the month. Value valid only in monthly or yearly recurrences. |
| 62 | 62 | // As this is a bitmask, actually all values 0 > x < 128 are allowed |
| 63 | - SYNC_POOMCAL_DAYOFWEEK => array ( self::STREAMER_VAR => "dayofweek", |
|
| 64 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 65 | - self::STREAMER_CHECK_CMPLOWER => 128 ), |
|
| 63 | + SYNC_POOMCAL_DAYOFWEEK => array(self::STREAMER_VAR => "dayofweek", |
|
| 64 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 65 | + self::STREAMER_CHECK_CMPLOWER => 128), |
|
| 66 | 66 | self::STREAMER_RONOTIFY => true), |
| 67 | 67 | |
| 68 | 68 | // DayOfMonth values |
| 69 | 69 | // 1-31 representing the day |
| 70 | - SYNC_POOMCAL_DAYOFMONTH => array ( self::STREAMER_VAR => "dayofmonth", |
|
| 71 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 72 | - self::STREAMER_CHECK_CMPLOWER => 32 ), |
|
| 70 | + SYNC_POOMCAL_DAYOFMONTH => array(self::STREAMER_VAR => "dayofmonth", |
|
| 71 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_CMPHIGHER => 0, |
|
| 72 | + self::STREAMER_CHECK_CMPLOWER => 32), |
|
| 73 | 73 | self::STREAMER_RONOTIFY => true), |
| 74 | 74 | |
| 75 | 75 | // WeekOfMonth |
| 76 | 76 | // 1-4 = Y st/nd/rd/th week of month |
| 77 | 77 | // 5 = last week of month |
| 78 | - SYNC_POOMCAL_WEEKOFMONTH => array ( self::STREAMER_VAR => "weekofmonth", |
|
| 79 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(1,2,3,4,5) ), |
|
| 78 | + SYNC_POOMCAL_WEEKOFMONTH => array(self::STREAMER_VAR => "weekofmonth", |
|
| 79 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(1, 2, 3, 4, 5)), |
|
| 80 | 80 | self::STREAMER_RONOTIFY => true), |
| 81 | 81 | |
| 82 | 82 | // MonthOfYear |
| 83 | 83 | // 1-12 representing the month |
| 84 | - SYNC_POOMCAL_MONTHOFYEAR => array ( self::STREAMER_VAR => "monthofyear", |
|
| 85 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(1,2,3,4,5,6,7,8,9,10,11,12) ), |
|
| 84 | + SYNC_POOMCAL_MONTHOFYEAR => array(self::STREAMER_VAR => "monthofyear", |
|
| 85 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)), |
|
| 86 | 86 | self::STREAMER_RONOTIFY => true), |
| 87 | 87 | ); |
| 88 | 88 | |
| 89 | - if(Request::GetProtocolVersion() >= 14.0) { |
|
| 90 | - $mapping[SYNC_POOMCAL_CALENDARTYPE] = array ( self::STREAMER_VAR => "calendartype", |
|
| 89 | + if (Request::GetProtocolVersion() >= 14.0) { |
|
| 90 | + $mapping[SYNC_POOMCAL_CALENDARTYPE] = array(self::STREAMER_VAR => "calendartype", |
|
| 91 | 91 | self::STREAMER_RONOTIFY => true); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if(Request::GetProtocolVersion() >= 14.1) { |
|
| 94 | + if (Request::GetProtocolVersion() >= 14.1) { |
|
| 95 | 95 | // First day of the calendar week for recurrence. |
| 96 | 96 | // FirstDayOfWeek values: |
| 97 | 97 | // 0 = Sunday |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | // 4 = Thursday |
| 102 | 102 | // 5 = Friday |
| 103 | 103 | // 6 = Saturday |
| 104 | - $mapping[SYNC_POOMCAL_FIRSTDAYOFWEEK] = array ( self::STREAMER_VAR => "firstdayofweek", |
|
| 105 | - self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2,3,4,5,6) ), |
|
| 104 | + $mapping[SYNC_POOMCAL_FIRSTDAYOFWEEK] = array(self::STREAMER_VAR => "firstdayofweek", |
|
| 105 | + self::STREAMER_CHECKS => array(self::STREAMER_CHECK_ONEVALUEOF => array(0, 1, 2, 3, 4, 5, 6)), |
|
| 106 | 106 | self::STREAMER_RONOTIFY => true); |
| 107 | 107 | } |
| 108 | 108 | |
@@ -15,19 +15,19 @@ |
||
| 15 | 15 | public $Status; |
| 16 | 16 | |
| 17 | 17 | public function __construct() { |
| 18 | - $mapping = array(SYNC_SETTINGS_PROP_STATUS => array ( self::STREAMER_VAR => "Status", |
|
| 18 | + $mapping = array(SYNC_SETTINGS_PROP_STATUS => array(self::STREAMER_VAR => "Status", |
|
| 19 | 19 | self::STREAMER_TYPE => self::STREAMER_TYPE_IGNORE)); |
| 20 | 20 | |
| 21 | 21 | // In AS protocol versions 12.0, 12.1 and 14.0 EmailAddresses element is child of Get in UserSettings |
| 22 | 22 | // Since AS protocol version 14.1 EmailAddresses element is child of Account element of Get in UserSettings |
| 23 | 23 | if (Request::GetProtocolVersion() >= 12.0) { |
| 24 | - $mapping[SYNC_SETTINGS_EMAILADDRESSES] = array ( self::STREAMER_VAR => "emailaddresses", |
|
| 24 | + $mapping[SYNC_SETTINGS_EMAILADDRESSES] = array(self::STREAMER_VAR => "emailaddresses", |
|
| 25 | 25 | self::STREAMER_ARRAY => SYNC_SETTINGS_SMPTADDRESS); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | if (Request::GetProtocolVersion() >= 14.1) { |
| 29 | 29 | unset($mapping[SYNC_SETTINGS_EMAILADDRESSES]); |
| 30 | - $mapping[SYNC_SETTINGS_ACCOUNTS] = array ( self::STREAMER_VAR => "accounts", |
|
| 30 | + $mapping[SYNC_SETTINGS_ACCOUNTS] = array(self::STREAMER_VAR => "accounts", |
|
| 31 | 31 | self::STREAMER_TYPE => "SyncAccount", |
| 32 | 32 | self::STREAMER_ARRAY => SYNC_SETTINGS_ACCOUNT); |
| 33 | 33 | } |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | public $mergedfreebusy; |
| 17 | 17 | |
| 18 | 18 | public function __construct() { |
| 19 | - $mapping = array (); |
|
| 19 | + $mapping = array(); |
|
| 20 | 20 | |
| 21 | 21 | if (Request::GetProtocolVersion() >= 14.0) { |
| 22 | - $mapping[SYNC_RESOLVERECIPIENTS_STARTTIME] = array ( self::STREAMER_VAR => "starttime"); |
|
| 23 | - $mapping[SYNC_RESOLVERECIPIENTS_ENDTIME] = array ( self::STREAMER_VAR => "endtime"); |
|
| 24 | - $mapping[SYNC_RESOLVERECIPIENTS_STATUS] = array ( self::STREAMER_VAR => "status"); |
|
| 25 | - $mapping[SYNC_RESOLVERECIPIENTS_MERGEDFREEBUSY] = array ( self::STREAMER_VAR => "mergedfreebusy"); |
|
| 22 | + $mapping[SYNC_RESOLVERECIPIENTS_STARTTIME] = array(self::STREAMER_VAR => "starttime"); |
|
| 23 | + $mapping[SYNC_RESOLVERECIPIENTS_ENDTIME] = array(self::STREAMER_VAR => "endtime"); |
|
| 24 | + $mapping[SYNC_RESOLVERECIPIENTS_STATUS] = array(self::STREAMER_VAR => "status"); |
|
| 25 | + $mapping[SYNC_RESOLVERECIPIENTS_MERGEDFREEBUSY] = array(self::STREAMER_VAR => "mergedfreebusy"); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | parent::__construct($mapping); |